/* =========================================================
   BOOKING CHECKLIST SYSTEM
   Raj Cut Creation - Final Stable Booking CSS
========================================================= */

.booking-widget {
    position: relative;
    z-index: 3000;
}

/* Hide old direct mobile WhatsApp button because checklist replaces it */
.mobile-whatsapp {
    display: none !important;
}

/* Floating booking button */
.booking-floating-btn {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 3002;
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 1px solid rgba(248, 220, 117, 0.58);
    border-radius: 999px;
    background: linear-gradient(135deg, #ffe68a 0%, #d4af37 58%, #b5831f 100%);
    color: #07111f;
    font-weight: 950;
    letter-spacing: 0.03em;
    box-shadow: 0 16px 38px rgba(212, 175, 55, 0.32);
    cursor: pointer;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.booking-floating-btn span {
    font-size: 0.92rem;
    text-transform: uppercase;
}

.booking-floating-btn strong {
    min-width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(7, 17, 31, 0.96);
    color: #f8dc75;
    font-size: 0.82rem;
}

/* Overlay */
.booking-overlay {
    position: fixed;
    inset: 0;
    z-index: 3003;
    background: rgba(0, 0, 0, 0.64);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.24s ease, visibility 0.24s ease;
}

/* Drawer */
.booking-drawer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3004;
    max-height: 88vh;
    padding: 18px 14px 22px;
    border-radius: 28px 28px 0 0;
    border-top: 1px solid rgba(248, 220, 117, 0.38);
    background:
        radial-gradient(circle at top right, rgba(212, 175, 55, 0.16), transparent 34%),
        linear-gradient(180deg, rgba(9, 19, 35, 0.99), rgba(4, 10, 19, 0.99));
    box-shadow: 0 -22px 60px rgba(0, 0, 0, 0.62);
    overflow-y: auto;
    transform: translate3d(0, 105%, 0);
    transition: transform 0.3s cubic-bezier(0.18, 0.8, 0.28, 1);
    -webkit-overflow-scrolling: touch;
}

.booking-widget.is-open .booking-overlay {
    opacity: 1;
    visibility: visible;
}

.booking-widget.is-open .booking-drawer {
    transform: translate3d(0, 0, 0);
}

/* Header */
.booking-drawer-header {
    position: sticky;
    top: -18px;
    z-index: 2;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin: -18px -14px 16px;
    padding: 18px 14px 16px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.16);
    background: rgba(9, 19, 35, 0.96);
}

.booking-drawer-header p {
    margin-bottom: 7px;
    color: #f8dc75;
    font-size: 0.68rem;
    font-weight: 950;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.booking-drawer-header h3 {
    color: #ffffff;
    font-size: clamp(1.2rem, 5vw, 1.5rem);
    font-weight: 950;
    line-height: 1.08;
    letter-spacing: 0.035em;
    text-transform: uppercase;
}

.booking-close-btn {
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
    border: 1px solid rgba(248, 220, 117, 0.34);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.055);
    color: #f8dc75;
    font-size: 1.45rem;
    line-height: 1;
    cursor: pointer;
}

/* Sections */
.booking-section {
    position: relative;
    margin-bottom: 14px;
    padding: 14px;
    border: 1px solid rgba(212, 175, 55, 0.24);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.055);
    overflow: hidden;
}

.booking-section h4 {
    margin-bottom: 10px;
    color: #ffffff;
    font-size: 0.98rem;
    font-weight: 950;
    letter-spacing: 0.01em;
    line-height: 1.3;
    text-transform: none;
}

.booking-step-head {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 12px;
    align-items: center;
    margin-bottom: 13px;
}

.booking-step-number {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(248, 220, 117, 0.42);
    border-radius: 50%;
    background: rgba(212, 175, 55, 0.12);
    color: #f8dc75;
    font-family: 'Cinzel', serif;
    font-size: 0.88rem;
    font-weight: 900;
}

.booking-step-eyebrow {
    margin: 0 0 2px !important;
    color: rgba(248, 220, 117, 0.95) !important;
    font-size: 0.66rem !important;
    font-weight: 950 !important;
    letter-spacing: 0.16em !important;
    line-height: 1.2 !important;
    text-transform: uppercase;
}

.booking-list {
    display: grid;
    gap: 9px;
}

.booking-empty {
    margin: 0;
    padding: 13px 14px;
    border: 1px dashed rgba(212, 175, 55, 0.24);
    border-radius: 16px;
    background: rgba(5, 13, 25, 0.36);
    color: rgba(237, 242, 247, 0.74);
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.45;
}

/* Selected item row */
.booking-item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    align-items: center;
    padding: 12px;
    border: 1px solid rgba(248, 220, 117, 0.26);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.075);
}

.booking-item span {
    color: #ffffff;
    font-size: 0.91rem;
    font-weight: 900;
    line-height: 1.38;
}

.booking-item button {
    width: 32px;
    height: 32px;
    border: 1px solid rgba(248, 220, 117, 0.34);
    border-radius: 50%;
    background: rgba(212, 175, 55, 0.12);
    color: #f8dc75;
    font-size: 1.15rem;
    cursor: pointer;
}

/* Barber profile link */
.booking-link {
    width: 100%;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 12px;
    border: 1px solid rgba(248, 220, 117, 0.34);
    border-radius: 999px;
    background: rgba(212, 175, 55, 0.08);
    color: #f8dc75;
    font-size: 0.86rem;
    font-weight: 950;
    letter-spacing: 0.025em;
    text-decoration: none;
}

/* Mini form */
.booking-form-mini {
    display: grid;
    gap: 12px;
    margin: 18px 0;
}

.booking-form-mini label {
    display: grid;
    gap: 8px;
    color: #f8dc75;
    font-size: 0.72rem;
    font-weight: 950;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.booking-form-mini input {
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    border: 1px solid rgba(212, 175, 55, 0.28);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.065);
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 800;
    outline: none;
}

.booking-form-mini input::placeholder {
    color: rgba(170, 182, 198, 0.72);
    font-weight: 650;
}

.booking-form-mini input:focus {
    border-color: rgba(248, 220, 117, 0.72);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.14);
}

/* Actions */
.booking-actions {
    display: grid;
    gap: 10px;
}

.booking-send-btn,
.booking-clear-btn {
    min-height: 52px;
    border-radius: 999px;
    font-weight: 950;
    cursor: pointer;
}

.booking-send-btn {
    border: 1px solid rgba(248, 220, 117, 0.64);
    background: linear-gradient(135deg, #ffe68a 0%, #d4af37 55%, #a97818 100%);
    color: #06101d;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
    box-shadow: 0 16px 38px rgba(212, 175, 55, 0.3);
}

.booking-clear-btn {
    border: 1px solid rgba(212, 175, 55, 0.26);
    background: rgba(255, 255, 255, 0.035);
    color: #f8dc75;
    font-size: 0.88rem;
}

/* Add-to-booking buttons */
.booking-add-btn {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    padding: 10px 15px;
    border: 1px solid rgba(212, 175, 55, 0.34);
    border-radius: 999px;
    background: rgba(212, 175, 55, 0.09);
    color: #f8dc75;
    font-weight: 950;
    font-size: 0.78rem;
    line-height: 1;
    cursor: pointer;
    transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease, color 0.22s ease;
}

.booking-add-btn:hover {
    transform: translateY(-2px);
    border-color: rgba(212, 175, 55, 0.58);
    background: rgba(212, 175, 55, 0.16);
}

.booking-add-btn.is-selected {
    border-color: transparent;
    background: linear-gradient(135deg, #f8dc75, #d4af37);
    color: #07111f;
}

/* Service rows */
.service-booking-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    align-items: center;
    padding: 13px;
    border: 1px solid rgba(212, 175, 55, 0.14);
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.035);
    transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.service-booking-row:hover {
    transform: translateY(-2px);
    border-color: rgba(212, 175, 55, 0.42);
    background: rgba(212, 175, 55, 0.075);
}

.service-booking-row span,
.package-booking-row span {
    color: rgba(255, 255, 255, 0.94);
    font-weight: 850;
    line-height: 1.35;
}

.service-booking-row strong,
.package-booking-row strong {
    color: #f8dc75;
    font-weight: 950;
    white-space: nowrap;
}

.service-booking-row .booking-add-btn {
    grid-column: 1 / -1;
    width: 100%;
}

/* Featured package rows */
.package-booking-list {
    display: grid;
    gap: 10px;
}

.package-booking-row {
    display: grid !important;
    grid-template-columns: 1fr auto;
    gap: 10px;
    align-items: center;
    padding: 14px 15px;
    border: 1px solid rgba(212, 175, 55, 0.18);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.045);
}

.package-booking-row .booking-add-btn {
    grid-column: 1 / -1;
    width: 100%;
}

/* Product WhatsApp button */
.product-booking-btn {
    width: calc(100% - 28px);
    min-height: 48px;
    margin: 0 14px 14px;
    border: 1px solid rgba(248, 220, 117, 0.58);
    background: linear-gradient(135deg, #ffe68a 0%, #d4af37 58%, #b5831f 100%);
    color: #07111f;
    font-weight: 950;
    letter-spacing: 0.02em;
}

.product-booking-btn.is-selected {
    background: linear-gradient(135deg, #ffe68a 0%, #d4af37 58%, #b5831f 100%);
    color: #07111f;
}

/* Barber select buttons */
.bb-barber-select-btn {
    width: 100%;
    min-height: 50px;
    margin-top: 4px;
    border-radius: 999px;
    background: linear-gradient(135deg, #f8dc75, #d4af37);
    color: #07111f;
    border-color: transparent;
    box-shadow: 0 14px 34px rgba(212, 175, 55, 0.24);
}

.bb-barber-select-btn.is-selected {
    background: rgba(255, 255, 255, 0.06);
    color: #f8dc75;
    border-color: rgba(212, 175, 55, 0.38);
    box-shadow: none;
}

/* Validation warning */
.booking-warning-box {
    display: none;
    margin: 0 0 14px;
    padding: 13px 14px;
    border: 1px solid rgba(248, 220, 117, 0.55);
    border-radius: 17px;
    background: rgba(212, 175, 55, 0.13);
    color: #f8dc75;
    font-size: 0.9rem;
    font-weight: 900;
    line-height: 1.45;
}

.booking-warning-box.is-visible {
    display: block;
}

.booking-section-alert {
    border-color: rgba(248, 220, 117, 0.85) !important;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.14);
    animation: bookingPulse 0.55s ease-in-out 2;
}

@keyframes bookingPulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.015);
    }

    100% {
        transform: scale(1);
    }
}

/* Desktop drawer */
@media (min-width: 860px) {
    .booking-floating-btn {
        left: auto;
        right: 26px;
        bottom: 26px;
        width: auto;
        min-width: 230px;
        padding: 0 22px;
    }

    .booking-drawer {
        left: auto;
        right: 26px;
        bottom: 94px;
        width: min(460px, calc(100vw - 52px));
        max-height: 78vh;
        padding: 20px;
        border: 1px solid rgba(212, 175, 55, 0.28);
        border-radius: 26px;
        transform: translate3d(0, 18px, 0) scale(0.97);
        opacity: 0;
        visibility: hidden;
    }

    .booking-widget.is-open .booking-drawer {
        transform: translate3d(0, 0, 0) scale(1);
        opacity: 1;
        visibility: visible;
    }

    .booking-drawer-header {
        top: -20px;
        margin: -20px -20px 18px;
        padding: 20px 20px 17px;
    }

    .service-booking-row,
    .package-booking-row {
        grid-template-columns: 1fr auto auto;
    }

    .service-booking-row .booking-add-btn,
    .package-booking-row .booking-add-btn {
        grid-column: auto;
        width: auto;
        min-width: 130px;
    }
}

/* Small mobile */
@media (max-width: 390px) {
    .booking-floating-btn {
        left: 12px;
        right: 12px;
        bottom: 12px;
        min-height: 54px;
    }

    .booking-drawer {
        padding: 18px 13px 20px;
        border-radius: 24px 24px 0 0;
    }

    .booking-drawer-header {
        margin-left: -13px;
        margin-right: -13px;
        padding-left: 13px;
        padding-right: 13px;
    }

    .booking-drawer-header h3 {
        font-size: 1.18rem;
    }

    .booking-step-head {
        grid-template-columns: 38px 1fr;
        gap: 10px;
    }

    .booking-step-number {
        width: 38px;
        height: 38px;
        font-size: 0.8rem;
    }

    .booking-section h4 {
        font-size: 0.92rem;
    }
}

/* =========================================================
   MOBILE PERFORMANCE OPTIMIZATION
   Only affects phones/tablets. Keeps desktop premium.
========================================================= */

@media (max-width: 768px) {
    .booking-floating-btn {
        box-shadow: 0 10px 26px rgba(212, 175, 55, 0.26);
        transition: none;
    }

    .booking-drawer {
        box-shadow: 0 -16px 42px rgba(0, 0, 0, 0.56);
        transition: transform 0.24s ease;
    }

    .booking-overlay {
        transition: opacity 0.2s ease, visibility 0.2s ease;
    }

    .booking-drawer-header {
        position: relative;
        top: auto;
        background: transparent;
    }

    .booking-add-btn,
    .service-booking-row,
    .package-booking-row,
    .booking-link,
    .booking-send-btn,
    .booking-clear-btn,
    .booking-close-btn {
        transition: none !important;
    }

    .booking-add-btn:hover,
    .service-booking-row:hover {
        transform: none;
    }

    .booking-section,
    .booking-item,
    .service-booking-row,
    .package-booking-row {
        box-shadow: none !important;
    }

    .booking-section-alert {
        animation: none !important;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .booking-floating-btn,
    .booking-drawer,
    .booking-overlay,
    .booking-add-btn,
    .service-booking-row,
    .package-booking-row,
    .booking-link,
    .booking-send-btn,
    .booking-clear-btn,
    .booking-close-btn {
        animation: none !important;
        transition: none !important;
    }
}