/* Hide reCAPTCHA v3 badge (attribution text is included in the form) */
.grecaptcha-badge {
    visibility: hidden !important;
}

.calendar-day {
    aspect-ratio: 1;
    transition: all 0.2s ease;
    color: #051F4A;
}

.calendar-day.has-slots:not(.selected) {
    background-color: rgba(5, 31, 74, 0.1);
    border: 2px solid #051F4A;
    color: #051F4A;
    font-weight: 600;
    position: relative;
}

.calendar-day.has-slots:not(.selected):hover {
    transform: scale(1.08);
    background-color: rgba(5, 31, 74, 0.2);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.calendar-day.selected {
    background: linear-gradient(135deg, #051F4A 0%, #0A7CC1 100%) !important;
    color: white !important;
    font-weight: 600;
    border: 2px solid #051F4A;
    box-shadow: 0 4px 12px rgba(5, 31, 74, 0.3);
}

.calendar-day.disabled {
    color: rgba(5, 31, 74, 0.3);
    cursor: not-allowed;
}

.calendar-day.other-month {
    opacity: 0.6;
}

.time-slot {
    transition: all 0.2s ease;
}

.time-slot:hover {
    transform: translateX(4px);
    background-color: rgba(10, 124, 193, 0.1);
}

/* Custom scrollbar for time slots */
#timeSlotsContainer::-webkit-scrollbar {
    width: 6px;
}

#timeSlotsContainer::-webkit-scrollbar-track {
    background: rgba(10, 124, 193, 0.1);
    border-radius: 3px;
}

#timeSlotsContainer::-webkit-scrollbar-thumb {
    background: #0A7CC1;
    border-radius: 3px;
}

#timeSlotsContainer::-webkit-scrollbar-thumb:hover {
    background: #051F4A;
}

/* Sliding animation */
.booking-wrapper {
    display: flex;
    gap: 1rem;
    align-items: start;
    max-width: 100%;
    position: relative;
}

.landing-text-header {
    width: 435px;
    max-width: 100%;
}

#calendarColumn {
    width: 435px;
    max-width: 100%;
    flex-shrink: 0;
}

#calendarCard {
    min-height: 600px;
}

#gridView {
    display: none;
    flex-direction: column;
    min-height: 500px;
}

#gridView.active {
    display: flex;
}

@media (min-width: 1024px) {
    #gridView {
        min-height: auto;
    }
}

#gridViewCards {
    flex: 1;
    overflow-y: auto;
}

/* Custom scrollbar for grid view */
#gridViewCards::-webkit-scrollbar {
    width: 6px;
}

#gridViewCards::-webkit-scrollbar-track {
    background: rgba(10, 124, 193, 0.1);
    border-radius: 3px;
}

#gridViewCards::-webkit-scrollbar-thumb {
    background: #0A7CC1;
    border-radius: 3px;
}

#gridViewCards::-webkit-scrollbar-thumb:hover {
    background: #051F4A;
}

#timeSlotsOuter {
    flex-shrink: 0;
}

#timeSlotsWrapper {
    overflow: hidden;
    width: 0;
    min-width: 0;
    opacity: 0;
    visibility: hidden;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.4s;
}

#timeSlotsWrapper.active {
    width: 285px;
    opacity: 1;
    visibility: visible;
}

#timeSlots {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

@media (min-width: 1600px) {
    #calendarColumn {
        width: 520px;
    }

    #timeSlotsWrapper.active {
        width: 340px;
    }
}


@media (max-width: 1024px) {
    .booking-wrapper {
        position: relative;
        display: block;
    }

    #calendarColumn {
        width: 100%;
    }

    #calendarCard {
        min-height: auto;
    }

    #timeSlotsOuter {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 50;
        pointer-events: none;
    }

    #timeSlotsOuter:has(#timeSlotsWrapper.active) {
        pointer-events: auto;
    }

    #timeSlotsWrapper {
        width: 100% !important;
        height: 100% !important;
        overflow: visible;
        opacity: 1;
        transform: translateX(100%);
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    #timeSlotsWrapper.active {
        transform: translateX(0);
    }

    #timeSlots {
        background: white;
        border-radius: 0.75rem;
        height: 100% !important;
    }

    /* --- MOBILE HERO OPTIMIZATIONS START --- */

    /* Reduce padding on mobile */
    .hero-section {
        padding: 1.5rem !important;
    }

    /* Mobile logo/title row: layout comes from Tailwind utilities on the
       element itself; this rule only tightens the bottom margin. The hero
       instance is hidden on mobile via `hidden lg:flex`; the rule does not
       force any display value so it cannot override that. */
    .mobile-header-row {
        margin-bottom: 1rem !important;
    }

    /* Adjust logo size in flex row */
    .mobile-header-row img {
        max-height: 3.5rem;
        width: auto !important;
        margin-bottom: 0 !important;
    }

    .mobile-header-row .logo-placeholder {
        height: 3.5rem;
        width: 3.5rem;
        margin-bottom: 0 !important;
    }

    /* Use Intro Image as background on mobile - !important ensures it overrides the gradient */
    .hero-bg-mobile {
        background-image: linear-gradient(180deg, rgba(5, 31, 74, 0.85) 0%, rgba(5, 31, 74, 0.95) 100%), var(--bg-image) !important;
        background-size: cover;
        background-position: center;
    }

    /* Hide non-critical info on mobile */
    .mobile-hidden {
        display: none !important;
    }
    /* --- MOBILE HERO OPTIMIZATIONS END --- */
}

.modal {
    display: none;
    position: fixed;
    z-index: 50;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    padding: 0;
    border-radius: 1rem;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

.success-checkmark {
    width: 80px;
    height: 120px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.success-checkmark .check-icon {
    width: 80px;
    height: 80px;
    position: relative;
    border-radius: 50%;
    box-sizing: content-box;
    border: 4px solid #0A7CC1;
    overflow: hidden;
}

.success-checkmark .check-icon::before {
    top: 3px;
    left: -2px;
    width: 30px;
    transform-origin: 100% 50%;
    border-radius: 100px 0 0 100px;
}

.success-checkmark .check-icon::after {
    top: 0;
    left: 30px;
    width: 60px;
    transform-origin: 0 50%;
    border-radius: 0 100px 100px 0;
    animation: rotate-circle 4.25s ease-in;
}

.success-checkmark .check-icon::before,
.success-checkmark .check-icon::after {
    content: '';
    height: 100px;
    position: absolute;
    background: #fff;
    transform: rotate(-45deg);
}

.success-checkmark .check-icon .icon-line {
    height: 5px;
    background-color: #0A7CC1;
    display: block;
    border-radius: 2px;
    position: absolute;
    z-index: 10;
}

.success-checkmark .check-icon .icon-line.line-tip {
    top: 46px;
    left: 14px;
    width: 25px;
    transform: rotate(45deg);
    animation: icon-line-tip 0.75s;
}

.success-checkmark .check-icon .icon-line.line-long {
    top: 38px;
    right: 8px;
    width: 47px;
    transform: rotate(-45deg);
    animation: icon-line-long 0.75s;
}

@keyframes icon-line-tip {
    0% {
        width: 0;
        left: 1px;
        top: 19px;
    }
    54% {
        width: 0;
        left: 1px;
        top: 19px;
    }
    70% {
        width: 50px;
        left: -8px;
        top: 37px;
    }
    84% {
        width: 17px;
        left: 21px;
        top: 48px;
    }
    100% {
        width: 25px;
        left: 14px;
        top: 46px;
    }
}

@keyframes icon-line-long {
    0% {
        width: 0;
        right: 46px;
        top: 54px;
    }
    65% {
        width: 0;
        right: 46px;
        top: 54px;
    }
    84% {
        width: 55px;
        right: 0;
        top: 35px;
    }
    100% {
        width: 47px;
        right: 8px;
        top: 38px;
    }
}
