/* Editorial UI v1.1. Loaded after style.css; scoped to accommodation pages.
   Keep this filename immutable so a new release cannot reuse a cached asset. */

:is(.stay-catalog-page, .stay-detail-page, .host-page, .portal-form-page) {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
}

:is(.stay-catalog-page, .stay-detail-page, .host-page, .portal-form-page)
    :is(.stay-filter__field, .stay-card, .stay-card__body, .stay-detail-hero__copy,
        .stay-detail-content, .stay-panel, .stay-inquiry-card, .portal-form-card,
        .portal-section, .portal-form, .portal-form-grid, .form-field,
        .host-listing-card, .inquiry-card, .portal-header__actions) {
    min-width: 0;
}

:is(.stay-catalog-page, .host-page, .portal-form-page) .portal-header__actions {
    max-width: 100%;
}

:is(.stay-catalog-page, .stay-detail-page, .host-page, .portal-form-page)
    :is(.portal-header, .portal-section__heading, .stay-card__footer,
        .stay-breadcrumb, .pagination) {
    flex-wrap: wrap;
}

:is(.host-page, .portal-form-page) .portal-header > div:first-child {
    flex: 1 1 24rem;
    min-width: 0;
}

:is(.host-page, .portal-form-page)
    :is(.host-listing-card, .inquiry-card) > div {
    min-width: 0;
}

.stay-catalog-page .info-hero > .portal-header__actions {
    margin: 24px 0 0;
}

:is(.stay-catalog-page, .stay-detail-page, .host-page, .portal-form-page)
    :is(.primary-action, .secondary-action) {
    max-width: 100%;
    min-width: 0;
    min-height: 46px;
    white-space: normal;
    text-align: center;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

:is(.stay-catalog-page, .stay-detail-page, .host-page, .portal-form-page)
    .secondary-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border: 1px solid var(--accent);
    border-radius: 12px;
    background: var(--surface);
    color: var(--accent);
    font: inherit;
    font-weight: 700;
    line-height: 1.45;
    text-decoration: none;
}

:is(.stay-catalog-page, .stay-detail-page, .host-page, .portal-form-page)
    .secondary-action:hover {
    background: #edf3f3;
    color: var(--accent-dark);
}

:is(.stay-catalog-page, .stay-detail-page, .host-page, .portal-form-page)
    :is(a, button, input, select, textarea):focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
}

:is(.stay-catalog-page, .stay-detail-page, .host-page, .portal-form-page)
    :is(.verified-badge, .status-badge) {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
}

:is(.stay-catalog-page, .stay-detail-page, .host-page, .portal-form-page)
    :is(input, select, textarea, fieldset, legend) {
    min-width: 0;
    max-width: 100%;
}

:is(.stay-detail-page, .host-page, .portal-form-page) .portal-form {
    display: grid;
    gap: 18px;
}

:is(.stay-detail-page, .host-page, .portal-form-page)
    .form-field--checkbox label {
    min-height: 44px;
    align-items: flex-start;
}

:is(.stay-detail-page, .host-page, .portal-form-page)
    .portal-form input[type="checkbox"] {
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    min-height: 20px;
    margin: 4px 0 0;
    padding: 0;
}

:is(.stay-detail-page, .host-page, .portal-form-page)
    .form-field--checkbox label > span {
    min-width: 0;
}

.stay-catalog-page .pagination a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
}

.stay-catalog-page .stay-card__footer > a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
}

@media (max-width: 900px) {
    .stay-detail-page :is(.stay-detail-hero, .stay-detail-layout) {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 680px) {
    :is(.stay-catalog-page, .stay-detail-page, .host-page, .portal-form-page)
        :is(.stay-filter, .stay-grid, .portal-form-grid) {
        grid-template-columns: minmax(0, 1fr);
    }

    :is(.host-page, .portal-form-page) .portal-header > div:first-child {
        flex-basis: auto;
    }

    :is(.stay-catalog-page, .stay-detail-page, .host-page, .portal-form-page)
        :is(.portal-header__actions, .host-listing-actions) {
        width: 100%;
    }

    :is(.stay-catalog-page, .stay-detail-page, .host-page, .portal-form-page)
        :is(.portal-header__actions, .host-listing-actions) > :is(a, button, form) {
        flex: 1 1 12rem;
        min-width: 0;
        max-width: 100%;
    }

    :is(.host-page, .portal-form-page) .host-listing-actions form > button {
        width: 100%;
    }

    :is(.stay-detail-page, .host-page, .portal-form-page)
        .portal-form > .primary-action {
        width: 100%;
    }

    :is(.stay-catalog-page, .stay-detail-page, .host-page, .portal-form-page)
        :is(input, select, textarea) {
        font-size: 16px;
    }

    :is(.stay-catalog-page, .stay-detail-page, .host-page, .portal-form-page)
        :is(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), select) {
        min-height: 46px;
    }

    :is(.stay-detail-page, .host-page, .portal-form-page) h1 {
        font-size: clamp(2rem, 8vw, 2.8rem);
    }
}

@media (max-width: 420px) {
    :is(.stay-detail-page, .host-page, .portal-form-page)
        :is(.stay-panel, .stay-inquiry-card, .portal-form-card, .portal-section) {
        padding: 18px;
    }

    .stay-catalog-page :is(.stay-card__body, .stay-filter, .empty-state) {
        padding: 18px;
    }

    :is(.host-page, .portal-form-page) .portal-warning {
        padding: 18px;
    }

    .stay-detail-page :is(.stay-facts, .amenity-list) {
        grid-template-columns: minmax(0, 1fr);
    }

    .stay-detail-page .amenity-list {
        padding-left: 20px;
    }

    .stay-detail-page :is(.stay-detail-hero, .stay-detail-layout) {
        gap: 24px;
    }
}
