/* ============================================================================
   Tipptreff.app - Responsive Styles
   Mobile-First Breakpoints
   ============================================================================ */

/* ============================================================================
   Breakpoints
   xs: < 576px (default)
   sm: >= 576px
   md: >= 768px
   lg: >= 992px
   xl: >= 1200px
   ============================================================================ */

/* ============================================================================
   Small devices (landscape phones, 576px and up)
   ============================================================================ */
@media (min-width: 576px) {
  .container {
    max-width: 540px;
  }
  
  /* Typography */
  h1 { font-size: 2.75rem; }
  h2 { font-size: 2.25rem; }
  
  /* Forms */
  .form-inline {
    display: flex;
    gap: 0.75rem;
    align-items: flex-end;
  }
  
  .form-inline .form-group {
    flex: 1;
    margin-bottom: 0;
  }
}

/* ============================================================================
   Medium devices (tablets, 768px and up)
   ============================================================================ */
@media (min-width: 768px) {
  .container {
    max-width: 720px;
  }
  
  /* Typography */
  h1 { font-size: 3rem; }
  h2 { font-size: 2.5rem; }
  
  /* Grid */
  .col-md-1 { flex: 0 0 8.333333%; max-width: 8.333333%; }
  .col-md-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
  .col-md-3 { flex: 0 0 25%; max-width: 25%; }
  .col-md-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
  .col-md-5 { flex: 0 0 41.666667%; max-width: 41.666667%; }
  .col-md-6 { flex: 0 0 50%; max-width: 50%; }
  .col-md-7 { flex: 0 0 58.333333%; max-width: 58.333333%; }
  .col-md-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
  .col-md-9 { flex: 0 0 75%; max-width: 75%; }
  .col-md-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }
  .col-md-11 { flex: 0 0 91.666667%; max-width: 91.666667%; }
  .col-md-12 { flex: 0 0 100%; max-width: 100%; }
  
  /* Display utilities */
  .d-md-none { display: none !important; }
  .d-md-block { display: block !important; }
  .d-md-flex { display: flex !important; }
  .d-md-grid { display: grid !important; }
  
  /* Header/Navigation */
  .header-mobile-menu {
    display: none;
  }
  
  .header-nav {
    display: flex !important;
  }
}

/* ============================================================================
   Large devices (desktops, 992px and up)
   ============================================================================ */
@media (min-width: 992px) {
  .container {
    max-width: 960px;
  }
  
  /* Typography */
  h1 { font-size: 3.5rem; }
  h2 { font-size: 2.75rem; }
  
  /* Grid */
  .col-lg-1 { flex: 0 0 8.333333%; max-width: 8.333333%; }
  .col-lg-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
  .col-lg-3 { flex: 0 0 25%; max-width: 25%; }
  .col-lg-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
  .col-lg-5 { flex: 0 0 41.666667%; max-width: 41.666667%; }
  .col-lg-6 { flex: 0 0 50%; max-width: 50%; }
  .col-lg-7 { flex: 0 0 58.333333%; max-width: 58.333333%; }
  .col-lg-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
  .col-lg-9 { flex: 0 0 75%; max-width: 75%; }
  .col-lg-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }
  .col-lg-11 { flex: 0 0 91.666667%; max-width: 91.666667%; }
  .col-lg-12 { flex: 0 0 100%; max-width: 100%; }
  
  /* Display utilities */
  .d-lg-none { display: none !important; }
  .d-lg-block { display: block !important; }
  .d-lg-flex { display: flex !important; }
  .d-lg-grid { display: grid !important; }
  
  /* Sidebar Layouts */
  .sidebar-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
  }
}

/* ============================================================================
   Extra large devices (large desktops, 1200px and up)
   ============================================================================ */
@media (min-width: 1200px) {
  .container {
    max-width: 1140px;
  }
  
  /* Grid */
  .col-xl-1 { flex: 0 0 8.333333%; max-width: 8.333333%; }
  .col-xl-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
  .col-xl-3 { flex: 0 0 25%; max-width: 25%; }
  .col-xl-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
  .col-xl-5 { flex: 0 0 41.666667%; max-width: 41.666667%; }
  .col-xl-6 { flex: 0 0 50%; max-width: 50%; }
  .col-xl-7 { flex: 0 0 58.333333%; max-width: 58.333333%; }
  .col-xl-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
  .col-xl-9 { flex: 0 0 75%; max-width: 75%; }
  .col-xl-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }
  .col-xl-11 { flex: 0 0 91.666667%; max-width: 91.666667%; }
  .col-xl-12 { flex: 0 0 100%; max-width: 100%; }
  
  /* Display utilities */
  .d-xl-none { display: none !important; }
  .d-xl-block { display: block !important; }
  .d-xl-flex { display: flex !important; }
  .d-xl-grid { display: grid !important; }
  
  /* Wider sidebar */
  .sidebar-layout {
    grid-template-columns: 280px 1fr;
  }
}

/* ============================================================================
   Mobile-specific styles (max-width breakpoints)
   ============================================================================ */

/* Extra small devices (portrait phones, less than 576px) */
@media (max-width: 575.98px) {
  /* Typography */
  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.5rem; }
  h4 { font-size: 1.25rem; }
  
  /* Buttons */
  .btn {
    width: 100%;
    justify-content: center;
  }
  
  .btn + .btn {
    margin-top: 0.5rem;
  }
  
  /* Forms */
  .form-inline {
    flex-direction: column;
  }
  
  .form-inline .form-group {
    width: 100%;
  }
  
  /* Modals */
  .modal {
    width: 95%;
    max-height: 95vh;
  }
  
  /* Tables */
  .table-responsive {
    font-size: 0.875rem;
  }
  
  .table thead {
    display: none;
  }
  
  .table tbody tr {
    display: block;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
  }
  
  .table tbody td {
    display: block;
    text-align: right;
    padding-left: 50%;
    position: relative;
  }
  
  .table tbody td::before {
    content: attr(data-label);
    position: absolute;
    left: 1rem;
    font-weight: 600;
    text-align: left;
  }
  
  /* Cards */
  .card {
    padding: 1rem;
  }
  
  /* Navigation */
  .header-nav {
    display: none;
  }
  
  .header-mobile-menu {
    display: block;
  }
  
  /* Hero sections */
  .hero .container {
    grid-template-columns: 1fr;
  }
  
  .hero-image {
    order: -1;
  }
}

/* Tablet and below */
@media (max-width: 991.98px) {
  /* Sidebar to top */
  .sidebar-layout {
    grid-template-columns: 1fr;
  }
  
  .sidebar {
    margin-bottom: 2rem;
  }
}

/* ============================================================================
   Print styles
   ============================================================================ */
@media print {
  * {
    background: white !important;
    color: black !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }
  
  a, a:visited {
    text-decoration: underline;
  }
  
  a[href]::after {
    content: " (" attr(href) ")";
  }
  
  .header,
  .footer,
  .sidebar,
  .btn,
  .pagination,
  .no-print {
    display: none !important;
  }
  
  .main-content {
    padding: 0;
  }
}

/* ============================================================================
   Reduced motion
   ============================================================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}