/**
 * Booking Wizard CSS
 * Mobile-first responsive layout for multi-step booking flow
 */

/* ===========================
   Container & Base Layout
   =========================== */

.booking-wizard {
    width: 100%;
    padding: 15px;
    margin: 0 auto;
}

.booking-wizard__container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ===========================
   Main Content Area
   =========================== */

.booking-wizard__main {
    width: 100%;
    background: transparent;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
}

/* ===========================
   Step Content Areas
   =========================== */

.booking-wizard__step,
.booking-step {
    display: none;
    visibility: hidden;
}

.booking-wizard__step--active,
.booking-step.active {
    display: block;
    visibility: visible;
}

/* ===========================
   Step Header
   =========================== */

.booking-wizard__step-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: none;
}

.booking-wizard__step-title {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 10px 0;
}

/* Suppress browser focus ring on headings that receive programmatic focus
   via booking-wizard.js accessibility focus management.
   These use tabindex="-1" so they're not keyboard-tabbable — safe to hide. */
.booking-step h2[tabindex="-1"]:focus,
.booking-step h3[tabindex="-1"]:focus,
.booking-step h2[tabindex="-1"]:focus-visible,
.booking-step h3[tabindex="-1"]:focus-visible,
.booking-wizard__step h2[tabindex="-1"]:focus,
.booking-wizard__step h3[tabindex="-1"]:focus,
.booking-wizard__step h2[tabindex="-1"]:focus-visible,
.booking-wizard__step h3[tabindex="-1"]:focus-visible {
    outline: none;
    box-shadow: none;
    border: none;
}

.booking-wizard__step-description {
    font-size: 16px;
    color: #6b7280;
    margin: 0;
    line-height: 1.6;
}

/* ===========================
   Step Navigation Buttons
   =========================== */

.booking-wizard__navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: none;
}

.booking-wizard__btn {
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 44px;
    min-width: 120px;
}

.booking-wizard__btn--prev {
    background: #f3f4f6;
    color: #374151;
}

.booking-wizard__btn--prev:hover {
    background: #e5e7eb;
}

.booking-wizard__btn--next,
.booking-wizard__btn--confirm {
    background: #2563eb;
    color: #FFFFFF;
}

.booking-wizard__btn--next:hover,
.booking-wizard__btn--confirm:hover {
    background: #1d4ed8;
}

.booking-wizard__btn:disabled {
    background: #d1d5db;
    color: #9ca3af;
    cursor: not-allowed;
}

.booking-wizard__btn:focus {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

/* ===========================
   Price Panel Sidebar
   =========================== */

.booking-wizard__sidebar {
    width: 100%;
    position: relative;
}

/* ===========================
   Loading States
   =========================== */

.booking-wizard__loading {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}

.booking-wizard__loading--active {
    display: block;
}

.booking-wizard__spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f4f6;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===========================
   Tablet Layout (768px+)
   =========================== */

@media (min-width: 768px) {
    .booking-wizard {
        padding: 30px;
    }

    .booking-wizard__main {
        padding: 30px;
    }

    .booking-wizard__step-title {
        font-size: 28px;
    }

    .booking-wizard__step-description {
        font-size: 17px;
    }

    .booking-wizard__navigation {
        gap: 20px;
    }

    .booking-wizard__btn {
        min-width: 140px;
        padding: 14px 28px;
        font-size: 17px;
    }
}

/* ===========================
   Desktop Layout (1024px+)
   =========================== */

@media (min-width: 1024px) {
    .booking-wizard {
        max-width: 1200px;
        padding: 40px;
    }

    .booking-wizard__container {
        flex-direction: row;
        gap: 30px;
    }

    /* Main content: 65% width */
    .booking-wizard__main {
        flex: 0 0 calc(65% - 15px);
        padding: 40px;
    }

    /* Sidebar: 35% width - pushed to right with solid background */
    .booking-wizard__sidebar {
        flex: 0 0 calc(35% - 15px);
        position: sticky;
        top: 100px;
        align-self: flex-start;
        max-height: calc(100vh - 120px);
        overflow-y: auto;
        background: #FFFFFF;
        padding: 24px;
        border-radius: 20px;
        border: none;
        box-shadow: 0 12px 35px -6px rgba(15, 23, 42, 0.08), 0 4px 12px -2px rgba(15, 23, 42, 0.03);
    }

    .booking-wizard__step-title {
        font-size: 32px;
    }

    .booking-wizard__btn {
        min-width: 160px;
    }
}

/* ===========================
   Large Desktop (1440px+)
   =========================== */

@media (min-width: 1440px) {
    .booking-wizard {
        max-width: 1400px;
    }
}

/* ===========================
   Error States
   =========================== */

.booking-wizard__error {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 20px;
    color: #1e40af;
}

.booking-wizard__error-title {
    font-weight: 600;
    margin: 0 0 8px 0;
}

.booking-wizard__error-list {
    margin: 0;
    padding-left: 20px;
    list-style-type: disc;
}

/* ===========================
   Success States
   =========================== */

.booking-wizard__success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 20px;
    color: #166534;
}

/* ===========================
   Print Styles
   =========================== */

@media print {
    .booking-wizard__navigation,
    .booking-wizard__sidebar {
        display: none;
    }

    .booking-wizard {
        padding: 0;
    }

    .booking-wizard__main {
        box-shadow: none;
        border: 1px solid #e5e7eb;
    }
}

/* ===========================
   Accessibility & Layout Helpers
   =========================== */
.skip-to-content {
    position: absolute;
    left: -9999px;
    z-index: 9999;
    padding: 12px 20px;
    background: #2563eb;
    color: #FFFFFF;
    text-decoration: none;
    font-weight: 600;
    border-radius: 0 0 4px 4px;
    top: 0;
}

.skip-to-content:focus {
    left: 50%;
    transform: translateX(-50%);
    outline: 3px solid #fff;
    outline-offset: 2px;
}

.booking-wizard-section {
    background: #f8f9fa;
    min-height: 80vh;
}

.booking-wizard-content {
    background: #FFFFFF;
    padding: 30px;
    border-radius: 20px;
    border: none !important;
    box-shadow: 0 12px 35px -6px rgba(15, 23, 42, 0.08), 0 4px 12px -2px rgba(15, 23, 42, 0.03);
}

.step-content-wrapper {
    min-height: 380px;
}

.wizard-navigation {
    padding-top: 25px;
    border-top: none;
}

.booking-sidebar {
    position: sticky;
    top: 90px;
}

/* Desktop: Solid background for sidebar cards - Floating with shadow, no line boundary */
@media (min-width: 1024px) {
    .booking-sidebar .card {
        border-radius: 20px;
        border: none !important;
        box-shadow: 0 12px 35px -6px rgba(15, 23, 42, 0.08), 0 4px 12px -2px rgba(15, 23, 42, 0.03);
        background: #FFFFFF;
    }
    
    .booking-sidebar .card-header {
        background: #FFFFFF;
        border-bottom: none;
    }
}

/* Solid Submission Modal Overlay (No Glassmorphism) */
#booking-submit-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.85);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.overlay-content {
    text-align: center;
    color: #1e293b;
    padding: 35px 45px;
    background: #FFFFFF;
    border-radius: 16px;
    border: none !important;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
    max-width: 420px;
    width: 90%;
}

.overlay-content h5 {
    color: #0f172a;
    font-weight: 700;
    margin-bottom: 8px;
}

.form-section {
    padding: 22px;
    background: #FFFFFF;
    border: none !important;
    border-radius: 16px;
    box-shadow: 0 6px 20px -3px rgba(15, 23, 42, 0.06);
}

.section-number {
    width: 28px;
    height: 28px;
    background: #2563eb;
    color: #FFFFFF;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
}



/* ===========================
   Enhanced Package Detail Card
   =========================== */

.package-detail-card .card-header {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
    padding: 12px 16px !important;
}

.package-detail-card .badge {
    font-size: 9px;
    letter-spacing: 0.8px;
    padding: 4px 8px;
}

.package-image-wrapper {
    position: relative;
    overflow: hidden;
}

.package-image-wrapper img {
    transition: transform 0.4s ease;
    display: block;
}

.package-image-wrapper:hover img {
    transform: scale(1.08);
}

/* Title overlay on image */
.package-title-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.4) 70%, transparent 100%);
    padding: 24px 20px 16px;
}

.package-title-overlay h5 {
    font-size: 18px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* Meta info cards - compact 2-column layout */
.package-meta-row .meta-card {
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.package-meta-row .meta-card:hover {
    background: #f1f5f9 !important;
    border-color: #e2e8f0;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.meta-icon-sm {
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .package-title-overlay h5 {
        font-size: 19px;
    }
}

@media (min-width: 1024px) {
    .package-title-overlay {
        padding: 28px 24px 20px;
    }
    
    .package-title-overlay h5 {
        font-size: 20px;
    }
    
    .package-meta-row .meta-card {
        padding: 16px !important;
    }
}

/* ===========================
   Mobile Price Button & Offcanvas (ponytail: solid colors, no glassmorphism)
   =========================== */
@media (max-width: 991px) {
    /* Floating price button with pulse animation */
    .btn.position-fixed.bottom-0.end-0 {
        animation: pulse-shadow 2s infinite;
        min-width: 140px;
    }
}

@keyframes pulse-shadow {
    0%, 100% { box-shadow: 0 4px 12px rgba(37, 99, 235, 0.5); }
    50% { box-shadow: 0 6px 20px rgba(37, 99, 235, 0.7); }
}

/* Solid background offcanvas (no glassmorphism) */
.offcanvas-bottom {
    background: #FFFFFF;
    border-top: 3px solid #2563eb;
}

.offcanvas-bottom .offcanvas-header {
    background: #f8f9fa;
}

/* Toast notification styling */
.toast.show {
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
