/**
 * ============================================
 * WIPERIGHT BOOKING SYSTEM - STYLESHEET
 * ============================================
 * 
 * This file contains all styles for the booking system widget.
 * It's designed to work as a standalone modal that can be embedded
 * into any page (CRM, Clients, Scheduler, etc.)
 * 
 * Sections:
 * 1. Container & Layout
 * 2. Client Selection
 * 3. Service Selection
 * 4. Booking Results & Slots
 * 5. Calendar Views (Weekly & Monthly)
 * 6. Buttons & Actions
 * 7. Animations & Effects
 * 8. Responsive Design
 */

/* ============================================
   1. CONTAINER & LAYOUT
   ============================================ */

/* Main container for the booking interface */
.smart-booking-container {
    max-width: 1200px;      /* Maximum width for large screens */
    margin: 0 auto;          /* Center the container */
    padding: 20px;           /* Breathing room around content */
}

/* Header section with title and description */
.booking-header {
    text-align: center;      /* Center the text */
    margin-bottom: 30px;     /* Space before next section */
    position: relative;      /* For positioning help button */
}

.booking-header h1 {
    color: #2c3e50;          /* Dark blue-gray text */
    margin-bottom: 10px;     
    display: inline-flex;    /* Allows icon and text to align */
    align-items: center;     /* Vertically center items */
    gap: 15px;               /* Space between icon and text */
}

.booking-header p {
    color: #7f8c8d;          /* Lighter gray for subtitle */
    font-size: 1.1em;        /* Slightly larger than body text */
}

/* Help button (?) in the header */
.help-button {
    width: 32px;
    height: 32px;
    border-radius: 50%;      /* Make it circular */
    background: #007bff;     /* Blue background */
    color: white;
    border: none;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,123,255,0.3);
}

.help-button:hover {
    background: #0056b3;     /* Darker blue on hover */
    transform: scale(1.1);   /* Grow slightly */
    box-shadow: 0 4px 10px rgba(0,123,255,0.4);
}

.help-button:active {
    transform: scale(0.95);  /* Shrink when clicked */
}

/* ============================================
   2. HELP MODAL
   ============================================ */

/* Full-screen overlay for help modal */
.help-modal {
    display: none;           /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);  /* Dark semi-transparent overlay */
    z-index: 10000;          /* On top of everything */
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(3px);    /* Blur the background */
}

.help-modal.active {
    display: flex;           /* Show as flexbox when active */
}

/* The white content box inside the modal */
.help-modal-content {
    background: white;
    border-radius: 16px;
    padding: 30px;
    max-width: 900px;
    max-height: 90vh;        /* Don't go taller than 90% of screen */
    overflow-y: auto;        /* Scroll if content too long */
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    position: relative;
    animation: slideIn 0.3s ease-out;  /* Slide in from top */
}

/* Slide in animation */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.help-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 15px;
}

.help-modal-header h2 {
    color: #2c3e50;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Close button (X) in help modal */
.help-close-btn {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: #f8f9fa;
    border: none;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    color: #6c757d;
}

.help-close-btn:hover {
    background: #e9ecef;
    color: #343a40;
    transform: rotate(90deg);    /* Spin on hover */
}

/* ============================================
   3. FLOWCHART STYLES (Help Modal)
   ============================================ */

.flowchart {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Each step in the flowchart */
.flowchart-step {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 20px;
    border-radius: 12px;
    border-left: 4px solid #007bff;    /* Blue accent on left */
    position: relative;
    transition: all 0.3s;
}

.flowchart-step:hover {
    transform: translateX(5px);        /* Slide right on hover */
    box-shadow: 0 4px 12px rgba(0,123,255,0.2);
}

/* Decision steps (yellow) */
.flowchart-step.decision {
    border-left-color: #ffc107;
    background: linear-gradient(135deg, #fff9e6 0%, #fff3cd 100%);
}

/* Success steps (green) */
.flowchart-step.success {
    border-left-color: #28a745;
    background: linear-gradient(135deg, #e8f5e9 0%, #d4edda 100%);
}

/* Error steps (red) */
.flowchart-step.error {
    border-left-color: #dc3545;
    background: linear-gradient(135deg, #ffebee 0%, #f8d7da 100%);
}

/* Numbered circle in each step */
.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: #007bff;
    color: white;
    border-radius: 50%;
    font-weight: bold;
    font-size: 14px;
    margin-right: 12px;
}

.flowchart-step.decision .step-number {
    background: #ffc107;
    color: #333;
}

.flowchart-step.success .step-number {
    background: #28a745;
}

.flowchart-step.error .step-number {
    background: #dc3545;
}

.step-title {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 16px;
}

.step-description {
    color: #6c757d;
    font-size: 14px;
    line-height: 1.6;
    margin-left: 40px;       /* Indent to align with title */
}

.step-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
    color: rgba(0,0,0,0.1);  /* Very light gray watermark */
}

/* Arrow between steps */
.flowchart-arrow {
    text-align: center;
    color: #007bff;
    font-size: 24px;
    margin: -5px 0;          /* Negative margin to reduce gap */
}

/* Yes/No branches in decision steps */
.flowchart-branches {
    display: grid;
    grid-template-columns: 1fr 1fr;    /* Two equal columns */
    gap: 15px;
    margin-top: 10px;
}

.branch {
    padding: 15px;
    border-radius: 8px;
    border: 2px solid;
}

.branch.yes {
    border-color: #28a745;   /* Green for yes */
    background: #e8f5e9;
}

.branch.no {
    border-color: #dc3545;   /* Red for no */
    background: #ffebee;
}

.branch-label {
    font-weight: bold;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.branch.yes .branch-label {
    color: #28a745;
}

.branch.no .branch-label {
    color: #dc3545;
}

.branch-text {
    font-size: 13px;
    color: #495057;
}

/* ============================================
   4. BOOKING FLOW LAYOUT
   ============================================ */

/* Two-column layout for client and service selection */
.booking-flow {
    display: grid;
    grid-template-columns: 1fr 1fr;    /* Two equal columns */
    gap: 30px;               /* Space between columns */
    margin-bottom: 30px;
}

/* ============================================
   5. CLIENT SELECTION
   ============================================ */

.client-selection {
    background: #f8f9fa;     /* Light gray background */
    padding: 25px;
    border-radius: 12px;
    border: 2px solid #e9ecef;
}

.client-selection h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Search box for clients */
.client-search {
    margin-bottom: 20px;
}

.client-search input {
    width: 100%;
    padding: 12px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.client-search input:focus {
    outline: none;
    border-color: #007bff;   /* Blue border when focused */
}

/* Scrollable list of clients */
.client-list {
    max-height: 300px;       /* Limit height, then scroll */
    overflow-y: auto;        /* Enable vertical scrolling */
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background: white;
}

/* Individual client item */
.client-item {
    padding: 15px;
    border-bottom: 1px solid #f1f3f4;
    cursor: pointer;         /* Show it's clickable */
    transition: background-color 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.client-item:hover {
    background-color: #f8f9fa;    /* Light hover effect */
}

.client-item.selected {
    background-color: #e3f2fd;    /* Blue when selected */
    border-left: 4px solid #2196f3;
}

.client-info {
    flex: 1;                 /* Takes up available space */
}

.client-name {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
}

.client-details {
    font-size: 0.9em;
    color: #6c757d;          /* Gray for address/contact info */
}

/* Square footage badge */
.client-sqft {
    background: #e8f5e8;     /* Light green */
    color: #2e7d32;          /* Dark green text */
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.client-sqft.missing {
    background: #fff3e0;     /* Orange when missing */
    color: #f57c00;
}

.client-warning {
    background: #fff3e0;
    color: #f57c00;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.7em;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.btn-add-sqft {
    background: #2196f3;
    color: white;
    border: none;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.7em;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-add-sqft:hover {
    background: #1976d2;
}

/* ============================================
   6. SERVICE SELECTION
   ============================================ */

.service-selection {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    border: 2px solid #e9ecef;
}

.service-selection h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.service-options {
    display: grid;
    gap: 15px;               /* Space between service options */
}

/* Each service option card */
.service-option {
    padding: 15px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    background: white;
}

.service-option:hover {
    border-color: #007bff;
    transform: translateY(-2px);    /* Lift up slightly */
}

.service-option.selected {
    border-color: #28a745;          /* Green border when selected */
    background-color: #f8fff9;      /* Very light green background */
}

/* Frequency option cards (for recurring) */
.frequency-option-card {
    transition: all 0.3s ease;
}

.frequency-option-card:hover {
    border-color: #007bff !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,123,255,0.2);
}

.frequency-option-card.selected {
    border-color: #28a745 !important;
    background-color: #f8fff9;
    box-shadow: 0 4px 12px rgba(40,167,69,0.3);
}

.service-option-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.service-name {
    font-weight: 600;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Service duration badge (e.g., "8-11 min per 100 sqft") */
.service-duration {
    background: #fff3cd;
    color: #856404;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: 600;
}

.service-description {
    color: #6c757d;
    font-size: 0.9em;
}

/* ============================================
   7. BOOKING RESULTS & AVAILABLE SLOTS
   ============================================ */

.booking-results {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    border: 2px solid #e9ecef;
    margin-top: 30px;
}

.booking-results h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Summary box showing calculation details */
.calculation-summary {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #dee2e6;
}

/* Each row in calculation (e.g., "Square Footage: 2500 sqft") */
.calculation-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding: 5px 0;
}

.calculation-row.total {
    font-weight: 600;
    color: #2c3e50;
    border-top: 2px solid #dee2e6;
    padding-top: 15px;
    margin-top: 15px;
}

.calculation-row.warning {
    background: #fff3e0;
    padding: 10px;
    border-radius: 5px;
    color: #f57c00;
    margin-top: 10px;
}

/* Container for available time slots */
.available-slots {
    margin-top: 20px;
}

/* Individual time slot card */
.slot-item {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 2px solid #dee2e6;
    margin-bottom: 15px;
    cursor: pointer;         /* Not clickable directly, button inside is */
    transition: all 0.3s;
}

.slot-item:hover {
    border-color: #28a745;
    transform: translateY(-2px);
}

/* Recommended slots (best option) */
.slot-item.recommended {
    border-color: #28a745;
    background: linear-gradient(135deg, #d4edda 0%, #ffffff 100%);
}

/* Sub-optimal slots (fewer employees, longer duration) */
.slot-item.sub-optimal {
    border-color: #ff9800;
    background: linear-gradient(135deg, #fff8f0 0%, #ffe0b2 100%);
}

/* Top row: Time and Badge */
.slot-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.slot-time {
    font-weight: 600;
    color: #2c3e50;
    font-size: 1.1em;
}

/* Badge (Recommended/Available/Sub-optimal) */
.slot-badge {
    background: #28a745;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: 600;
}

.slot-badge.recommended {
    background: #28a745;
}

.slot-badge.warning {
    background: #fff3e0;
    color: #f57c00;
}

/* Warning box inside slot (e.g., "Sub-optimal staffing") */
.slot-warning {
    background: #fff3e0;
    border: 1px solid #ffcc02;
    border-radius: 8px;
    padding: 8px 12px;
    margin: 8px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85em;
    color: #e65100;
}

.slot-warning i {
    color: #ff9800;
}

/* Slot details row (date, employees, duration) */
.slot-details {
    color: #6c757d;
    font-size: 0.9em;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;         /* Wrap on small screens */
}

.slot-detail {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* When no slots available */
.no-slots {
    text-align: center;
    padding: 40px;
    color: #6c757d;
}

.no-slots i {
    font-size: 3em;
    margin-bottom: 15px;
    color: #dee2e6;
}

/* Loading spinner */
.loading-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ============================================
   8. BUTTONS
   ============================================ */

/* Primary action buttons */
.btn-primary {
    background: #007bff;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,123,255,0.3);
}

/* Secondary/cancel buttons */
.btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background: #5a6268;
}

/* Confirm booking button (green) */
.btn-confirm-booking {
    background: #28a745;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
    width: 100%;
    margin-top: 15px;
}

.btn-confirm-booking:hover {
    background: #218838;
}

.btn-confirm-booking:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

/* ============================================
   9. MESSAGES (Error/Success)
   ============================================ */

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #f5c6cb;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.success-message {
    background: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #c3e6cb;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ============================================
   10. VIEW TOGGLE (List/Weekly/Monthly)
   ============================================ */

.view-toggle {
    display: flex;
    gap: 10px;
    margin: 20px 0;
    justify-content: center;
}

.view-btn {
    padding: 10px 20px;
    border: 2px solid #dee2e6;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.view-btn:hover {
    border-color: #007bff;
    background: #f8f9fa;
}

.view-btn.active {
    border-color: #007bff;
    background: #007bff;
    color: white;
}

/* ============================================
   11. CALENDAR VIEWS
   ============================================ */

.calendar-grid-view {
    background: white;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #dee2e6;
    margin-top: 20px;
}

/* Calendar header with navigation arrows */
.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.calendar-nav-btn {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.calendar-nav-btn:hover {
    background: #e9ecef;
}

#calendar-week-title,
#calendar-month-title {
    margin: 0;
    color: #2c3e50;
    font-size: 1.2em;
}

/* WEEKLY CALENDAR GRID - 7 columns (Sun-Sat) */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: #dee2e6;     /* Gap color between days */
    border-radius: 8px;
    overflow: hidden;
}

/* MONTHLY CALENDAR GRID */
.monthly-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: #dee2e6;
    border-radius: 0 0 8px 8px;
    overflow: hidden;
    border: 1px solid #dee2e6;
    border-top: none;
}

/* Monthly calendar day headers (Sun, Mon, Tue, etc.) */
.monthly-day-headers {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: #dee2e6;
    border-radius: 8px 8px 0 0;
    overflow: hidden;
    margin-bottom: 0;
}

.monthly-day-header {
    background: #6c757d;     /* Gray background */
    color: white;
    padding: 10px;
    text-align: center;
    font-weight: 600;
    font-size: 0.9em;
}

/* Individual day cell in monthly view */
.monthly-calendar-grid .calendar-day {
    min-height: 80px;        /* Smaller than weekly view */
    padding: 6px;
    background: white;
    position: relative;
    border-bottom: 1px solid #f1f3f4;
}

.monthly-calendar-grid .calendar-day-header {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.8em;
    margin-bottom: 6px;
    text-align: center;
}

.monthly-calendar-grid .calendar-day.other-month {
    background: #f8f9fa;     /* Dimmed for days outside current month */
    color: #6c757d;
}

.monthly-calendar-grid .calendar-day.today {
    background: #e3f2fd;     /* Light blue for today */
    border: 2px solid #2196f3;
}

.monthly-calendar-grid .calendar-day.weekend {
    background: #f8f9fa;
}

.monthly-calendar-grid .calendar-day.weekend.other-month {
    background: #f1f3f4;     /* Even more dimmed */
}

/* Individual day cell in weekly view */
.calendar-day {
    background: white;
    min-height: 120px;       /* Taller for more details */
    padding: 8px;
    position: relative;
}

.calendar-day-header {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.9em;
    margin-bottom: 8px;
    text-align: center;
}

.calendar-day.today {
    background: #e3f2fd;
}

.calendar-day.weekend {
    background: #f8f9fa;
}

/* ============================================
   12. TIME SLOTS IN CALENDAR
   ============================================ */

/* Time slot inside calendar day */
.time-slot {
    margin: 2px 0;
    padding: 4px 6px;
    border-radius: 4px;
    font-size: 0.8em;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}

/* Available time slot (green) */
.time-slot.available {
    background: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

.time-slot.available:hover {
    background: #c3e6cb;
    transform: scale(1.05);
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    z-index: 10;
}

/* Recommended time slot (best option - green with bold) */
.time-slot.recommended {
    background: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
    font-weight: 600;
    border-width: 2px;       /* Thicker border */
}

.time-slot.recommended:hover {
    background: #c3e6cb;
    transform: scale(1.05);
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    z-index: 10;
}

/* Show pointing hand on hover (weekly view) */
.time-slot.available::after,
.time-slot.recommended::after {
    content: ' 👈';
    opacity: 0;
    transition: opacity 0.2s;
    font-size: 0.9em;
}

.time-slot.available:hover::after,
.time-slot.recommended:hover::after {
    opacity: 1;
}

/* Busy/unavailable time slot (red) */
.time-slot.busy {
    background: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
    cursor: not-allowed;
}

/* Selected time slot (blue with animation) */
.time-slot.selected {
    background: #007bff !important;
    color: white !important;
    border-color: #0056b3 !important;
    box-shadow: 0 0 10px rgba(0, 123, 255, 0.5);
    animation: pulse 2s infinite;
}

/* Pulsing animation for selected slot */
@keyframes pulse {
    0%, 100% { box-shadow: 0 0 10px rgba(0, 123, 255, 0.5); }
    50% { box-shadow: 0 0 20px rgba(0, 123, 255, 0.8); }
}

/* Recurring date indicator (1st clean, 2nd clean, etc.) */
.recurring-indicator {
    margin-top: 4px;
    padding: 2px 4px;
    background: #fff3cd;
    border-radius: 3px;
    text-align: center;
    border: 1px solid #ff9800;
}

.time-slot-time {
    font-weight: 600;
    margin-bottom: 2px;
}

.time-slot-details {
    font-size: 0.7em;
    opacity: 0.8;
}

/* Monthly view specific time slots */
.monthly-calendar-grid .time-slot {
    margin: 1px 0;
    padding: 2px 4px;
    border-radius: 3px;
    font-size: 0.7em;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.monthly-calendar-grid .time-slot.available,
.monthly-calendar-grid .time-slot.recommended {
    background: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

.monthly-calendar-grid .time-slot.available:hover,
.monthly-calendar-grid .time-slot.recommended:hover {
    background: #c3e6cb;
    transform: scale(1.05);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    z-index: 10;
}

/* Show pointing up hand on hover (monthly view) */
.monthly-calendar-grid .time-slot.available::before,
.monthly-calendar-grid .time-slot.recommended::before {
    content: '👆 ';
    opacity: 0;
    transition: opacity 0.2s;
}

.monthly-calendar-grid .time-slot.available:hover::before,
.monthly-calendar-grid .time-slot.recommended:hover::before {
    opacity: 1;
}

.monthly-calendar-grid .time-slot.recommended {
    font-weight: 600;
    border-width: 2px;
}

.monthly-calendar-grid .time-slot.selected {
    background: #007bff !important;
    color: white !important;
    border-color: #0056b3 !important;
    box-shadow: 0 0 8px rgba(0, 123, 255, 0.5);
    animation: pulse 2s infinite;
}

.monthly-calendar-grid .time-slot-time {
    font-weight: 600;
    margin-bottom: 1px;
    font-size: 0.7em;
}

.monthly-calendar-grid .time-slot-details {
    font-size: 0.6em;
    opacity: 0.8;
}

/* ============================================
   13. CALENDAR LEGEND
   ============================================ */

.calendar-legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #dee2e6;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9em;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    border: 1px solid #dee2e6;
}

.legend-color.available {
    background: #d4edda;
    border-color: #c3e6cb;
}

.legend-color.recommended {
    background: #d4edda;
    border-color: #c3e6cb;
}

.legend-color.busy {
    background: #f8d7da;
    border-color: #f5c6cb;
}

/* ============================================
   14. RESPONSIVE DESIGN
   ============================================ */

/* Tablet and mobile adjustments */
@media (max-width: 768px) {
    /* Stack columns vertically on mobile */
    .booking-flow {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    /* Stack slot details vertically */
    .slot-details {
        flex-direction: column;
        gap: 10px;
    }

    /* Maintain 7-column grid for calendar */
    .calendar-grid {
        grid-template-columns: repeat(7, 1fr);
    }

    /* Smaller calendar days on mobile */
    .calendar-day {
        min-height: 80px;
        padding: 4px;
    }

    .time-slot {
        font-size: 0.7em;
        padding: 2px 4px;
    }

    /* Wrap legend items */
    .calendar-legend {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    /* Help modal adjustments */
    .help-modal-content {
        margin: 10px;
        padding: 20px;
        max-height: 85vh;
    }

    /* Stack flowchart branches vertically */
    .flowchart-branches {
        grid-template-columns: 1fr;
    }

    /* Remove indent on mobile */
    .step-description {
        margin-left: 0;
        margin-top: 8px;
    }
}

/* ============================================
   EXPLANATION OF KEY CONCEPTS:
   ============================================
   
   COLOR SCHEME:
   - Blue (#007bff): Primary actions, selected items
   - Green (#28a745): Success, available, recommended
   - Orange/Yellow (#ff9800, #ffc107): Warnings, sub-optimal
   - Red (#dc3545): Errors, busy slots, conflicts
   - Gray (#6c757d): Secondary text, disabled states
   
   TRANSITIONS:
   - Most elements have 0.2s-0.3s transitions
   - This makes hover effects smooth
   - transform: translateY(-2px) = lifts element up
   - transform: scale(1.05) = makes element slightly bigger
   
   Z-INDEX LAYERS:
   - 10: Hovered time slots (above other slots)
   - 9998-9999: Modal overlay and content (in booking-system-init.js)
   - 10000: Help modal (above booking modal)
   
   FLEXBOX vs GRID:
   - Flexbox: Used for horizontal layouts, centering
   - Grid: Used for calendar (7 columns), booking flow (2 columns)
*/

