/* Aurelia mobile and accessibility guardrails. Generated file; edit assets/src/css/mobile-accessibility.css. */
/*
 * #0122.9 — Mobile & Accessibility.
 *
 * Final interaction and reflow guardrails for Aurelia and the public Hotel
 * Booking markup. No availability, pricing, validation or transaction logic.
 */

.aurelia-site [hidden] {
    display: none !important;
}

.aurelia-site :where(main, section, article, aside, header, footer, nav, form, fieldset, div) {
    min-width: 0;
}

.aurelia-site :where(h1, h2, h3, h4, h5, h6, p, li, dd, dt, address, figcaption) {
    overflow-wrap: anywhere;
}

.aurelia-site :where(input, select, textarea, button) {
    max-width: 100%;
}

.aurelia-site :where(a, button, input, select, textarea, summary) {
    -webkit-tap-highlight-color: rgba(31, 102, 115, 0.18);
}

.aurelia-site :where(
    a,
    button,
    input,
    select,
    textarea,
    summary,
    [tabindex]:not([tabindex="-1"])
):focus-visible {
    outline: 3px solid var(--hb-theme-color-focus) !important;
    outline-offset: 3px !important;
    box-shadow: none;
}

.aurelia-site :is(
    .aurelia-home-hero,
    .aurelia-footer,
    .aurelia-not-found,
    .hb-room-detail__booking-card,
    .hb-book-now__summary,
    .hb-confirmation-price-card,
    .hb-customer-claim,
    .hb-detail-lightbox
) :where(a, button, input, select, textarea, summary, [tabindex]:not([tabindex="-1"])):focus-visible {
    outline-color: var(--hb-theme-color-champagne-light) !important;
}

.aurelia-site .screen-reader-text:focus,
.aurelia-site .screen-reader-text:focus-visible {
    z-index: 100000;
    top: max(var(--hb-theme-spacing-md), env(safe-area-inset-top));
    left: max(var(--hb-theme-spacing-md), env(safe-area-inset-left));
    width: auto;
    height: auto;
    margin: 0;
    padding: var(--hb-theme-spacing-sm) var(--hb-theme-spacing-md);
    overflow: visible;
    clip: auto;
    white-space: normal;
    color: var(--hb-theme-color-primary-contrast);
    background: var(--hb-theme-color-charcoal);
}

.aurelia-site :where(input, textarea)::placeholder {
    color: var(--hb-theme-color-text-muted);
    opacity: 1;
}

.aurelia-site :where(input, select, textarea)[aria-invalid="true"],
.aurelia-site :where(input, select, textarea):user-invalid {
    border-color: var(--hb-theme-color-error) !important;
    box-shadow: 0 0 0 3px rgba(154, 51, 45, 0.14);
}

.aurelia-site :is(
    .hb-notice--error,
    .hb-book-now__notice--error,
    .hb-book-now__field-error,
    .hb-customer-notice--error,
    .hb-room-detail__notice
) {
    border-inline-start: 3px solid var(--hb-theme-color-error) !important;
}

.aurelia-site :where(
    .aurelia-menu a,
    .aurelia-secondary-menu a,
    .aurelia-footer-menu a,
    .aurelia-social-menu a,
    .aurelia-button,
    .wp-element-button,
    .wp-block-button__link,
    .hb-search-form button,
    .hb-room-card__button,
    .aurelia-search-room__button,
    .hb-detail-button,
    .hb-related-room__link,
    .hb-book-now button,
    .hb-book-now input[type="submit"],
    .hb-customer-form button,
    .hb-customer-filters a,
    .hb-customer-pagination a,
    .hb-room-reviews__pagination a,
    .hb-room-reviews__pagination span,
    .hb-review-stars label,
    .aurelia-search-result__link
) {
    min-width: var(--hb-theme-interaction-target-min);
    min-height: var(--hb-theme-interaction-target-min);
}

.aurelia-site .ui-datepicker td a,
.aurelia-site .ui-datepicker td span {
    display: grid;
    width: 100%;
    min-width: 0;
    min-height: var(--hb-theme-interaction-target-min);
    place-items: center;
}

.aurelia-site .hb-detail-gallery__thumb {
    min-width: 4rem !important;
    min-height: 3rem;
}

.aurelia-site .hb-detail-lightbox__close {
    min-width: 3rem;
    min-height: 3rem;
    top: max(var(--hb-theme-spacing-md), env(safe-area-inset-top));
    right: max(var(--hb-theme-spacing-md), env(safe-area-inset-right));
}

.aurelia-site .hb-detail-lightbox__image {
    max-width: calc(100vw - max(2rem, env(safe-area-inset-left) + env(safe-area-inset-right)));
    max-height: calc(100dvh - max(2rem, env(safe-area-inset-top) + env(safe-area-inset-bottom)));
}

.aurelia-site :where([id], input, select, textarea, [role="alert"]) {
    scroll-margin-top: 8rem;
}

@media (hover: none), (pointer: coarse) {
    .aurelia-site :where(a, button, input, select, textarea, summary) {
        touch-action: manipulation;
    }

    .aurelia-site :where(
        .aurelia-home-room__media img,
        .aurelia-experience__media img,
        .aurelia-home-gallery__image,
        .aurelia-card__media img,
        .hb-detail-gallery__main,
        .hb-related-room
    ) {
        transform: none !important;
    }
}

/* 1440+ desktop: preserve readable measures and safe sticky panels. */
@media (min-width: 1440px) {
    .aurelia-site .aurelia-shell,
    .aurelia-site .aurelia-container {
        max-width: var(--hb-theme-container-content);
    }

    .aurelia-site .hb-room-detail__sidebar,
    .aurelia-site .hb-book-now__summary,
    .aurelia-site .hb-confirmation-price-card,
    .aurelia-site .hb-customer-claim {
        max-height: calc(100dvh - 3rem);
        overflow-y: auto;
        overscroll-behavior: contain;
        scrollbar-width: thin;
    }
}

/* 1024 tablet/compact desktop: stacked sidebars must not remain sticky. */
@media (max-width: 1024px) {
    .aurelia-site :is(
        .hb-room-detail__sidebar,
        .hb-book-now__summary,
        .hb-confirmation-price-card,
        .hb-customer-claim
    ) {
        position: static;
        top: auto;
        max-height: none;
        overflow: visible;
    }

    .aurelia-site :is(.hb-book-now__layout, .hb-confirmation-layout, .hb-customer-dashboard__layout) {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* 768 tablet/mobile navigation and single-column form rhythm. */
@media (max-width: 768px) {
    .aurelia-site .aurelia-header {
        top: 0;
    }

    .admin-bar.aurelia-site .aurelia-header {
        top: 46px;
    }

    .aurelia-site .aurelia-menu > li > a,
    .aurelia-site .aurelia-menu .sub-menu a {
        min-height: 3.25rem;
    }

    .aurelia-site :is(
        .hb-search-form__grid,
        .hb-book-now__field-grid,
        .hb-customer-form__grid,
        .hb-confirmation-layout,
        .hb-customer-summary
    ) {
        grid-template-columns: minmax(0, 1fr);
    }

    .aurelia-site :where(table) {
        display: block;
        max-width: 100%;
        overflow-x: auto;
        overscroll-behavior-inline: contain;
        scrollbar-width: thin;
    }
}

/* 430 large phone: one-hand actions and safe fixed CTA. */
@media (max-width: 430px) {
    .aurelia-site {
        --hb-theme-container-gutter: 1rem;
    }

    .aurelia-site :where(
        .hb-search-form__submit,
        .hb-room-detail__book-button,
        .hb-book-now__submit,
        .hb-customer-form button[type="submit"],
        .hb-cancellation__form button,
        .aurelia-search-form__submit
    ) {
        width: 100%;
    }

    .aurelia-site.aurelia-booking-shortcut-visible {
        padding-bottom: calc(4.75rem + env(safe-area-inset-bottom));
    }

    .aurelia-site .aurelia-home-booking-shortcut {
        right: max(var(--hb-theme-spacing-md), env(safe-area-inset-right));
        bottom: max(var(--hb-theme-spacing-md), env(safe-area-inset-bottom));
        left: max(var(--hb-theme-spacing-md), env(safe-area-inset-left));
    }

    .aurelia-site :is(.hb-room-detail__booking-card, .hb-book-now__summary, .hb-confirmation-price-card) {
        padding: var(--hb-theme-spacing-lg);
    }
}

/* 375 phone: simplify dense horizontal controls. */
@media (max-width: 375px) {
    .aurelia-site .aurelia-header__inner {
        gap: var(--hb-theme-spacing-sm);
    }

    .aurelia-site .aurelia-branding__name {
        font-size: 1.5rem;
    }

    .aurelia-site :is(.hb-search-summary__list, .hb-room-detail__facts, .hb-room-review-public__criteria) {
        grid-template-columns: minmax(0, 1fr);
    }

    .aurelia-site .hb-detail-gallery__thumbs {
        margin-inline: 0;
        scroll-padding-inline: var(--hb-theme-spacing-sm);
    }
}

/* 320 minimum supported viewport: no clipped title, field or action. */
@media (max-width: 320px) {
    .aurelia-site {
        --hb-theme-container-gutter: 0.75rem;
    }

    .aurelia-site :is(
        .aurelia-home-hero h1,
        .hb-room-detail__title,
        .aurelia-secondary-hero h1,
        .aurelia-page-entry__header h1,
        .aurelia-article__header h1
    ) {
        font-size: clamp(2.5rem, 15vw, 3rem);
        letter-spacing: -0.035em;
    }

    .aurelia-site :is(.aurelia-home-booking__shell, .hb-book-now__card, .hb-customer-login__panel) {
        padding-inline: var(--hb-theme-spacing-md);
    }

    .aurelia-site :where(input, select, textarea, button) {
        min-width: 0;
    }
}

@media (max-height: 700px) and (min-width: 1025px) {
    .aurelia-site :is(
        .hb-room-detail__sidebar,
        .hb-book-now__summary,
        .hb-confirmation-price-card,
        .hb-customer-claim
    ) {
        position: static;
        max-height: none;
        overflow: visible;
    }
}

@media (prefers-reduced-motion: reduce) {
    .aurelia-site :where(*) {
        scroll-snap-type: none !important;
    }
}

@media (prefers-contrast: more) {
    .aurelia-site {
        --hb-theme-color-border: #8A785E;
        --hb-theme-color-text-muted: #4F4940;
    }

    .aurelia-site :where(input, select, textarea, button, .aurelia-button) {
        border-width: 2px;
    }
}

@media (forced-colors: active) {
    .aurelia-site :where(a, button, input, select, textarea, summary):focus-visible {
        outline: 3px solid Highlight !important;
    }

    .aurelia-site :is(.aurelia-button, .hb-detail-button, .hb-book-now__submit) {
        border: 1px solid ButtonText;
    }
}

@media print {
    .aurelia-site .aurelia-home-booking-shortcut,
    .aurelia-site .hb-detail-lightbox {
        display: none !important;
    }
}
