/* Booking Module Styles */

.booking-section {
    display: flex;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    padding: 1rem 1.5rem 4rem;
    font-family: "Montserrat", "Metropolis", "Segoe UI", sans-serif;
}

.booking-card {
    width: min(420px, calc(100vw - 3rem));
    max-width: 420px;
    min-width: 0;
    background: #ffffff;
    border-radius: 28px;
    padding: 2rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);
}

.booking-card h2 {
    margin-bottom: 0.5rem;
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #111111;
}

.booking-card p {
    margin-bottom: 2rem;
    color: #777777;
    font-size: 1rem;
    font-weight: 500;
}

.booking-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    min-width: 0;
}

.booking-form .input-group {
    position: relative;
    width: 100%;
    min-width: 0;
}

.booking-form .input-group-location {
    position: relative;
}

.booking-form .input-icon {
    position: absolute;
    top: 50%;
    left: 1.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    transform: translateY(-50%);
    pointer-events: none;
}

.booking-form .input-icon img {
    width: 20px;
    height: 20px;
    display: block;
}

.booking-form .input-group input {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: 64px;
    border: 1px solid #e5e5e5;
    border-radius: 18px;
    padding: 0 1.25rem 0 3.5rem;
    font-size: 1rem;
    font-family: inherit;
    font-weight: 400;
    color: #222222;
    outline: none;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.booking-form .input-group-date input {
    padding-right: 3rem;
}

.booking-form .input-group input:focus {
    border-color: #ff2a2a;
    box-shadow: 0 0 0 4px rgba(255, 42, 42, 0.08);
}

.booking-form .input-group input::placeholder {
    color: #999999;
}

.booking-location-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    z-index: 10;
    max-height: 220px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.booking-location-list {
    margin: 0;
    padding: 0.5rem;
    list-style: none;
}

.booking-location-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    --location-scroll-distance: 0px;
    --location-scroll-duration: 6s;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.84rem;
    line-height: 1.2;
    transition: background-color 0.2s ease;
}

.booking-location-item:hover {
    background-color: #f5f5f5;
}

.booking-location-item strong {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
    font-weight: 600;
    color: #111111;
    margin-bottom: 0;
    white-space: nowrap;
    overflow: hidden;
}

.booking-location-name-label {
    display: inline-block;
    white-space: nowrap;
    will-change: transform;
}

.booking-location-item.is-overflowing .booking-location-name-label {
    animation: booking-location-marquee var(--location-scroll-duration) ease-in-out infinite;
}

.booking-location-item small {
    display: block;
    flex: 0 0 auto;
    font-size: 0.72rem;
    white-space: nowrap;
    color: #777777;
}

.booking-location-empty {
    text-align: center;
    color: #999999;
    cursor: default;
    padding: 1rem 0.75rem;
}

.booking-location-empty:hover {
    background-color: transparent;
}

@keyframes booking-location-marquee {
    0%,
    18% {
        transform: translateX(0);
    }

    58%,
    82% {
        transform: translateX(calc(-1 * var(--location-scroll-distance)));
    }

    100% {
        transform: translateX(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .booking-location-item {
        align-items: flex-start;
    }

    .booking-location-item strong,
    .booking-location-name-label {
        white-space: normal;
        overflow: visible;
    }

    .booking-location-item.is-overflowing .booking-location-name-label {
        animation: none;
        transform: none;
    }
}

.booking-submit {
    width: 100%;
    max-width: 100%;
    margin-top: 1rem;
    height: 68px;
    border: none;
    border-radius: 20px;
    background: linear-gradient(135deg, #ff1f1f, #e00000);
    color: #ffffff;
    font-size: 1.25rem;
    font-family: inherit;
    font-weight: 800;
    letter-spacing: -0.02em;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.booking-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(255, 0, 0, 0.25);
}

.booking-submit:active {
    transform: translateY(0);
}

#section-booking .overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 2999;
    display: none;
}

#section-booking .daterangepicker {
    display: none;
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    right: auto !important;
    bottom: auto !important;
    transform: translate(-50%, -50%);
    margin-top: 0;
    z-index: 3001;
    width: min(360px, calc(100vw - 2rem));
    padding: 2.9rem 1rem 1rem;
    border: none;
    border-radius: 28px;
    box-shadow: 0 26px 80px rgba(15, 23, 42, 0.24);
}

#section-booking .booking-picker-close {
    position: absolute;
    top: 0.8rem;
    right: 0.8rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border: 1px solid #ececec;
    border-radius: 999px;
    background: #ffffff;
    color: #6b7280;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

#section-booking .booking-picker-close:hover {
    background: #111111;
    color: #ffffff;
    transform: scale(1.04);
}

#section-booking .daterangepicker .drp-calendar.left {
    padding: 0;
}

#section-booking .daterangepicker .drp-calendar.right,
#section-booking .daterangepicker .ranges,
#section-booking .daterangepicker .drp-buttons {
    display: none !important;
}

#section-booking .daterangepicker.single .drp-calendar.left {
    display: block;
}

#section-booking .daterangepicker .calendar-table {
    border: none;
    border-radius: 22px;
    background: linear-gradient(180deg, #ffffff 0%, #fff7f7 100%);
    padding: 0.75rem;
}

#section-booking .daterangepicker .calendar-table table {
    border-collapse: separate;
    border-spacing: 0.2rem;
}

#section-booking .daterangepicker .calendar-table th,
#section-booking .daterangepicker .calendar-table td {
    width: 2.45rem;
    min-width: 2.45rem;
    height: 2.35rem;
    line-height: 2.35rem;
    border-radius: 999px;
    font-size: 0.82rem;
}

#section-booking .daterangepicker th.month {
    padding-bottom: 0.75rem;
}

#section-booking .daterangepicker .booking-urgency-row th {
    padding: 0 0 0.85rem;
    background: transparent;
    border: none;
}

#section-booking .demand-ribbon {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border-radius: 14px;
    background: linear-gradient(90deg, #fcf8f8 0%, #fdeeee 52%, #f9dddd 100%);
    border: 1px solid rgba(220, 38, 38, 0.08);
    box-shadow:
        0 4px 14px rgba(220, 38, 38, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    box-sizing: border-box;
}

#section-booking .demand-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

#section-booking .demand-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1 1 0;
}

#section-booking .demand-title {
    font-size: clamp(0.7rem, 2.5vw, 0.85rem);
    font-weight: 700;
    color: #b91c1c;
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#section-booking .demand-subtitle {
    font-size: clamp(0.6rem, 2vw, 0.7rem);
    color: #7f1d1d;
    opacity: 0.75;
    margin-top: 0.15rem;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#section-booking .demand-timer-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 0.35rem 0.6rem;
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    border: 1px solid rgba(220, 38, 38, 0.14);
    box-shadow: 0 3px 10px rgba(220, 38, 38, 0.08);
}

#section-booking .demand-timer {
    font-size: clamp(0.85rem, 3vw, 1rem);
    font-weight: 800;
    color: #dc2626;
    letter-spacing: 0.5px;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

#section-booking .demand-timer-label {
    margin-top: 0.15rem;
    font-size: clamp(0.55rem, 1.8vw, 0.65rem);
    font-weight: 500;
    color: #991b1b;
    opacity: 0.75;
    white-space: nowrap;
}

#section-booking .daterangepicker select.monthselect,
#section-booking .daterangepicker select.yearselect {
    height: 2rem;
    border: 1px solid #ececec;
    border-radius: 999px;
    background: #ffffff;
    padding: 0 0.75rem;
}

#section-booking .daterangepicker td.available:hover,
#section-booking .daterangepicker th.available:hover {
    background-color: #111111;
    color: #ffffff;
}

#section-booking .daterangepicker td.active,
#section-booking .daterangepicker td.active:hover {
    background: linear-gradient(135deg, #ff2a2a, #d40000);
    color: #ffffff;
}

#section-booking .booking-time-picker {
    clear: both;
    position: relative;
    margin-top: 1rem;
}

#section-booking .booking-time-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    border: 1px solid #ececec;
    border-radius: 18px;
    background: #ffffff;
    padding: 0.95rem 1rem;
    font: inherit;
    color: #111111;
    cursor: pointer;
}

#section-booking .booking-time-toggle-label {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #8a8a8a;
}

#section-booking .booking-time-toggle-value {
    font-size: 1rem;
    font-weight: 700;
}

#section-booking .booking-time-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    border: 1px solid #ececec;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16);
    overflow: hidden;
    z-index: 2;
}

#section-booking .booking-time-list {
    max-height: 13rem;
    margin: 0;
    padding: 0.35rem;
    overflow-y: auto;
    list-style: none;
}

#section-booking .booking-time-option {
    border-radius: 14px;
    padding: 0.75rem 0.9rem;
    font-size: 0.96rem;
    cursor: pointer;
}

#section-booking .booking-time-option:hover {
    background: #f6f6f6;
}

#section-booking .booking-time-option.is-selected {
    background: rgba(255, 42, 42, 0.1);
    color: #d40000;
    font-weight: 700;
}

@supports (width: 100dvw) {
    .booking-card {
        width: min(420px, calc(100dvw - 3rem));
    }
}

.booking-media {
    display: none;
}

.booking-banner-image {
    display: block;
    width: 100%;
    object-position: center;
    object-fit: cover;
}

@media (min-width: 768px) {
    #section-banner {
        display: none;
    }

    .booking-section {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 420px;
        align-items: stretch;
        gap: 0;
        width: min(1100px, calc(100vw - 4rem));
        max-width: 100%;
        margin: 2.5rem auto 5rem;
        padding: 0;
        border-radius: 28px;
        overflow: hidden;
        box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
        background: #ffffff;
    }

    .booking-media {
        display: flex;
        align-items: center;
        justify-content: center;
        min-width: 0;
        min-height: 100%;
        background: radial-gradient(circle at 0% 100%, rgba(255, 131, 106, 0.28) 0%, rgba(255, 131, 106, 0) 42%), linear-gradient(180deg, #be0100 0%, #d30302 52%, #df0403 100%);
        overflow: hidden;
    }

    .booking-card {
        width: 100%;
        max-width: none;
        min-height: 100%;
        border-radius: 0;
        padding: 2.5rem 2rem;
        box-shadow: none;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
}

@media (min-width: 1024px) {
    .booking-section {
        width: min(1160px, calc(100vw - 6rem));
        margin: 3rem auto 6rem;
        grid-template-columns: minmax(0, 1.15fr) 420px;
    }

    .booking-card {
        padding: 3rem 2.5rem;
    }
}

@media (max-width: 480px) {
    .booking-section {
        padding: 1rem 1rem 3rem;
    }

    .booking-card {
        width: min(100%, calc(100vw - 2rem));
        border-radius: 24px;
        padding: 1.5rem;
    }

    @supports (width: 100dvw) {
        .booking-card {
            width: min(100%, calc(100dvw - 2rem));
        }
    }

    .booking-card h2 {
        font-size: 1.3125rem;
    }

    .booking-card p {
        font-size: 0.75rem;
    }

    .booking-submit {
        font-size: 0.825rem;
    }

    .booking-form .input-group input {
        font-size: 0.75rem;
    }

    .booking-location-dropdown {
        top: calc(100% + 0.35rem);
        border-radius: 12px;
        max-height: 9.5rem;
    }

    .booking-location-list {
        padding: 0.35rem;
    }

    .booking-location-item {
        padding: 0.55rem 0.65rem;
        font-size: 0.74rem;
        gap: 0.35rem;
        border-radius: 9px;
    }

    .booking-location-item strong {
        font-size: 0.72rem;
    }

    .booking-location-item small {
        font-size: 0.63rem;
    }

    #section-booking .daterangepicker {
        padding: 0.85rem;
    }

    #section-booking .daterangepicker .calendar-table th,
    #section-booking .daterangepicker .calendar-table td {
        width: 2.15rem;
        min-width: 2.15rem;
        height: 2.15rem;
        line-height: 2.15rem;
    }
}