/* ======================
   Base Styles
   ====================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

/* ======================
   Header & Navigation
   ====================== */
   
header {
    
  background: lch(50% 70 130); /* Perceptual color */
  fallback: #388E3C; /* For older browsers */
    color: white;
    padding: 0.5rem;
    margin-bottom: 0.5rem;
}

header h1 {
    margin-bottom: 0.5rem;
}

nav {
    display: flex;
    gap: 1rem;
}

@media (max-width: 767px) {
  nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around; /* Evenly distributes space */
    width: 100%;
  }
  
  nav a {
    flex: 1; /* Makes items grow to fill space */
    min-width: max-content; /* Prevents text from breaking awkwardly */
    text-align: center;
      }
}

nav a {
    color: white;
    text-decoration: none;
}

nav a:hover {
    text-decoration: underline;
}

/* ======================
   Main Content
   ====================== */
main {
    width: 90%;
    max-width: 1200px;
    margin: 0; /* auto; */
    padding: 1rem;
}

/* ======================
   Alerts & Messages
   ====================== */
.alert {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 4px;
}

.error {
    background-color: #ffcccc;
    color: #cc0000;
}

.success {
    background-color: #ccffcc;
    color: #006600;
}

/* ======================
   Forms
   ====================== */
form {
    max-width: 500px;
    margin: 2rem auto;
    padding: 1rem;
    background: white;
    border-radius: 4px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 1rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

button, .btn {
    display: inline-block;
    background: #388E3C;
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 1rem;
}

button:hover, .btn:hover {
    background: #005f92;
}

.btn-danger {
    background: #dc3545;
}

.btn-danger:hover {
    background: #bb2d3b;
}

.filter-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
    background: white;
    padding: 1rem;
    border-radius: 4px;
    box-shadow: 0 0 5px rgba(0,0,0,0.1);
}

/* ======================
   Tables - UPDATED FOR SCHEDULE
   ====================== */
.schedule-table {
    width: 100%;
    table-layout: fixed; /* Critical for fixed columns */
    border-collapse: collapse;
    margin-bottom: 2rem;
}

/* Column Width Distribution (6 columns) */
.schedule-table th:nth-child(1),
.schedule-table td:nth-child(1) {
    width: 12%; /* Time column */
}

.schedule-table th:not(:nth-child(1)),
.schedule-table td:not(:nth-child(1)) {
    width: 17.6%; /* 5 equal-width location columns */
}

/* Cell Styling */
.schedule-table th,
.schedule-table td {
    border: 1px solid #ddd;
    padding: 12px 8px;
    text-align: center;
    vertical-align: top;
    height: auto;
    min-height: 80px; /* Minimum row height */
}

.schedule-table th {
    background-color: #388E3C;
    color: white;
    position: sticky;
    top: 0;
    z-index: 10;
}

/* Booking Content */
.booking {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 60px;
    justify-content: center;
}

.booking strong {
    display: block;
    margin-bottom: 4px;
}

.booking-notes {
    display: block;
    margin-top: 6px;
    padding: 6px;
    font-size: 0.95rem;
    line-height: 1.4;
    background-color: #f8f9fa;
    border-radius: 4px;
    word-break: break-word;
}

.book-btn {
    display: inline-block;
    padding: 8px 12px;
    background: #28a745;
    color: white;
    border-radius: 4px;
    text-decoration: none;
    margin-top: 4px;
}

.recurring-badge {
    background: #2196F3;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
    display: inline-block;
    margin-top: 4px;
}

/* ======================
   Date Navigation
   ====================== */
.date-navigation {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.date-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-arrow {
    display: inline-block;
    padding: 8px 16px;
    background: #32CD32;
    color: white;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    font-size: 16px;
    transition: background 0.3s;
}

.today-btn {
    padding: 8px 16px;
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 6px;
    text-decoration: none;
    color: #333;
    font-weight: 500;
}

/* ======================
   Responsive Styles (Outside))
   ====================== */
@media (max-width: 768px) {
    /* Table container - full-bleed scrolling */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -4vw;
        padding: 0 4vw;
        width: 100vw;
    }

    /* Base table layout */
    .schedule-table {
        min-width: 680px; /* Slightly wider for POCO's aspect ratio */
    }

    /* Cell optimizations */
    .schedule-table td {
        padding: 8px 3px;
        min-height: 44px;
        line-height: 1.3;
    }

    /* Text truncation */
    .booking strong {
        display: inline-block;
    /*    max-width: 20vw; /* Slightly wider for 1080px screens */
        overflow: hidden; 
    /*    text-overflow: ellipsis; */
        white-space: nowrap;
        font-size: 0.95rem;
   /*        // white-space: normal !important; /* Allow wrapping */
   /* // overflow: visible !important;  /* Prevent clipping */
    text-overflow: clip !important; /* Disable ellipsis (...) */
    max-width: none !important;    /* Remove max-width restrictions */
    }

    /* Notes optimization */
    .booking-notes {
        font-size: 0.78rem;
        line-height: 1.2;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        margin-top: 2px;
    }

    /* POCO-specific adjustments (1080x2400) */
    @media (min-width: 412px) and (max-width: 480px) {
        .booking strong {
            max-width: 24vw; /* More space for FHD+ resolution */
        }
        
        .schedule-table td {
            padding: 9px 4px;
        }
    }

    /* Smaller phone fallback */
    @media (max-width: 411px) {
        .booking strong {
            max-width: 18vw;
        }
        
        .book-btn {
            padding: 5px 8px;
            font-size: 0.75rem;
        }
    }
}

/* Optional: shrink arrows on small screens if needed */
@media (max-width: 600px) {
  .today-btn {
    padding: 6px 12px;
    font-size: 0.9rem;
  }

  .nav-arrow {
    font-size: 1.2rem;
    padding: 6px 8px;
  }

  .nav-wrapper {
    gap: 8px;
  }
}

/* Indoor Responsive Table Adjustments (Matching Outdoor) */

@media only screen and (max-width: 1200px) {
    /* Large screen adjustments for table container */
    .table-container {
        width: 90vw; /* Use 90% of the viewport width */
        margin: 0 auto;
    }
    table {
        font-size: 16px; /* Adjust font size for better readability on large tablets and below */
        padding: 8px 12px;
    }
}

@media only screen and (max-width: 992px) {
    /* Medium screen (tablets) adjustments */
    .table-container {
        width: 85vw; /* Ensure it scales properly */
    }
    table {
        font-size: 15px; /* Slightly smaller font */
        padding: 6px 10px; /* Adjust padding for tablets */
    }
}

@media only screen and (max-width: 768px) {
    /* Small screens (phones in landscape) */
    .table-container {
        width: 100vw; /* Full screen width for mobile */
    /*    padding: 5vw 2vw;  Add some padding for mobile devices */
    }
    table {
        font-size: 16px; /* Decrease font size */
        padding: 4px 8px; /* Adjust table padding */
    }
}

@media only screen and (max-width: 480px) {
    /* Very small screens (phones in portrait) */
    .table-container {
        width: 100vw; /* Full width for mobile phones */
     /*   padding: 4vw 2vw; */
    }
    table {
        font-size: 16px; /* Further decrease font size for mobile */
        padding: 2px 6px; /* Reduce padding for very small devices */
    }
    td, th {
        padding: 4px 6px; /* Adjust cell padding */
    }
}

/* Help Section Styling */
.help-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: Arial, sans-serif;
    line-height: 1.6;
}

.faq-index {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.faq-index h2 {
    margin-top: 0;
    color: #2c3e50;
}

.faq-index ul {
    columns: 2;
    list-style-type: none;
    padding: 0;
}

.faq-index li {
    margin-bottom: 8px;
}

.faq-index a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.3s;
}

.faq-index a:hover {
    color: #2980b9;
    text-decoration: underline;
}

section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

section:last-child {
    border-bottom: none;
}

section h2 {
    color: #2c3e50;
    margin-top: 30px;
}

.help-image {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 15px auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}


/* Responsive adjustments */
@media (max-width: 768px) {
    .faq-index ul {
        columns: 1;
    }
    
    .help-container {
        padding: 15px;
    }
    
    section {
        margin-bottom: 25px;
        padding-bottom: 15px;
    }
}

@media (max-width: 480px) {
    .help-container {
        padding: 10px;
    }
    
    h1 {
        font-size: 24px;
    }
    
    section h2 {
        font-size: 20px;
        margin-top: 20px;
    }
}

/* Keep all other existing styles below this line */