/**
 * ==================================================================================
 * BABYLUGG BOOKING SYSTEM - MODERN REDESIGN
 * ==================================================================================
 * Version: 2.0
 * Erstellt: 2025-01-26
 *
 * Features:
 * ✓ Mobile-First Responsive Design
 * ✓ Professionelles Typografie-System
 * ✓ Modernes Farb- und Spacing-System
 * ✓ Accessibility (WCAG AA)
 * ✓ Touch-optimiert (min 44x44px Touch-Targets)
 * ✓ Animationen und Micro-Interactions
 * ✓ Inline-Validierung
 * ✓ Loading-States
 * ✓ Bottom-Sheet Pattern für Mobile
 * ==================================================================================
 */

/* ==================== CSS VARIABLES & DESIGN TOKENS ==================== */

:root {
    /* === Farben === */
    --bl-primary: #2A9F87;
    --bl-primary-light: #3DBCA2;
    --bl-primary-dark: #228973;
    --bl-primary-rgb: 42, 159, 135;

    --bl-secondary: #591670;
    --bl-secondary-light: #722089;
    --bl-secondary-dark: #450F5A;
    --bl-secondary-rgb: 89, 22, 112;

    --bl-success: #27ae60;
    --bl-success-light: #2ecc71;
    --bl-success-dark: #1e8449;

    --bl-error: #e74c3c;
    --bl-error-light: #ec7063;
    --bl-error-dark: #c0392b;

    --bl-warning: #f39c12;
    --bl-warning-light: #f8c471;
    --bl-warning-dark: #d68910;

    --bl-info: #3498db;
    --bl-info-light: #5dade2;
    --bl-info-dark: #2874a6;

    /* === Neutralfarben - CLEAN & SIMPLE === */
    --bl-gray-50: #FAFAFA;
    --bl-gray-100: #F5F5F5;
    --bl-gray-200: #EEEEEE;
    --bl-gray-300: #E0E0E0;
    --bl-gray-400: #BDBDBD;
    --bl-gray-500: #9E9E9E;
    --bl-gray-600: #757575;
    --bl-gray-700: #616161;
    --bl-gray-800: #424242;
    --bl-gray-900: #212121;

    --bl-text-primary: #000000;
    --bl-text-secondary: #424242;
    --bl-text-tertiary: #757575;

    --bl-bg-primary: #FFFFFF;
    --bl-bg-secondary: #FFFFFF;
    --bl-bg-tertiary: #FAFAFA;
    --bl-bg-modal: #FFFFFF;

    /* === Spacing System (8px Base Grid) === */
    --bl-space-1: 0.25rem;  /* 4px */
    --bl-space-2: 0.5rem;   /* 8px */
    --bl-space-3: 0.75rem;  /* 12px */
    --bl-space-4: 1rem;     /* 16px */
    --bl-space-5: 1.25rem;  /* 20px */
    --bl-space-6: 1.5rem;   /* 24px */
    --bl-space-8: 2rem;     /* 32px */
    --bl-space-10: 2.5rem;  /* 40px */
    --bl-space-12: 3rem;    /* 48px */
    --bl-space-16: 4rem;    /* 64px */
    --bl-space-20: 5rem;    /* 80px */

    /* === Typografie === */
    --bl-font-family-base: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --bl-font-family-heading: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    --bl-font-size-xs: 0.75rem;     /* 12px */
    --bl-font-size-sm: 0.875rem;    /* 14px */
    --bl-font-size-base: 1rem;      /* 16px */
    --bl-font-size-lg: 1.125rem;    /* 18px */
    --bl-font-size-xl: 1.25rem;     /* 20px */
    --bl-font-size-2xl: 1.5rem;     /* 24px */
    --bl-font-size-3xl: 1.875rem;   /* 30px */
    --bl-font-size-4xl: 2.25rem;    /* 36px */

    --bl-font-weight-normal: 400;
    --bl-font-weight-medium: 500;
    --bl-font-weight-semibold: 600;
    --bl-font-weight-bold: 700;

    --bl-line-height-tight: 1.25;
    --bl-line-height-normal: 1.5;
    --bl-line-height-relaxed: 1.6;

    /* === Border Radius === */
    --bl-radius-sm: 0.375rem;   /* 6px */
    --bl-radius-md: 0.5rem;     /* 8px */
    --bl-radius-lg: 0.75rem;    /* 12px */
    --bl-radius-xl: 1rem;       /* 16px */
    --bl-radius-2xl: 1.5rem;    /* 24px */
    --bl-radius-full: 9999px;

    /* === Shadows === */
    --bl-shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
    --bl-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    --bl-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --bl-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --bl-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --bl-shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);

    /* === Transitions === */
    --bl-transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --bl-transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --bl-transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);

    /* === Z-Index === */
    --bl-z-modal-backdrop: 2999;
    --bl-z-modal: 3000;
    --bl-z-modal-header: 3100;
    --bl-z-dropdown: 3200;

    /* === Breakpoints (für Referenz) === */
    /* 320px - Mobile S */
    /* 375px - Mobile M */
    /* 425px - Mobile L */
    /* 768px - Tablet */
    /* 1024px - Laptop */
    /* 1440px - Desktop */
}

/* ==================== MODAL BACKDROP & CONTAINER ==================== */

#booking-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: var(--bl-z-modal-backdrop);
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    animation: fadeIn var(--bl-transition-base);
}

#booking-modal.is-open {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==================== MODAL CONTENT ==================== */

#booking-modal .modal-content {
    position: relative;
    background: #FFFFFF !important;
    margin: var(--bl-space-10) auto;
    padding: var(--bl-space-8);
    width: 90%;
    max-width: 750px;
    border-radius: 16px !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15) !important;
    animation: slideUp var(--bl-transition-slow);
    box-sizing: border-box;
    overflow-x: hidden;
    border: 1px solid #E0E0E0 !important;
}

/* === Close Button === */
#booking-modal .close-button {
    position: absolute;
    top: var(--bl-space-4);
    right: var(--bl-space-4);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #F5F5F5;
    border: 2px solid #E0E0E0;
    border-radius: 50%;
    font-size: 1.75rem;
    line-height: 1;
    color: #000000;
    cursor: pointer;
    transition: all var(--bl-transition-base);
    z-index: var(--bl-z-modal-header);
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

#booking-modal .close-button:hover {
    background: #E0E0E0;
    color: #000000;
    transform: rotate(90deg);
}

#booking-modal .close-button:active {
    transform: rotate(90deg) scale(0.95);
}

/* ==================== MODAL HEADER ==================== */

#booking-modal h2,
#booking-modal .booking-modal-title {
    font-family: var(--bl-font-family-heading);
    font-size: 28px !important;
    font-weight: 700 !important;
    color: #000000 !important;
    margin: 0 var(--bl-space-16) var(--bl-space-6) 0;
    line-height: var(--bl-line-height-tight);
}

/* ==================== PROGRESS INDICATOR ==================== */

.booking-progress {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--bl-space-8) 0 var(--bl-space-6);
    margin-bottom: var(--bl-space-6);
    position: relative;
}

.progress-line {
    position: absolute;
    top: 34px;
    left: 10%;
    right: 10%;
    height: 3px;
    background: var(--bl-gray-200);
    z-index: 1;
    border-radius: var(--bl-radius-full);
}

.progress-line-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--bl-primary), var(--bl-primary-light));
    border-radius: var(--bl-radius-full);
    transition: width var(--bl-transition-slow);
    box-shadow: 0 0 12px rgba(var(--bl-primary-rgb), 0.4);
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--bl-space-2);
    flex: 1;
    position: relative;
    z-index: 2;
}

.progress-step-circle {
    width: 52px;
    height: 52px;
    border-radius: var(--bl-radius-full);
    background: var(--bl-bg-primary);
    border: 3px solid var(--bl-gray-300);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--bl-font-family-heading);
    font-weight: var(--bl-font-weight-bold);
    font-size: var(--bl-font-size-lg);
    color: var(--bl-gray-400);
    transition: all var(--bl-transition-base);
    box-shadow: var(--bl-shadow-sm);
}

.progress-step.active .progress-step-circle {
    background: var(--bl-primary);
    color: white;
    border-color: var(--bl-primary);
    box-shadow: 0 0 0 8px rgba(var(--bl-primary-rgb), 0.12),
                var(--bl-shadow-md);
    transform: scale(1.08);
}

.progress-step.completed .progress-step-circle {
    background: var(--bl-success);
    color: white;
    border-color: var(--bl-success);
    box-shadow: var(--bl-shadow-sm);
}

.progress-step.completed .progress-step-circle::after {
    content: '✓';
    font-size: var(--bl-font-size-xl);
}

.progress-step.completed .progress-step-circle:not(:has(.progress-step-number)) {
    font-size: 0;
}

.progress-step-label {
    font-size: var(--bl-font-size-xs);
    font-weight: var(--bl-font-weight-medium);
    color: var(--bl-text-tertiary);
    text-align: center;
    max-width: 90px;
    line-height: var(--bl-line-height-tight);
}

.progress-step.active .progress-step-label {
    color: var(--bl-primary);
    font-weight: var(--bl-font-weight-semibold);
}

.progress-step.completed .progress-step-label {
    color: var(--bl-success);
}

/* ==================== BOOKING STEPS ==================== */

.booking-steps {
    display: flex;
    flex-direction: column;
    gap: var(--bl-space-6);
    margin-bottom: var(--bl-space-6);
    width: 100%;
    box-sizing: border-box;
}

.booking-step {
    background: #FFFFFF;
    border: 2px solid #E0E0E0;
    border-radius: 12px;
    padding: var(--bl-space-6);
    transition: all var(--bl-transition-base);
    width: 100%;
    box-sizing: border-box;
}

.booking-step:not(.is-disabled) {
    border-color: #2A9F87;
    background: #FFFFFF;
    box-shadow: 0 2px 8px rgba(42, 159, 135, 0.15);
}

.booking-step.is-disabled {
    opacity: 0.5;
    pointer-events: none;
    user-select: none;
}

.booking-step h4 {
    font-family: var(--bl-font-family-heading);
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #000000 !important;
    margin: 0 0 var(--bl-space-4);
    display: flex;
    align-items: center;
    gap: var(--bl-space-3);
    border-bottom: none !important;
    padding-bottom: 0 !important;
}

.booking-step h4::before {
    content: '';
    width: 4px;
    height: 24px;
    background: #2A9F87 !important;
    border-radius: 2px;
}

/* ==================== FORM ELEMENTS ==================== */

/* === Labels === */
#booking-modal label {
    display: block;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #000000 !important;
    margin-bottom: var(--bl-space-2);
}

/* === Input Fields === */
#booking-modal input[type="text"],
#booking-modal input[type="email"],
#booking-modal input[type="tel"],
#booking-modal input[type="number"],
#booking-modal select,
#booking-modal textarea {
    width: 100%;
    min-height: 52px;
    padding: var(--bl-space-3) var(--bl-space-4);
    font-family: var(--bl-font-family-base);
    font-size: 16px !important;
    color: #000000 !important;
    background: #FFFFFF !important;
    border: 2px solid #E0E0E0 !important;
    border-radius: 8px !important;
    transition: all var(--bl-transition-base);
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: none;
}

#booking-modal input::placeholder,
#booking-modal textarea::placeholder {
    color: var(--bl-gray-400);
}

#booking-modal input:hover,
#booking-modal select:hover,
#booking-modal textarea:hover {
    border-color: #2A9F87 !important;
}

#booking-modal input:focus,
#booking-modal select:focus,
#booking-modal textarea:focus {
    outline: none !important;
    border-color: #2A9F87 !important;
    background: #FFFFFF !important;
    box-shadow: 0 0 0 3px rgba(42, 159, 135, 0.15) !important;
}

#booking-modal input.error,
#booking-modal select.error,
#booking-modal textarea.error {
    border-color: var(--bl-error);
}

#booking-modal input.error:focus,
#booking-modal select.error:focus,
#booking-modal textarea.error:focus {
    box-shadow: 0 0 0 4px rgba(231, 76, 60, 0.1);
}

/* === Textarea === */
#booking-modal textarea {
    min-height: 120px;
    padding-top: var(--bl-space-3);
    resize: vertical;
    line-height: var(--bl-line-height-relaxed);
}

/* === Select Dropdown === */
#booking-modal select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%234B5563' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right var(--bl-space-3) center;
    background-size: 20px;
    padding-right: var(--bl-space-10);
    cursor: pointer;
}

/* === Radio Buttons & Checkboxes === */
#booking-modal input[type="radio"],
#booking-modal input[type="checkbox"] {
    width: 20px;
    height: 20px;
    min-height: auto;
    accent-color: var(--bl-primary);
    cursor: pointer;
}

/* === Radio/Checkbox Labels === */
.delivery-options label,
.payment-options label {
    display: flex;
    align-items: center;
    gap: var(--bl-space-3);
    padding: var(--bl-space-4);
    margin-bottom: 0;
    background: #FFFFFF !important;
    border: 2px solid #E0E0E0 !important;
    border-radius: 8px !important;
    cursor: pointer;
    transition: all var(--bl-transition-base);
    font-weight: 600 !important;
    font-size: 16px !important;
    color: #000000 !important;
    min-height: 56px;
}

.delivery-options label:hover,
.payment-options label:hover {
    border-color: #2A9F87 !important;
    background: #FFFFFF !important;
}

.delivery-options label:has(input:checked),
.payment-options label:has(input:checked) {
    border-color: #2A9F87 !important;
    background: #E8F5F3 !important;
    box-shadow: 0 2px 8px rgba(42, 159, 135, 0.15) !important;
}

/* ==================== DELIVERY & PAYMENT OPTIONS ==================== */

.delivery-options,
.payment-options {
    display: flex;
    flex-direction: column;
    gap: var(--bl-space-3);
    width: 100%;
    box-sizing: border-box;
}

.payment-section {
    width: 100%;
    box-sizing: border-box;
}

#pickup-info {
    display: none;
    background: #F5F5F5 !important;
    padding: var(--bl-space-3) var(--bl-space-4);
    border-radius: 8px !important;
    font-size: 14px !important;
    margin-top: var(--bl-space-3);
    border-left: 4px solid #2A9F87 !important;
    color: #000000 !important;
    font-weight: 600 !important;
}

.pickup-times {
    display: none;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--bl-space-4);
    margin-top: var(--bl-space-4);
}

.pickup-times > div {
    display: flex;
    flex-direction: column;
}

.pickup-times select {
    min-height: 44px !important;
    height: 44px;
    padding: 8px 12px !important;
}

/* ==================== CUSTOMER DETAILS GRID ==================== */

.customer-details-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--bl-space-4);
    width: 100%;
    box-sizing: border-box;
}

.customer-details-grid > div:has(#customer-email),
.customer-details-grid > div:has(#customer-street) {
    grid-column: 1 / -1;
}

.customer-notes-container {
    margin-top: var(--bl-space-4);
    width: 100%;
    box-sizing: border-box;
}

/* ==================== CALENDAR CONTAINER - KOMPLETT NEU ==================== */

#calendar-container {
    min-height: 360px;
    width: 100%;
    display: block;
    margin: var(--bl-space-4) 0;
    padding: 0;
    background: white;
    border-radius: var(--bl-radius-lg);
    border: 2px solid var(--bl-gray-300);
    box-sizing: border-box;
    overflow: hidden;
}

/*
 * ==================================================================================
 * FLATPICKR STYLES ENTFERNT
 * ==================================================================================
 * Alle Flatpickr-Styles wurden entfernt.
 * Wir nutzen jetzt den Native Calendar (siehe native-calendar.css)
 * ==================================================================================
 */

/*
/* ALTE FLATPICKR STYLES ENTFERNT - siehe flatpickr-custom.css */

.calendar-loader {
    color: var(--bl-text-secondary);
    font-size: var(--bl-font-size-sm);
    text-align: center;
    padding: var(--bl-space-8);
}

/* ==================== COUPON CONTAINER ==================== */

.coupon-container {
    display: flex;
    gap: var(--bl-space-3);
    margin: var(--bl-space-6) 0;
    width: 100%;
    box-sizing: border-box;
}

.coupon-container input {
    flex: 1;
    width: auto;
    max-width: calc(100% - 140px);
}

.coupon-container button {
    flex-shrink: 0;
    width: auto;
    padding: 0 var(--bl-space-6);
}

#coupon-status {
    font-size: var(--bl-font-size-sm);
    font-weight: var(--bl-font-weight-medium);
    margin-top: var(--bl-space-2);
    min-height: 20px;
}

/* ==================== PRICE SUMMARY ==================== */

.price-summary {
    background: #FFFFFF;
    border: 2px solid #2A9F87;
    border-radius: 12px;
    padding: var(--bl-space-6);
    margin: var(--bl-space-6) 0;
    width: 100%;
    box-sizing: border-box;
    box-shadow: 0 4px 12px rgba(42, 159, 135, 0.1);
}

.price-summary h4 {
    font-family: var(--bl-font-family-heading);
    font-size: 18px;
    font-weight: 700;
    color: #000000;
    margin: 0 0 var(--bl-space-4);
}

.price-summary p {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: var(--bl-space-2) 0;
    font-size: 16px;
    color: #000000;
}

.price-summary p strong {
    color: #000000;
    font-weight: 600;
}

.price-summary p:has(b) {
    font-size: 20px;
    font-weight: 700;
    color: #000000;
    margin-top: var(--bl-space-4);
    padding-top: var(--bl-space-4);
    border-top: 2px solid #E0E0E0;
}

.price-summary p:has(b) strong {
    color: #2A9F87;
    font-size: 24px;
    font-weight: 700;
}

.price-summary hr {
    margin: var(--bl-space-4) 0;
    border: none;
    height: 2px;
    background: var(--bl-gray-200);
}

/* ==================== BUTTONS ==================== */

#booking-modal .button,
#booking-modal button:not(.close-button) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--bl-space-2);
    min-height: 56px;
    padding: var(--bl-space-4) var(--bl-space-6);
    font-family: var(--bl-font-family-heading);
    font-size: var(--bl-font-size-base);
    font-weight: var(--bl-font-weight-semibold);
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: var(--bl-radius-lg);
    cursor: pointer;
    transition: all var(--bl-transition-base);
    box-sizing: border-box;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

/* === Primary Button === */
#booking-modal .button,
#booking-modal .button-primary,
#booking-modal button[type="submit"],
#cash-booking-btn {
    background: #2A9F87 !important;
    color: #FFFFFF !important;
    font-weight: 700 !important;
    font-size: 16px !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(42, 159, 135, 0.3) !important;
}

#booking-modal .button:hover,
#booking-modal .button-primary:hover,
#cash-booking-btn:hover {
    background: #228973 !important;
    box-shadow: 0 6px 16px rgba(42, 159, 135, 0.4) !important;
    transform: translateY(-2px) !important;
}

#booking-modal .button:active,
#booking-modal .button-primary:active,
#cash-booking-btn:active {
    background: #1a6f5d !important;
    transform: translateY(0) !important;
    box-shadow: 0 2px 8px rgba(42, 159, 135, 0.3) !important;
}

/* === Secondary Button (Gutscheincode) === */
#booking-modal .button-secondary,
#apply-coupon-btn {
    background: #FFFFFF !important;
    color: #000000 !important;
    border: 2px solid #E0E0E0 !important;
    font-weight: 600 !important;
    font-size: 16px !important;
    box-shadow: none !important;
}

#booking-modal .button-secondary:hover,
#apply-coupon-btn:hover {
    background: #2A9F87 !important;
    color: #FFFFFF !important;
    border-color: #2A9F87 !important;
    box-shadow: 0 4px 12px rgba(42, 159, 135, 0.2) !important;
}

#booking-modal .button-secondary:active,
#apply-coupon-btn:active {
    background: #228973 !important;
    color: #FFFFFF !important;
    border-color: #228973 !important;
}

/* === Disabled State === */
#booking-modal button:disabled,
#booking-modal .button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
    box-shadow: none;
}

/* === Loading State === */
#booking-modal button.loading,
#booking-modal .button.loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

#booking-modal button.loading::after,
#booking-modal .button.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spinner 0.6s linear infinite;
}

@keyframes spinner {
    to {
        transform: rotate(360deg);
    }
}

/* ==================== PAYPAL CONTAINER ==================== */

#paypal-button-container {
    margin: var(--bl-space-6) 0;
    min-height: 56px;
}

/* ==================== NOTIFICATIONS & MESSAGES ==================== */

/* === Info Messages === */
#weekend-booking-notice,
#accessory-confirmation-container {
    padding: var(--bl-space-4);
    border-radius: var(--bl-radius-lg);
    font-size: var(--bl-font-size-sm);
    margin: var(--bl-space-4) 0;
    border-left: 4px solid;
    display: flex;
    gap: var(--bl-space-3);
}

#weekend-booking-notice {
    background: rgba(42, 159, 135, 0.08);
    border-color: var(--bl-primary);
    color: var(--bl-text-secondary);
}

#accessory-confirmation-container {
    background: rgba(243, 156, 18, 0.08);
    border-color: var(--bl-warning);
}

#accessory-confirmation-container label {
    display: flex;
    align-items: flex-start;
    gap: var(--bl-space-3);
    margin: 0;
    cursor: pointer;
}

#accessory-confirmation-container input[type="checkbox"] {
    margin-top: 2px;
    flex-shrink: 0;
}

/* === Error Messages === */
.error-message,
.field-error {
    display: block;
    color: var(--bl-error);
    font-size: var(--bl-font-size-sm);
    font-weight: var(--bl-font-weight-medium);
    margin-top: var(--bl-space-2);
    padding: var(--bl-space-2) var(--bl-space-3);
    background: rgba(231, 76, 60, 0.08);
    border-left: 3px solid var(--bl-error);
    border-radius: var(--bl-radius-sm);
}

/* === Success Messages === */
.success-message {
    display: block;
    color: var(--bl-success);
    font-size: var(--bl-font-size-sm);
    font-weight: var(--bl-font-weight-medium);
    margin-top: var(--bl-space-2);
    padding: var(--bl-space-2) var(--bl-space-3);
    background: rgba(39, 174, 96, 0.08);
    border-left: 3px solid var(--bl-success);
    border-radius: var(--bl-radius-sm);
}

/* ==================== BOOKING CONFIRMATION VIEW ==================== */

#booking-confirmation-view {
    display: none;
    text-align: center;
    padding: var(--bl-space-10) var(--bl-space-6);
}

#booking-modal.is-confirmed .booking-form-content {
    display: none;
}

#booking-modal.is-confirmed #booking-confirmation-view {
    display: block;
}

#booking-confirmation-view svg {
    margin: 0 auto var(--bl-space-6);
    animation: scaleIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

#booking-confirmation-view h2 {
    color: var(--bl-success);
    font-size: var(--bl-font-size-3xl);
    margin-bottom: var(--bl-space-3);
}

#booking-confirmation-view p {
    font-size: var(--bl-font-size-base);
    color: var(--bl-text-secondary);
    line-height: var(--bl-line-height-relaxed);
    margin-bottom: var(--bl-space-6);
}

#booking-summary-details {
    background: var(--bl-bg-secondary);
    border-radius: var(--bl-radius-lg);
    padding: var(--bl-space-6);
    text-align: left;
    margin-bottom: var(--bl-space-6);
}

/* ==================== AUTOFILL DROPDOWN ==================== */

.autofill-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: var(--bl-z-dropdown);
    background: var(--bl-bg-primary);
    border: 2px solid var(--bl-gray-300);
    border-radius: var(--bl-radius-lg);
    box-shadow: var(--bl-shadow-lg);
    max-height: 280px;
    overflow-y: auto;
    display: none;
}

.autofill-dropdown.is-visible {
    display: block;
}

.autofill-item {
    padding: var(--bl-space-3) var(--bl-space-4);
    cursor: pointer;
    transition: background var(--bl-transition-fast);
    border-bottom: 1px solid var(--bl-gray-100);
}

.autofill-item:last-child {
    border-bottom: none;
}

.autofill-item:hover,
.autofill-item.highlighted {
    background: rgba(var(--bl-primary-rgb), 0.08);
}

.autofill-item-email {
    font-size: var(--bl-font-size-sm);
    font-weight: var(--bl-font-weight-medium);
    color: var(--bl-text-primary);
    margin-bottom: var(--bl-space-1);
}

.autofill-item-details {
    font-size: var(--bl-font-size-xs);
    color: var(--bl-text-secondary);
}

/* ==================== RESPONSIVE DESIGN - TABLET ==================== */

@media (max-width: 1024px) {
    #booking-modal .modal-content {
        width: 95%;
        padding: var(--bl-space-6);
        margin: var(--bl-space-8) auto;
    }

    #booking-modal h2 {
        font-size: var(--bl-font-size-2xl);
    }

    .progress-step-circle {
        width: 48px;
        height: 48px;
        font-size: var(--bl-font-size-base);
    }

    .customer-details-grid {
        grid-template-columns: 1fr;
    }

    .customer-details-grid > div:has(#customer-email),
    .customer-details-grid > div:has(#customer-street) {
        grid-column: 1;
    }
}

/* ==================== RESPONSIVE DESIGN - MOBILE ==================== */

@media (max-width: 768px) {

    /* === Modal als Bottom Sheet === */
    #booking-modal {
        align-items: flex-end;
    }

    #booking-modal .modal-content {
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: var(--bl-space-6) var(--bl-space-4) calc(var(--bl-space-6) + env(safe-area-inset-bottom));
        border-radius: var(--bl-radius-2xl) var(--bl-radius-2xl) 0 0;
        max-height: 92vh;
        overflow-y: auto;
        animation: slideUpMobile 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    @keyframes slideUpMobile {
        from {
            transform: translateY(100%);
        }
        to {
            transform: translateY(0);
        }
    }

    /* === Close Button Mobile === */
    #booking-modal .close-button {
        position: sticky;
        top: var(--bl-space-4);
        right: var(--bl-space-4);
        margin-left: auto;
        margin-bottom: calc(-48px - var(--bl-space-4));
        width: 44px;
        height: 44px;
        font-size: 1.5rem;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        box-shadow: var(--bl-shadow-lg);
    }

    /* === Header Mobile === */
    #booking-modal h2 {
        font-size: var(--bl-font-size-xl);
        margin-right: 0;
        margin-bottom: var(--bl-space-4);
    }

    /* === Progress Indicator Mobile === */
    .booking-progress {
        padding: var(--bl-space-4) 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin-bottom: var(--bl-space-4);
    }

    .progress-step {
        flex: 0 0 auto;
        min-width: 70px;
    }

    .progress-step-circle {
        width: 44px;
        height: 44px;
        font-size: var(--bl-font-size-sm);
    }

    .progress-step.active .progress-step-circle {
        box-shadow: 0 0 0 6px rgba(var(--bl-primary-rgb), 0.12),
                    var(--bl-shadow-sm);
    }

    .progress-step-label {
        font-size: 11px;
        max-width: 70px;
    }

    .progress-line {
        top: 30px;
    }

    /* === Booking Steps Mobile === */
    .booking-step {
        padding: var(--bl-space-4);
    }

    .booking-step h4 {
        font-size: var(--bl-font-size-base);
    }

    /* === Form Elements Mobile === */
    #booking-modal input,
    #booking-modal select,
    #booking-modal textarea {
        font-size: 16px; /* Verhindert iOS Zoom */
        min-height: 52px;
    }

    /* === Calendar Mobile === */
    #calendar-container {
        min-height: 380px;
    }

    /* ALTE FLATPICKR MOBILE STYLES ENTFERNT - siehe flatpickr-custom.css */

    /* === Buttons Mobile === */
    #booking-modal .button,
    #booking-modal button:not(.close-button) {
        width: 100%;
        min-height: 52px;
        padding: var(--bl-space-3) var(--bl-space-4);
        font-size: var(--bl-font-size-base);
    }

    /* === Coupon Container Mobile === */
    .coupon-container {
        flex-direction: column;
    }

    .coupon-container button {
        width: 100%;
    }

    /* === Pickup Times Mobile === */
    .pickup-times {
        grid-template-columns: 1fr;
    }

    /* === Delivery/Payment Options Mobile === */
    .delivery-options label,
    .payment-options label {
        min-height: 52px;
        padding: var(--bl-space-3);
    }
}

/* ==================== MOBILE - SMALL DEVICES ==================== */

@media (max-width: 380px) {
    #booking-modal .modal-content {
        padding: var(--bl-space-4) var(--bl-space-3) calc(var(--bl-space-4) + env(safe-area-inset-bottom));
    }

    #booking-modal h2 {
        font-size: var(--bl-font-size-lg);
    }

    .booking-step {
        padding: var(--bl-space-3);
    }

    .progress-step-circle {
        width: 40px;
        height: 40px;
        font-size: var(--bl-font-size-sm);
    }

    .price-summary {
        padding: var(--bl-space-4);
    }
}

/* ==================== ACCESSIBILITY ==================== */

/* === Focus Visible === */
#booking-modal *:focus-visible {
    outline: 3px solid var(--bl-primary);
    outline-offset: 2px;
}

#booking-modal button:focus-visible,
#booking-modal .button:focus-visible {
    outline-offset: 4px;
}

/* === Reduced Motion === */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* === High Contrast Mode === */
@media (prefers-contrast: high) {
    #booking-modal input,
    #booking-modal select,
    #booking-modal textarea,
    .booking-step,
    .delivery-options label,
    .payment-options label {
        border-width: 3px;
    }
}

/* ==================== PRINT STYLES ==================== */

@media print {
    #booking-modal {
        position: static;
        background: white;
    }

    #booking-modal .modal-content {
        box-shadow: none;
        max-width: 100%;
    }

    #booking-modal .close-button,
    #booking-modal button,
    #booking-modal .button {
        display: none;
    }
}

/* ==================== DARK MODE SUPPORT (Optional) ==================== */

@media (prefers-color-scheme: dark) {
    :root {
        --bl-bg-primary: #1F2937;
        --bl-bg-secondary: #111827;
        --bl-bg-tertiary: #374151;
        --bl-text-primary: #F9FAFB;
        --bl-text-secondary: #D1D5DB;
        --bl-text-tertiary: #9CA3AF;
        --bl-gray-300: #4B5563;
        --bl-gray-200: #374151;
        --bl-gray-100: #1F2937;
    }

    #booking-modal {
        background-color: rgba(0, 0, 0, 0.8);
    }

    #booking-modal input,
    #booking-modal select,
    #booking-modal textarea {
        background: var(--bl-bg-secondary);
        color: var(--bl-text-primary);
        border-color: var(--bl-gray-300);
    }
}

/* ==================== UTILITIES ==================== */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.text-center {
    text-align: center;
}

.hidden {
    display: none !important;
}

.visible {
    display: block !important;
}

/* ==================== END OF FILE ==================== */
