/**
 * Rezideo catalog: card grid + filter panel.
 * Visual language follows the MIB card design (green palette), but every
 * selector is rezideo-namespaced so it cannot collide with the MIB CSS that
 * is also active on the dev site. Palette via custom properties.
 */
.rezideo-catalog {
    --rzc-primary: #0b5952;
    --rzc-secondary: #0d635b;
    --rzc-accent: #9bc837;
    --rzc-text-light: #ffffff;
    --rzc-muted: #b7cfcc;
    position: relative;
}

/*
 * MIB-compatible mode (card_style="mib"): the cards take their look from the
 * host page's own CSS, so the filter UI follows the host palette too. Site
 * CSS can override these custom properties.
 */
.rezideo-catalog--mib {
    --rzc-primary: #4e413c;
    --rzc-secondary: #4e413c;
    --rzc-accent: #4e413c;
    --rzc-chip-text: #4e413c;
    --rzc-chip-bg-active: #4e413c;
    --rzc-chip-text-active: #fef8ee;
    --rzc-pill-bg: rgba(78, 65, 60, .08);
    --rzc-pill-bg-hover: rgba(78, 65, 60, .16);
}

/* The Hello Elementor theme resets every button to its pink (#c36) scheme
 * (border, color, hover background). Neutralize it inside the plugin UI so
 * the component classes and Bootstrap decide how buttons look. */
.rezideo-catalog button,
.rezideo-detail button,
.rezideo-filters-widget button {
    border: 0;
    background-color: transparent;
    color: inherit;
}
.rezideo-catalog button:hover,
.rezideo-catalog button:focus,
.rezideo-detail button:hover,
.rezideo-detail button:focus,
.rezideo-filters-widget button:hover,
.rezideo-filters-widget button:focus {
    background-color: transparent;
    color: inherit;
}

.rezideo-catalog.is-loading { pointer-events: none; }

/* AJAX loading overlay: dims the whole catalog and shows a centered ring
 * with a label. The box is sticky so it stays in view on long lists. */
.rezideo-catalog__spinner {
    display: none;
    position: absolute;
    inset: 0;
    /* Above the advanced-filters sheet (9999) and its backdrop (9998):
     * chip clicks inside the open sheet reload the catalog too, and the
     * loading state must stay visible over the sheet. */
    z-index: 10000;
    background: rgba(255, 255, 255, .65);
}
.rezideo-catalog.is-loading .rezideo-catalog__spinner { display: block; }
/* Chip clicks inside the open advanced sheet: no whitish veil over the
 * sheet, a single centered card floats above it instead. */
.rezideo-catalog.is-sheet-loading .rezideo-catalog__spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    background: transparent;
    pointer-events: none;
}
.rezideo-catalog.is-sheet-loading .rezideo-catalog__spinner-box {
    position: static;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 6px 30px rgba(0, 0, 0, .25);
    padding: 22px 30px;
}
.rezideo-catalog.is-sheet-loading .rezideo-catalog__spinner-text {
    box-shadow: none;
    padding: 0;
}
.rezideo-catalog__spinner-box {
    position: sticky;
    top: 35vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 24px 0;
}
.rezideo-catalog__spinner-ring {
    width: 42px;
    height: 42px;
    border: 4px solid rgba(0, 0, 0, .12);
    border-top-color: var(--rzc-primary, #0b5952);
    border-radius: 50%;
    animation: rzc-spin .8s linear infinite;
}
@keyframes rzc-spin { to { transform: rotate(360deg); } }
.rezideo-catalog__spinner-text {
    padding: 6px 16px;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .12);
    font-size: 14px;
    font-weight: 600;
    color: var(--rzc-chip-text, var(--rzc-primary, #0b5952));
}

/* --- Filter panel ---
 * Fixed row order: 1. project pills, 2. type chips, 3. range sliders,
 * 4. centered actions (advanced sheet trigger + reset). */
.rezideo-catalog__filters {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-bottom: 24px;
}
.rezideo-catalog__sliders {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: center;
    gap: 16px 24px;
}
.rezideo-catalog__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px 16px;
}

/* --- Project picker ---
 * Desktop (>=768px): wrapping pill bar, every project visible. Its own
 * full-width row on top of the panel: pick the park first, refine below.
 * Filled pills and larger touch targets mark it as the primary filter.
 * Mobile (<768px): the wrap would eat 4-6 rows as the project list grows,
 * so the same DOM collapses into a select-like trigger field that opens a
 * bottom sheet with the options as radio rows (standard mobile filter
 * pattern; the sheet chrome classes are shared with the advanced sheet). */
.rezideo-catalog__projects {
    border: 0;
    padding: 0;
    margin: 0;
    flex-basis: 100%;
    min-width: 0;
}
.rezideo-catalog__projects legend {
    font-size: 13px;
    font-weight: 600;
    padding: 0;
    margin: 0 auto 10px;
    text-align: center;
}
.rezideo-catalog__project-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    padding: 2px;
}
.rezideo-catalog__project-pill {
    cursor: pointer;
    flex: 0 0 auto;
}
/* The real radio stays in the DOM for the JS but is visually hidden */
.rezideo-catalog__project-pill input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}
.rezideo-catalog__project-pill span {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 10px 20px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    color: var(--rzc-chip-text, var(--rzc-primary, #0b5952));
    background: var(--rzc-pill-bg, rgba(11, 89, 82, .07));
    white-space: nowrap;
    user-select: none;
    transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}
.rezideo-catalog__project-pill:hover span {
    background: var(--rzc-pill-bg-hover, rgba(11, 89, 82, .14));
}
.rezideo-catalog__project-pill input:checked + span {
    background: var(--rzc-chip-bg-active, var(--rzc-primary, #0b5952));
    color: var(--rzc-chip-text-active, #fff);
    box-shadow: 0 2px 10px rgba(0, 0, 0, .16);
}
.rezideo-catalog__project-pill input:focus-visible + span {
    outline: 2px solid var(--rzc-primary, #0b5952);
    outline-offset: 2px;
}
/* Desktop: the sheet chrome is invisible, the list renders inline as-is.
 * Trigger selectors carry the #rezideo-catalog id so no theme/kit button
 * styling loaded after this stylesheet can outrank them (site gotcha:
 * theme CSS loads after the plugin's). */
#rezideo-catalog .rezideo-catalog__project-trigger { display: none; }
.rezideo-catalog__project-backdrop { display: none; }
.rezideo-catalog__project-sheet .rezideo-catalog__sheet-head { display: none; }

/* Sort picker desktop: same trick, the sheet wrappers dissolve so the
 * label + chips stay direct flex items of the sort row */
#rezideo-catalog .rezideo-catalog__sort-trigger { display: none; }
.rezideo-catalog__sort-backdrop { display: none; }
.rezideo-catalog__sort-sheet,
.rezideo-catalog__sort-sheet-body { display: contents; }
.rezideo-catalog__sort-sheet .rezideo-catalog__sheet-head { display: none; }

@media (max-width: 767px) {
    .rezideo-catalog__projects legend { display: none; }

    /* Rooms chips always get their own row in the wrapping sliders flex */
    #rezideo-catalog .rezideo-catalog__rooms {
        flex-basis: 100%;
        min-width: 0;
    }

    /* No grid/list switch on phones (a lone grid icon would be pointless,
     * so the whole toggle goes); restoreView() forces grid here too. */
    #rezideo-catalog .rezideo-catalog__viewtoggle {
        display: none;
    }

    /* Toolbar on phones: the sort chips collapse into a compact trigger
     * button and bottom sheet (same pattern as the project picker). No
     * selected-value badge on the trigger, so it fits on one row next to
     * the favorites button; the active sort shows inside the sheet. */
    #rezideo-catalog .rezideo-catalog__sort-sheet-body > .rezideo-catalog__sort-label { display: none; }
    /* The sort group and the favorites button split the toolbar row 50-50 */
    #rezideo-catalog .rezideo-catalog__sort {
        flex: 1 1 0;
        min-width: 0;
    }
    #rezideo-catalog .rezideo-catalog__sort-trigger {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        width: 100%;
        min-height: 44px;
        padding: 8px 18px;
        border: 0;
        border-radius: 999px;
        background: var(--rzc-chip-bg-active, var(--rzc-primary, #0b5952));
        color: var(--rzc-chip-text-active, #fff);
        font-size: 14px;
        font-weight: 700;
        line-height: 1.2;
        cursor: pointer;
        box-shadow: 0 2px 10px rgba(0, 0, 0, .16);
        transition: transform .1s ease, box-shadow .15s ease;
    }
    #rezideo-catalog .rezideo-catalog__sort-trigger:active {
        transform: scale(.985);
        box-shadow: 0 1px 5px rgba(0, 0, 0, .18);
    }
    /* Page-level custom CSS paints FA glyphs with !important; the id
     * selector keeps the trigger icon white on the filled button. */
    #rezideo-catalog .rezideo-catalog__sort-trigger i,
    #rezideo-catalog .rezideo-catalog__sort-trigger i:before {
        color: var(--rzc-chip-text-active, #fff) !important;
        font-size: 13px;
    }
    #rezideo-catalog .rezideo-catalog__sort-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 9998;
        background: rgba(0, 0, 0, .45);
        opacity: 0;
        pointer-events: none;
        transition: opacity .25s ease;
    }
    #rezideo-catalog .rezideo-catalog__sort-backdrop.is-open {
        opacity: 1;
        pointer-events: auto;
    }
    #rezideo-catalog .rezideo-catalog__sort-sheet {
        display: flex;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 9999;
        flex-direction: column;
        max-height: 75vh;
        background: #fff;
        border-radius: 20px 20px 0 0;
        box-shadow: 0 -8px 40px rgba(0, 0, 0, .25);
        transform: translateY(100%);
        visibility: hidden;
        transition: transform .25s ease, visibility 0s linear .25s;
    }
    #rezideo-catalog .rezideo-catalog__sort-sheet.is-open {
        transform: translateY(0);
        visibility: visible;
        transition: transform .25s ease;
    }
    #rezideo-catalog .rezideo-catalog__sort-sheet.is-instant { transition: none; }
    #rezideo-catalog .rezideo-catalog__sort-sheet .rezideo-catalog__sheet-head { display: flex; }
    #rezideo-catalog .rezideo-catalog__sort-sheet-body {
        display: block;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: 4px 20px calc(16px + env(safe-area-inset-bottom, 0px));
    }
    /* Chips restyled as tappable rows inside the sheet; a tap cycles the
     * direction, so the sheet stays open (close via X or the backdrop). */
    #rezideo-catalog .rezideo-catalog__sort-sheet-body .rezideo-catalog__sort-chip {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        min-height: 48px;
        margin: 0;
        padding: 12px 4px;
        border: 0;
        border-radius: 0;
        border-bottom: 1px solid rgba(0, 0, 0, .07);
        background: none;
        box-shadow: none;
        font-size: 15px;
        font-weight: 500;
        color: inherit;
    }
    #rezideo-catalog .rezideo-catalog__sort-sheet-body .rezideo-catalog__sort-chip:last-child { border-bottom: 0; }
    #rezideo-catalog .rezideo-catalog__sort-sheet-body .rezideo-catalog__sort-chip.is-active {
        background: none;
        color: var(--rzc-chip-text, var(--rzc-primary, #0b5952));
        font-weight: 700;
    }
    #rezideo-catalog .rezideo-catalog__toolbar button.rezideo-catalog__favbtn {
        flex: 1 1 0;
        min-width: 0;
        min-height: 44px;
        margin-left: 0;
        justify-content: center;
    }
    /* Account line (email + logout) left-aligned under the buttons */
    #rezideo-catalog .rezideo-catalog__toolbar .rzc-account-badge {
        justify-content: flex-start;
        margin-top: 4px;
    }

    /* Trigger: styled as an obvious button (filled primary pill, like the
     * active project pill), with the current selection shown in a light
     * badge so the "Összes" state is explicit. The fieldset centers it as
     * a flex column (belt and braces with the auto margins). */
    #rezideo-catalog .rezideo-catalog__projects {
        display: flex;
        flex-direction: column;
        align-items: center;
        /* Cross-axis auto margins: the fieldset is an item of the
         * column-flex filters panel, so this shrinks it to content
         * width and centers it (stretch would keep it left-anchored). */
        margin: 0 auto;
    }
    #rezideo-catalog .rezideo-catalog__project-trigger {
        display: flex;
        align-items: center;
        gap: 12px;
        width: fit-content;
        max-width: 100%;
        margin: 0 auto;
        min-height: 52px;
        padding: 12px 22px;
        border: 0;
        border-radius: 999px;
        background: var(--rzc-chip-bg-active, var(--rzc-primary, #0b5952));
        color: var(--rzc-chip-text-active, #fff);
        font-size: 15px;
        font-weight: 700;
        line-height: 1.2;
        text-align: left;
        cursor: pointer;
        box-shadow: 0 2px 10px rgba(0, 0, 0, .16);
        transition: transform .1s ease, box-shadow .15s ease;
    }
    #rezideo-catalog .rezideo-catalog__project-trigger:active {
        transform: scale(.985);
        box-shadow: 0 1px 5px rgba(0, 0, 0, .18);
    }
    #rezideo-catalog .rezideo-catalog__project-trigger-label {
        flex: 0 1 auto;
        color: inherit;
    }
    #rezideo-catalog .rezideo-catalog__project-trigger-value {
        flex: 0 1 auto;
        max-width: 55%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        padding: 4px 12px;
        border-radius: 999px;
        background: rgba(255, 255, 255, .92);
        color: var(--rzc-primary, #0b5952);
        font-size: 13px;
        font-weight: 700;
    }

    /* Bottom sheet shell (same visual system as the advanced sheet) */
    .rezideo-catalog__project-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 9998;
        background: rgba(0, 0, 0, .45);
        opacity: 0;
        pointer-events: none;
        transition: opacity .25s ease;
    }
    .rezideo-catalog__project-backdrop.is-open {
        opacity: 1;
        pointer-events: auto;
    }
    .rezideo-catalog__project-sheet {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 9999;
        display: flex;
        flex-direction: column;
        max-height: 75vh;
        background: #fff;
        border-radius: 20px 20px 0 0;
        box-shadow: 0 -8px 40px rgba(0, 0, 0, .25);
        transform: translateY(100%);
        visibility: hidden;
        transition: transform .25s ease, visibility 0s linear .25s;
    }
    .rezideo-catalog__project-sheet.is-open {
        transform: translateY(0);
        visibility: visible;
        transition: transform .25s ease;
    }
    .rezideo-catalog__project-sheet.is-instant { transition: none; }
    .rezideo-catalog__project-sheet .rezideo-catalog__sheet-head { display: flex; }
    .rezideo-catalog__project-sheet-body {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: 4px 20px calc(16px + env(safe-area-inset-bottom, 0px));
    }

    /* Pills restyled as radio option rows inside the sheet */
    .rezideo-catalog__project-sheet .rezideo-catalog__project-list {
        display: block;
        padding: 0;
    }
    .rezideo-catalog__project-sheet .rezideo-catalog__project-pill { display: block; }
    .rezideo-catalog__project-sheet .rezideo-catalog__project-pill span {
        display: flex;
        align-items: center;
        gap: 12px;
        width: 100%;
        min-height: 48px;
        padding: 12px 4px;
        border-radius: 0;
        background: none;
        box-shadow: none;
        border-bottom: 1px solid rgba(0, 0, 0, .07);
        font-size: 15px;
        font-weight: 500;
        color: inherit;
        white-space: normal;
    }
    .rezideo-catalog__project-sheet .rezideo-catalog__project-pill:last-child span { border-bottom: 0; }
    .rezideo-catalog__project-sheet .rezideo-catalog__project-pill span::before {
        content: '';
        flex: 0 0 auto;
        width: 20px;
        height: 20px;
        box-sizing: border-box;
        border: 2px solid rgba(0, 0, 0, .28);
        border-radius: 50%;
        transition: border .15s ease;
    }
    .rezideo-catalog__project-sheet .rezideo-catalog__project-pill input:checked + span {
        background: none;
        color: var(--rzc-chip-text, var(--rzc-primary, #0b5952));
        font-weight: 700;
        box-shadow: none;
    }
    .rezideo-catalog__project-sheet .rezideo-catalog__project-pill input:checked + span::before {
        border: 6px solid var(--rzc-chip-bg-active, var(--rzc-primary, #0b5952));
    }
    .rezideo-catalog__project-sheet .rezideo-catalog__project-pill:hover span { background: none; }
}

@media (prefers-reduced-motion: reduce) {
    .rezideo-catalog__project-sheet,
    .rezideo-catalog__project-backdrop { transition: none; }
}
.rezideo-catalog__types {
    border: 0;
    padding: 0;
    margin: 0;
}
.rezideo-catalog__types legend {
    font-size: 13px;
    font-weight: 600;
    padding: 0;
    margin: 0 auto 10px;
    text-align: center;
}
.rezideo-catalog__type-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 10px;
}
/* Inside the sheet the facet chips stay left-aligned for scanability */
.rezideo-catalog__facet .rezideo-catalog__facet-list { justify-content: flex-start; }
.rezideo-catalog__type,
.rezideo-catalog__facet-chip { cursor: pointer; }
/* The real checkbox stays in the DOM for the JS but is visually hidden */
.rezideo-catalog__type input,
.rezideo-catalog__facet-chip input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}
.rezideo-catalog__type span,
.rezideo-catalog__facet-chip span {
    display: inline-flex;
    align-items: center;
    height: auto;
    padding: 7px 18px;
    border: 1.5px solid var(--rzc-primary, #0b5952);
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    color: var(--rzc-chip-text, var(--rzc-primary, #0b5952));
    background: transparent;
    white-space: nowrap;
    user-select: none;
    transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}
.rezideo-catalog__type:hover span,
.rezideo-catalog__facet-chip:hover span { box-shadow: 0 1px 6px rgba(0, 0, 0, .18); }
.rezideo-catalog__type input:checked + span,
.rezideo-catalog__facet-chip input:checked + span {
    background: var(--rzc-chip-bg-active, var(--rzc-primary, #0b5952));
    color: var(--rzc-chip-text-active, #fff);
}
.rezideo-catalog__type input:focus-visible + span,
.rezideo-catalog__facet-chip input:focus-visible + span {
    outline: 2px solid var(--rzc-primary, #0b5952);
    outline-offset: 2px;
}

.rezideo-catalog__slider-box { min-width: 210px; flex: 0 1 240px; }
.rezideo-catalog__slider-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 10px;
    text-align: center;
}
.rezideo-catalog-slider { margin: 8px 6px 6px; height: 6px; }
.rezideo-catalog-slider .noUi-connect { background: var(--rzc-primary, #0b5952); }
.rezideo-catalog-slider .noUi-handle {
    width: 18px;
    height: 18px;
    right: -9px;
    top: -7px;
    border-radius: 50%;
    background: var(--rzc-primary, #0b5952);
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .3);
    cursor: pointer;
}
.rezideo-catalog-slider .noUi-handle::before,
.rezideo-catalog-slider .noUi-handle::after { display: none; }
.rezideo-catalog-slider .noUi-handle:focus-visible {
    outline: 2px solid var(--rzc-primary, #0b5952);
    outline-offset: 2px;
}
.rezideo-catalog__slider-value { font-size: 13px; margin: 6px 0 0; }

/* Minimum-rooms chip row (replaces the rooms slider) */
.rezideo-catalog__rooms {
    border: 0;
    padding: 0;
    margin: 0;
    min-width: 210px;
}
.rezideo-catalog__rooms-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 10px;
}
/* On phones the rooms chips must stay on a single row: no wrap, tighter
 * padding and gaps so "Bármennyi" + 1..5+ fits a 320px viewport. */
@media (max-width: 560px) {
    .rezideo-catalog__rooms { min-width: 0; }
    .rezideo-catalog__rooms-list {
        flex-wrap: nowrap;
        gap: 6px;
    }
    .rezideo-catalog__rooms-list .rezideo-catalog__facet-chip span {
        padding: 6px 10px;
        font-size: 12px;
    }
}

/* Card hearts flip over on hover, like the toolbar favorites button */
.rezideo-catalog .favorite-icon {
    display: inline-block;
    transition: transform .45s ease, color .2s ease;
}
.rezideo-catalog .favorite-icon:hover { transform: rotateY(180deg); }
/* While the add request runs the icon is a spinner: no flip, no pointer */
.rezideo-catalog .favorite-icon.rzc-busy,
.rezideo-catalog .favorite-icon.rzc-busy:hover {
    transform: none;
    cursor: default;
}

/* Confirmation bubble above the heart after adding a favorite */
.rzc-tip-anchor { position: relative; }
.rzc-fav-tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    z-index: 60;
    padding: 6px 12px;
    border-radius: 8px;
    background: #333334;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
    pointer-events: none;
    animation: rzc-tip-in .2s ease;
}
.rzc-fav-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 14px;
    border: 5px solid transparent;
    border-top-color: #333334;
}
.rzc-fav-tooltip.is-leaving { opacity: 0; transition: opacity .3s ease; }
@keyframes rzc-tip-in {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---- Account popup (login/register + unsubscribe confirm) ---- */
.rzc-account-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9998;
    background: rgba(0, 0, 0, .55);
}
.rzc-account-popup {
    position: fixed;
    z-index: 9999;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(440px, calc(100vw - 32px));
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    background: #fff;
    color: #222;
    border-radius: 14px;
    padding: 26px 24px 22px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .3);
}
body.rzc-account-lock { overflow: hidden; }

/* The Hello theme reset paints every button pink (#c36 border, pink hover
 * background) and loads AFTER this stylesheet, so equal-specificity rules
 * lose to it. The popups live outside the catalog container: they need
 * their own neutralizer, and every component rule below is prefixed with
 * .rzc-account-popup so it outranks the theme regardless of load order. */
.rzc-account-popup button {
    border: 0;
    background-color: transparent;
    color: inherit;
}
.rzc-account-popup button:hover,
.rzc-account-popup button:focus {
    background-color: transparent;
    color: inherit;
}
.rzc-account-popup a {
    color: var(--rzc-primary, #0b5952);
}

.rzc-account-popup .rzc-account-popup__close {
    position: absolute;
    top: 8px;
    right: 12px;
    padding: 0;
    font-size: 26px;
    line-height: 1;
    border: 0;
    background: transparent;
    cursor: pointer;
    color: #666;
}
.rzc-account-popup__title { margin: 0 0 8px; font-size: 20px; }
.rzc-account-popup__lead { margin: 0 0 16px; font-size: 14px; line-height: 1.5; color: #555; }
/* Segmented toggle: the two options sit on a shared tinted track, the
 * active one gets the filled thumb. Two separate outlined pills read as
 * action buttons, which users did not recognize as a mode switch. */
.rzc-account-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    padding: 4px;
    background: var(--rzc-pill-bg, rgba(11, 89, 82, .09));
    border-radius: 999px;
}
.rzc-account-popup .rzc-account-tab {
    flex: 1;
    padding: 9px 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--rzc-chip-text, var(--rzc-primary, #0b5952));
    font-weight: 600;
    cursor: pointer;
    transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}
.rzc-account-popup .rzc-account-tab:hover,
.rzc-account-popup .rzc-account-tab:focus {
    background: rgba(255, 255, 255, .55);
    color: var(--rzc-chip-text, var(--rzc-primary, #0b5952));
}
.rzc-account-popup .rzc-account-tab.is-active,
.rzc-account-popup .rzc-account-tab.is-active:hover,
.rzc-account-popup .rzc-account-tab.is-active:focus {
    background: var(--rzc-chip-bg-active, var(--rzc-primary, #0b5952));
    color: var(--rzc-chip-text-active, #fff);
    box-shadow: 0 1px 4px rgba(0, 0, 0, .18);
}
.rzc-account-info {
    margin-bottom: 12px;
    padding: 10px 14px;
    border: 1px solid var(--rzc-pill-bg-hover, rgba(11, 89, 82, .16));
    border-radius: 10px;
    background: var(--rzc-pill-bg, rgba(11, 89, 82, .06));
    font-size: 13px;
    line-height: 1.5;
}
.rzc-account-field { display: block; margin-bottom: 12px; }
.rzc-account-field span { display: block; font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.rzc-account-field input {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #bbb;
    border-radius: 8px;
    font-size: 15px;
}
.rzc-account-gdpr {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    font-size: 13px;
    line-height: 1.45;
    margin-bottom: 12px;
}
.rzc-account-gdpr input { margin-top: 3px; }
.rzc-account-turnstile { margin-bottom: 12px; min-height: 66px; }
.rzc-account-popup .rzc-account-submit,
.rzc-account-popup .rzc-account-verify {
    width: 100%;
    padding: 11px 0;
    border: 0;
    border-radius: 999px;
    background: var(--rzc-primary, #0b5952);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
}
.rzc-account-popup .rzc-account-submit:hover,
.rzc-account-popup .rzc-account-submit:focus,
.rzc-account-popup .rzc-account-verify:hover,
.rzc-account-popup .rzc-account-verify:focus {
    background: var(--rzc-primary, #0b5952);
    color: #fff;
    filter: brightness(1.1);
}
.rzc-account-popup .rzc-account-cancel {
    width: 100%;
    padding: 11px 0;
    border: 1.5px solid #999;
    border-radius: 999px;
    background: transparent;
    color: #444;
    font-weight: 600;
    cursor: pointer;
}
.rzc-account-popup .rzc-account-cancel:hover,
.rzc-account-popup .rzc-account-cancel:focus {
    background: #f1f1f1;
    color: #444;
}
.rzc-account-switch { margin: 12px 0 0; font-size: 13px; text-align: center; }
.rzc-account-switch a { color: var(--rzc-primary, #0b5952); font-weight: 600; }
.rzc-account-error { margin: 12px 0 0; font-size: 13px; color: #b3261e; font-weight: 600; }
.rzc-account-popup--confirm .rzc-account-confirm-row { display: flex; gap: 10px; margin-top: 6px; }

/* Standalone filter widget (project pages, redirects to the catalog page) */
.rezideo-filters-widget {
    max-width: 900px;
    margin: 0 auto;
    padding: 18px 16px;
}
.rezideo-filters-widget__row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 18px 28px;
}
.rezideo-filters-widget__actions {
    margin-top: 18px;
    text-align: center;
}
.rezideo-filters-widget button.rezideo-filters-widget__submit {
    padding: 12px 28px;
    border: 0;
    border-radius: 24px;
    background: var(--rzc-primary, #0b5952);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
}
.rezideo-filters-widget button.rezideo-filters-widget__submit:hover { filter: brightness(1.1); }

.rezideo-catalog__reset {
    padding: 8px 16px;
    border: 1px solid #999;
    border-radius: 20px;
    background: transparent;
    cursor: pointer;
    font-size: 14px;
}
.rezideo-catalog__reset:hover { background: #f1f1f1; }

/* --- Advanced filter sheet (mobile-first) ---
 * Trigger pill opens a bottom sheet on small screens and a centered dialog
 * from tablet up. Facets render as chip groups instead of stacked selects;
 * the footer button carries the live result count (server-rendered). */
.rezideo-catalog__advanced-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 8px 18px;
    border: 1.5px solid var(--rzc-primary, #0b5952);
    border-radius: 999px;
    background: transparent;
    color: var(--rzc-chip-text, var(--rzc-primary, #0b5952));
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: box-shadow .15s ease;
}
.rezideo-catalog__advanced-toggle:hover { box-shadow: 0 1px 6px rgba(0, 0, 0, .18); }
.rezideo-catalog__advanced-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--rzc-chip-bg-active, var(--rzc-primary, #0b5952));
    color: var(--rzc-chip-text-active, #fff);
    font-size: 12px;
}

.rezideo-catalog__sheet-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9998;
    background: rgba(0, 0, 0, .45);
    opacity: 0;
    transition: opacity .25s ease;
}
.rezideo-catalog__sheet-backdrop.is-open { opacity: 1; }

.rezideo-catalog__sheet {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    max-height: 85vh;
    background: #fff;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -8px 40px rgba(0, 0, 0, .25);
    transform: translateY(100%);
    transition: transform .25s ease;
}
.rezideo-catalog__sheet.is-open { transform: translateY(0); }
.rezideo-catalog__sheet.is-instant { transition: none; }

.rezideo-catalog__sheet-head {
    position: relative;
    flex: 0 0 auto;
    padding: 18px 56px 12px 20px;
}
.rezideo-catalog__sheet-grab {
    position: absolute;
    top: 8px;
    left: 50%;
    width: 40px;
    height: 4px;
    margin-left: -20px;
    border-radius: 2px;
    background: #d9d9d9;
}
.rezideo-catalog__sheet-title {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
}
.rezideo-catalog__sheet-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    color: inherit;
}
.rezideo-catalog__sheet-close:hover { background: #f1f1f1; }

.rezideo-catalog__sheet-body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 4px 20px 16px;
    -webkit-overflow-scrolling: touch;
}
.rezideo-catalog__facet {
    border: 0;
    padding: 14px 0;
    margin: 0;
}
.rezideo-catalog__facet + .rezideo-catalog__facet { border-top: 1px solid #eee; }
.rezideo-catalog__facet legend {
    font-size: 13px;
    font-weight: 600;
    padding: 0 0 10px;
}
.rezideo-catalog__facet-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 10px;
}
.rezideo-catalog__facet--slider .rezideo-catalog-slider { margin: 14px 10px 8px; }
.rezideo-catalog__facet--slider .rezideo-catalog__slider-value { margin: 10px 0 0; font-size: 13px; }

.rezideo-catalog__sheet-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex: 0 0 auto;
    padding: 12px 20px calc(12px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid #eee;
}
.rezideo-catalog__sheet-clear {
    border: 0;
    background: transparent;
    font-size: 14px;
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
    color: inherit;
    padding: 10px 4px;
}
.rezideo-catalog__sheet-apply {
    flex: 1 1 auto;
    max-width: 320px;
    min-height: 48px;
    padding: 12px 22px;
    border: 0;
    border-radius: 999px;
    background: var(--rzc-chip-bg-active, var(--rzc-primary, #0b5952));
    color: var(--rzc-chip-text-active, #fff);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity .15s ease;
}
.rezideo-catalog__sheet-apply:hover { opacity: .88; }

body.rezideo-sheet-lock { overflow: hidden; }

@media (min-width: 768px) {
    .rezideo-catalog__sheet {
        left: 50%;
        right: auto;
        bottom: auto;
        top: 50%;
        width: min(640px, calc(100vw - 48px));
        max-height: min(80vh, 720px);
        border-radius: 16px;
        transform: translate(-50%, -50%) scale(.97);
        opacity: 0;
        transition: transform .2s ease, opacity .2s ease;
    }
    .rezideo-catalog__sheet.is-open {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    .rezideo-catalog__sheet-grab { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .rezideo-catalog__sheet,
    .rezideo-catalog__sheet-backdrop { transition: none; }
}

/* --- Toolbar: count and sort on their own rows --- */
.rezideo-catalog__toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
    margin-bottom: 18px;
}
.rezideo-catalog__count { flex-basis: 100%; margin: 0; font-size: 14px; }

/* Grid/list view toggle: right of the sort chips (live MIB pattern) */
.rezideo-catalog__viewtoggle {
    display: flex;
    gap: 8px;
    margin-left: auto;
}
.rezideo-catalog__viewtoggle .btn {
    padding: 6px 12px;
    line-height: 1;
}

/* Favorites button: right of the view toggle, visually set apart from the
 * toolbar controls. The heart flips over on hover. */
.rezideo-catalog button.rezideo-catalog__favbtn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: 14px;
    padding: 8px 18px;
    border: 1.5px solid var(--rzc-primary, #0b5952);
    border-radius: 999px;
    background: transparent;
    color: var(--rzc-chip-text, var(--rzc-primary, #0b5952));
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}
.rezideo-catalog button.rezideo-catalog__favbtn i {
    font-size: 15px;
    transition: transform .45s ease;
    /* The page CSS paints widget icons white; the heart must always follow
     * the button color in every state. */
    color: currentColor !important;
}
/* The glyph itself is a :before pseudo-element and a page rule paints
 * .fa-heart:before white with !important — the ID selector outranks it.
 * Scoped ONLY to this button (the card hearts keep their own styling);
 * the glyph gets the same color as the label next to it. */
#rezideo-catalog button.rezideo-catalog__favbtn .fa-heart:before {
    color: var(--rzc-chip-text, var(--rzc-primary, #0b5952)) !important;
}
#rezideo-catalog button.rezideo-catalog__favbtn.active .fa-heart:before {
    color: var(--rzc-chip-text-active, #fff) !important;
}
.rezideo-catalog button.rezideo-catalog__favbtn:hover {
    box-shadow: 0 1px 6px rgba(0, 0, 0, .18);
    background: transparent;
    color: var(--rzc-chip-text, var(--rzc-primary, #0b5952));
}
.rezideo-catalog button.rezideo-catalog__favbtn:hover i { transform: rotateY(180deg); }
.rezideo-catalog button.rezideo-catalog__favbtn.active,
.rezideo-catalog button.rezideo-catalog__favbtn.active:hover {
    background: var(--rzc-chip-bg-active, var(--rzc-primary, #0b5952));
    color: var(--rzc-chip-text-active, #fff);
}
@media (max-width: 560px) {
    .rezideo-catalog button.rezideo-catalog__favbtn { margin-left: 0; }
}

/* Logged-in line under the favorites button: email + logout link. Injected by
 * rezideo-account.js after the status call (the page HTML is cached, the
 * login state is client-only). Full-basis flex item so it wraps onto its own
 * row, right-aligned under the button. */
.rezideo-catalog__toolbar .rzc-account-badge {
    flex-basis: 100%;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
    margin-bottom: 10px;
    font-size: 12px;
    line-height: 1;
    text-transform: lowercase;
    color: var(--rzc-muted, #6b7280);
}
.rezideo-catalog__toolbar .rzc-account-badge .rzc-account-logout {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--rzc-primary, #0b5952);
    text-decoration: underline;
    cursor: pointer;
}
.rezideo-catalog__toolbar .rzc-account-badge .rzc-account-logout:hover {
    text-decoration: none;
}
.rezideo-catalog__toolbar .rzc-account-badge .rzc-account-logout i {
    font-size: 11px;
    color: currentColor !important;
}
/* A page rule paints FA glyph pseudo-elements white with !important; the ID
 * selector outranks it (same trick as the favorites-button heart above). */
#rezideo-catalog .rzc-account-badge .rzc-account-logout i:before {
    color: var(--rzc-primary, #0b5952) !important;
}

/* Sort chips: click cycles off -> ascending -> descending -> off. Neutral
 * outline separates them visually from the (primary-bordered) filter chips. */
.rezideo-catalog__sort {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
.rezideo-catalog__sort-label { font-size: 13px; font-weight: 600; margin-right: 2px; }
.rezideo-catalog__sort-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border: 1.5px solid #c5c5c5;
    border-radius: 999px;
    background: transparent;
    color: #555;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: background .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.rezideo-catalog__sort-chip:hover { box-shadow: 0 1px 6px rgba(0, 0, 0, .15); }
.rezideo-catalog__sort-chip.is-active {
    background: var(--rzc-chip-bg-active, var(--rzc-primary, #0b5952));
    border-color: var(--rzc-chip-bg-active, var(--rzc-primary, #0b5952));
    color: var(--rzc-chip-text-active, #fff);
}
.rezideo-catalog__sort-chip:focus-visible {
    outline: 2px solid var(--rzc-primary, #0b5952);
    outline-offset: 2px;
}
.rezideo-catalog__sort-arrow { font-size: 12px; }

/* --- Card grid --- */
.rezideo-catalog__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
@media (max-width: 980px) { .rezideo-catalog__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .rezideo-catalog__grid { grid-template-columns: 1fr; } }

.rezideo-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .12);
    background: var(--rzc-secondary, #0d635b);
}

.rezideo-card__image {
    position: relative;
    aspect-ratio: 4 / 3;
    background: var(--rzc-primary, #0b5952);
}
.rezideo-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.rezideo-card__placeholder {
    width: 100%;
    height: 100%;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .08) 25%, transparent 25%, transparent 50%,
            rgba(255, 255, 255, .08) 50%, rgba(255, 255, 255, .08) 75%, transparent 75%);
    background-size: 24px 24px;
}
.rezideo-card__badge {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 56px;
    height: auto;
}

.rezideo-card__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 18px;
    color: var(--rzc-text-light, #fff);
}
.rezideo-card__body hr { border: 0; border-top: 1px solid rgba(255, 255, 255, .25); margin: 12px 0; }

.rezideo-card__head { display: flex; justify-content: space-between; gap: 10px; }
.rezideo-card__project { font-weight: 600; font-size: 15px; }
.rezideo-card__id-block { text-align: right; }
.rezideo-card__status { display: block; font-size: 12px; }
.rezideo-card__status.is-available { color: var(--rzc-accent, #9bc837); }
.rezideo-card__status.is-unavailable { color: var(--rzc-muted, #b7cfcc); }
.rezideo-card__name { font-size: 18px; }

.rezideo-card__facts { display: flex; justify-content: space-between; gap: 8px; }
.rezideo-card__facts small { display: block; color: var(--rzc-muted, #b7cfcc); font-size: 12px; }
.rezideo-card__facts strong { font-size: 18px; }
.rezideo-card__facts div:last-child { text-align: right; }

.rezideo-card__price { margin-bottom: 14px; }
.rezideo-card__price-value { font-size: 22px; color: var(--rzc-accent, #9bc837); }

.rezideo-card__cta {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 24px;
    background: #fff;
    color: var(--rzc-primary, #0b5952);
    text-decoration: none;
    font-weight: 600;
    transition: opacity .15s ease;
}
.rezideo-card__cta:hover { opacity: .85; color: var(--rzc-primary, #0b5952); }

.rezideo-catalog__empty { grid-column: 1 / -1; }

/* --- Pager --- */
.rezideo-catalog__pager { margin-top: 28px; }
.rezideo-catalog__pager .pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    list-style: none;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
}
.rezideo-catalog__pager .page-link {
    display: block;
    padding: 8px 14px;
    border: 1px solid #ccc;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    user-select: none;
}
.rezideo-catalog__pager .page-item.active .page-link {
    background: var(--rzc-primary, #0b5952);
    border-color: var(--rzc-primary, #0b5952);
    color: #fff;
    cursor: default;
}
.rezideo-catalog__pager .page-item.disabled .page-link { opacity: .45; cursor: default; }

/* --- Detail page --- */
.rezideo-detail__back { display: inline-block; margin-bottom: 18px; text-decoration: none; font-weight: 600; }
.rezideo-detail__layout { display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; margin-bottom: 40px; }
@media (max-width: 900px) { .rezideo-detail__layout { grid-template-columns: 1fr; } }

.rezideo-detail__main-image { position: relative; border-radius: 12px; overflow: hidden; aspect-ratio: 4 / 3; background: #eee; }
.rezideo-detail__main-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rezideo-detail__thumbs { display: flex; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.rezideo-detail__thumb { padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; cursor: pointer; background: none; width: 90px; height: 68px; }
.rezideo-detail__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rezideo-detail__thumb:hover { border-color: #0b5952; }

.rezideo-detail__title { margin: 4px 0 2px; }
.rezideo-detail__project { font-weight: 600; margin-bottom: 2px; }
.rezideo-detail__address { font-weight: 400; color: #666; margin-left: 8px; font-size: 14px; }
.rezideo-detail__price { font-size: 28px; font-weight: 700; color: #0b5952; margin: 12px 0 18px; }

.rezideo-detail__facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 24px; margin: 0 0 18px; }
.rezideo-detail__facts > div { display: flex; justify-content: space-between; border-bottom: 1px solid #e4e4e4; padding: 6px 0; }
.rezideo-detail__facts dt { color: #666; font-size: 14px; }
.rezideo-detail__facts dd { margin: 0; font-weight: 600; font-size: 14px; }
@media (max-width: 640px) { .rezideo-detail__facts { grid-template-columns: 1fr; } }

.rezideo-detail__blueprint { display: inline-block; margin: 0 12px 12px 0; padding: 9px 18px; border: 1px solid #0b5952; border-radius: 20px; color: #0b5952; text-decoration: none; font-weight: 600; font-size: 14px; }
.rezideo-detail__blueprint:hover { background: #0b5952; color: #fff; }

.rezideo-detail__rooms { width: 100%; border-collapse: collapse; margin-top: 14px; font-size: 14px; }
.rezideo-detail__rooms th, .rezideo-detail__rooms td { text-align: left; padding: 6px 10px; border-bottom: 1px solid #e4e4e4; }

.rezideo-detail__recommended { margin: 30px 0 40px; }
.rezideo-detail__recommended h2 { margin-bottom: 18px; }
.rezideo-detail__contact { margin-top: 30px; }

.rezideo-detail__rooms-title { margin: 22px 0 6px; font-size: 17px; }

/* Struck-through list price next to the sale price */
.rezideo-card__price-old {
    text-decoration: line-through;
    opacity: .6;
    font-size: .85em;
    margin-right: 6px;
}
