/* TENIS ARENA — layout fixes 20261006 */

/* Mobile overlay: header + bounded scroll area. */
@media (max-width: 1023px) {
    body > #ta-mobile-panel.ta-mobile-panel {
        position: fixed !important;
        top: var(--ta-layout-viewport-top, 0px) !important;
        right: 0 !important;
        bottom: auto !important;
        left: 0 !important;
        display: grid !important;
        grid-template-rows: auto minmax(0, 1fr) !important;
        width: 100% !important;
        height: var(--ta-layout-viewport-height, 100dvh) !important;
        max-height: var(--ta-layout-viewport-height, 100dvh) !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
        clip-path: none !important;
        transform: none !important;
        background: var(--ta-ivory-soft, #FBF8F0) !important;
    }

    body > #ta-mobile-panel .ta-mobile-overlay-header {
        grid-row: 1 !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }

    body > #ta-mobile-panel .ta-mobile-panel-clip {
        grid-row: 2 !important;
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        height: auto !important;
        max-height: none !important;
        min-height: 0 !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    body > #ta-mobile-panel .ta-mobile-menu-scroll {
        flex: 1 1 0% !important;
        width: 100% !important;
        height: auto !important;
        max-height: none !important;
        min-height: 0 !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        overscroll-behavior-y: contain;
        -webkit-overflow-scrolling: touch;
        transform: none !important;
        will-change: opacity;
    }

    body > #ta-mobile-panel .ta-mobile-menu {
        height: auto !important;
        max-height: none !important;
        min-height: 0 !important;
        box-sizing: border-box !important;
        padding-bottom: calc(32px + env(safe-area-inset-bottom, 0px)) !important;
    }

    body > #ta-mobile-panel .ta-mobile-menu-footer {
        position: static !important;
        height: auto !important;
        min-width: 0 !important;
    }

    body > #ta-mobile-panel a.ta-mobile-reserve {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 16px !important;
        box-sizing: border-box !important;
        width: 100% !important;
        height: auto !important;
        min-height: 56px !important;
        padding: 14px 18px !important;
        background: var(--ta-forest, #073C2E) !important;
        color: var(--ta-ivory, #F6F0E4) !important;
        line-height: 1.25 !important;
    }

    body > #ta-mobile-panel a.ta-mobile-reserve > span {
        color: var(--ta-ivory, #F6F0E4) !important;
        -webkit-text-fill-color: currentColor !important;
    }

    body > #ta-mobile-panel a.ta-mobile-reserve > strong {
        flex: 0 0 auto !important;
        color: var(--ta-gold, #C7A552) !important;
        -webkit-text-fill-color: currentColor !important;
    }
}

/* Quick booking: equal tracks and equal control dimensions. */
body.ta-shell .ta-home-rebuild-root .ta-home-quick-form {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 12px !important;
    align-items: end !important;
    min-width: 0 !important;
}

body.ta-shell .ta-home-rebuild-root .ta-home-quick-field {
    display: grid !important;
    grid-template-rows: auto 48px !important;
    gap: 8px !important;
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
}

body.ta-shell .ta-home-rebuild-root .ta-home-quick-field > span {
    margin: 0 !important;
    line-height: 1.25 !important;
}

body.ta-shell .ta-home-rebuild-root .ta-home-quick-field input,
body.ta-shell .ta-home-rebuild-root .ta-home-quick-field select {
    display: block !important;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: 48px !important;
    min-height: 48px !important;
    max-height: 48px !important;
    margin: 0 !important;
    padding: 0 12px !important;
    font-family: inherit !important;
    font-size: 16px !important;
    line-height: normal !important;
    border-radius: 0 !important;
    -webkit-min-logical-width: 0 !important;
}

body.ta-shell .ta-home-rebuild-root .ta-home-quick-submit {
    grid-column: 1 / -1 !important;
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 48px !important;
    min-height: 48px !important;
}

/* Availability date: compact desktop field and bounded mobile field. */
body.ta-shell .ta-home-rebuild-root .ta-home-availability-head {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 280px) !important;
    align-items: end !important;
    gap: 24px !important;
}

body.ta-shell .ta-home-rebuild-root .ta-home-availability-date {
    display: grid !important;
    grid-template-rows: auto 48px !important;
    gap: 8px !important;
    width: 100% !important;
    max-width: 280px !important;
    min-width: 0 !important;
    margin: 0 !important;
    justify-self: end !important;
}

body.ta-shell .ta-home-rebuild-root #availabilityDate.ta-availability-date {
    display: block !important;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: 48px !important;
    min-height: 48px !important;
    max-height: 48px !important;
    margin: 0 !important;
    padding: 0 12px !important;
    border: 1px solid var(--ta-border, #D9CFBD) !important;
    border-radius: 0 !important;
    background: var(--ta-ivory-soft, #FBF8F0) !important;
    color: var(--ta-forest, #073C2E) !important;
    font-family: inherit !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    line-height: normal !important;
    -webkit-min-logical-width: 0 !important;
    color-scheme: light;
}

/* Keep native date inputs; normalize their presentation. */
body.ta-shell .ta-home-rebuild-root .ta-home-quick-field input:is([type="date"], [type="time"]),
body.ta-shell .ta-home-rebuild-root #availabilityDate {
    -webkit-appearance: none !important;
    appearance: none !important;
    text-align: left !important;
}

body.ta-shell .ta-home-rebuild-root .ta-home-quick-field input:is([type="date"], [type="time"]) {
    color-scheme: dark;
}

body.ta-shell .ta-home-rebuild-root .ta-home-quick-field input:is([type="date"], [type="time"])::-webkit-date-and-time-value,
body.ta-shell .ta-home-rebuild-root #availabilityDate::-webkit-date-and-time-value {
    display: flex !important;
    align-items: center !important;
    height: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    text-align: left !important;
}

body.ta-shell .ta-home-rebuild-root .ta-home-quick-field input:is([type="date"], [type="time"])::-webkit-datetime-edit,
body.ta-shell .ta-home-rebuild-root #availabilityDate::-webkit-datetime-edit {
    display: inline-flex !important;
    align-items: center !important;
    min-width: 0 !important;
    height: 100% !important;
    padding: 0 !important;
}

body.ta-shell .ta-home-rebuild-root .ta-home-quick-field input:is([type="date"], [type="time"])::-webkit-calendar-picker-indicator,
body.ta-shell .ta-home-rebuild-root #availabilityDate::-webkit-calendar-picker-indicator {
    display: block !important;
    position: static !important;
    width: 18px !important;
    height: 18px !important;
    padding: 0 !important;
    margin: 0 !important;
    opacity: 1 !important;
    transform: none !important;
}

body.ta-shell .ta-home-rebuild-root .ta-home-quick-field input:focus-visible,
body.ta-shell .ta-home-rebuild-root .ta-home-quick-field select:focus-visible,
body.ta-shell .ta-home-rebuild-root #availabilityDate:focus-visible,
body > #ta-mobile-panel a.ta-mobile-reserve:focus-visible {
    outline: 2px solid var(--ta-gold, #C7A552) !important;
    outline-offset: 3px !important;
}

@media (max-width: 1279px) {
    body.ta-shell .ta-home-rebuild-root .ta-home-quick-form {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 767px) {
    body.ta-shell .ta-home-rebuild-root .ta-home-availability-head {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 18px !important;
    }

    body.ta-shell .ta-home-rebuild-root .ta-home-availability-date {
        max-width: 100% !important;
        justify-self: stretch !important;
    }
}

/* TA_LAYOUT_V2_20261006: desktop availability flow and native time sizing. */
@media (min-width: 768px) {
    body.ta-shell .ta-home-rebuild-root .ta-home-availability-inner {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        grid-template-rows: auto !important;
        grid-template-areas: none !important;
        grid-auto-flow: row !important;
        grid-auto-rows: auto !important;
        gap: 24px !important;
        align-items: stretch !important;
    }

    body.ta-shell .ta-home-rebuild-root .ta-home-availability-inner > .ta-home-availability-head,
    body.ta-shell .ta-home-rebuild-root .ta-home-availability-inner > .ta-home-availability-toolbar,
    body.ta-shell .ta-home-rebuild-root .ta-home-availability-inner > #availabilityCarousel {
        grid-column: 1 / -1 !important;
        grid-row: auto !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }

    body.ta-shell .ta-home-rebuild-root .ta-home-availability-intro {
        min-width: 0 !important;
        align-items: flex-start !important;
    }

    body.ta-shell .ta-home-rebuild-root .ta-home-availability-intro > div:last-child {
        flex: 1 1 auto !important;
        min-width: 0 !important;
    }

    body.ta-shell .ta-home-rebuild-root .ta-home-availability-icon {
        flex: 0 0 34px !important;
    }

    body.ta-shell .ta-home-rebuild-root .ta-home-availability-intro h2 {
        margin: 3px 0 0 !important;
        max-width: none !important;
        font-size: clamp(1.55rem, 1.9vw, 2.15rem) !important;
        line-height: 1.12 !important;
    }

    body.ta-shell .ta-home-rebuild-root .ta-home-availability-intro p {
        margin: 8px 0 0 !important;
        line-height: 1.45 !important;
    }
}

body.ta-shell .ta-home-rebuild-root .ta-home-quick-field input[type="time"] {
    box-sizing: border-box !important;
    inline-size: 100% !important;
    min-inline-size: 0 !important;
    max-inline-size: 100% !important;
    block-size: 48px !important;
    min-block-size: 48px !important;
    max-block-size: 48px !important;
    position: static !important;
    transform: none !important;
    padding: 0 12px !important;
    border: 1px solid rgba(246,240,228,.23) !important;
    background: rgba(4,43,33,.45) !important;
    color: var(--ta-ivory, #F6F0E4) !important;
}
