/* Cascade Residence site palette for the rezideo-plugin (2026-08-04, dev clone).
 *
 * Colours read from the LIVE cascaderesidence.hu while MIB was still active:
 *   mib_color_settings   first/second/third/apartment/table all #000000,
 *                        slider active #57473c, slider inactive #eae3d2
 *   page 71390 CSS       .mib-supported-price display:none, .mib-old-price #eae3d2,
 *                        Libre Baskerville, .dropdown-toggle height 50px
 * The brand is the brown #57473c on the cream #eae3d2; the black entries are MIB defaults
 * nobody changed, so they are not treated as the accent.
 *
 * The cards use card_style=mib, so the page's own Divi CSS drives their look exactly as it did
 * under MIB. This file only supplies what the page CSS cannot reach: the plugin's own filter
 * panel tokens and the pager.
 *
 * Doubled class on purpose: rezideo-catalog.css loads AFTER this file, so an equal-specificity
 * selector would lose on source order. The Divi theme reset loads after everything, so component
 * rules stay specific and restate colours on :hover/:focus.
 */

/* A site márkatokenjei a :root-on, hogy a katalóguson KÍVÜLI plugin-részek is lássák
 * őket — mindenekelőtt a `.rezideo-detail--mib` adatlap, ami nincs a katalógus
 * konténerén belül. Az adatlap összegző-sorainak kiemelése ezekből származik
 * (lásd mib-compat.css), így a site színeit követi, nem beégetett érték. */
:root {
    --rzc-primary: #57473c;
    --rzc-secondary: #57473c;
    --rzc-accent: #eae3d2;
    --rzc-on-primary: #eae3d2;
}

.rezideo-catalog.rezideo-catalog--mib {
    --rzc-primary: #57473c;
    --rzc-secondary: #57473c;
    --rzc-accent: #eae3d2;
    --rzc-text: #000000;
    --rzc-chip-text: #57473c;
    --rzc-chip-bg-active: #57473c;
    --rzc-chip-text-active: #ffffff;
    --rzc-pill-bg: rgba(87, 71, 60, .08);
    --rzc-pill-bg-hover: rgba(87, 71, 60, .16);
}

.rezideo-filters-widget,
.rzc-account-popup {
    --rzc-primary: #57473c;
    --rzc-secondary: #57473c;
    --rzc-accent: #eae3d2;
    --rzc-chip-text: #57473c;
    --rzc-chip-bg-active: #57473c;
    --rzc-chip-text-active: #ffffff;
}

/* Az élesen a támogatott ár el van rejtve az oldal saját CSS-ével; a plugin markupja
 * ugyanaz, de a saját konténerében a page-CSS nem mindig éri el. */
.rezideo-catalog--mib .mib-supported-price {
    display: none !important;
}

.rezideo-catalog--mib .mib-old-price {
    color: #eae3d2;
    padding-bottom: 0;
    margin-bottom: -5px;
}

.rezideo-catalog--mib .mib-new-price {
    margin-bottom: 15px;
}

/* Lista nézetben az ár középre.
 * #apartment-card-body egy `d-flex flex-column` konténer, és a .list-view-price-container
 * `display:contents`-szel adja tovább a gyerekeit, tehát a .mib-new-price közvetlen flex-elem:
 * align-self viszi vízszintesen középre. Szándékosan a plugin saját .card.list-view osztályára
 * kötve, nem a Divi-modul sorszámára (.et_pb_blurb_0), hogy egy modul-átrendezés ne ejtse ki. */
.rezideo-catalog--mib .card.list-view .mib-new-price {
    align-self: center;
}

/* ==========================================================================
   Szűrő- és vezérlőgombok
   Az éles gomb-nyelv: barna #57473c, krém szöveg, Libre Baskerville, 50px magas
   dropdownok. A Divi reset a plugin-CSS UTÁN tölt, ezért erős szelektor kell,
   és a hover/focus színeket újra ki kell mondani.
   ========================================================================== */

#rezideo-catalog .rezideo-catalog__adv-trigger,
#rezideo-catalog button.rezideo-catalog__reset,
#rezideo-catalog .rezideo-catalog__sheet-apply,
#rezideo-catalog .rezideo-catalog__sheet-clear {
    background: #57473c !important;
    color: #eae3d2 !important;
    border: 0 !important;
    border-radius: 0.375rem !important;
    padding: 8px 16px !important;
    font-family: 'Libre Baskerville', Georgia, "Times New Roman", serif !important;
    font-size: 14px !important;
    text-decoration: none !important;
    height: auto !important;
}

#rezideo-catalog .rezideo-catalog__adv-trigger:hover,
#rezideo-catalog .rezideo-catalog__adv-trigger:focus,
#rezideo-catalog button.rezideo-catalog__reset:hover,
#rezideo-catalog button.rezideo-catalog__reset:focus,
#rezideo-catalog .rezideo-catalog__sheet-apply:hover,
#rezideo-catalog .rezideo-catalog__sheet-apply:focus,
#rezideo-catalog .rezideo-catalog__sheet-clear:hover,
#rezideo-catalog .rezideo-catalog__sheet-clear:focus {
    background: #6b5849 !important;
    color: #eae3d2 !important;
}

#rezideo-catalog .rezideo-catalog__adv-count {
    background: #eae3d2 !important;
    color: #57473c !important;
}

#rezideo-catalog .rezideo-catalog__sort-chip {
    background: #eae3d2 !important;
    color: #57473c !important;
    border: 0 !important;
    border-radius: 0.375rem !important;
    padding: 3px 10px !important;
    font-size: 12px !important;
}

#rezideo-catalog .rezideo-catalog__sort-chip.is-active {
    background: #57473c !important;
    color: #eae3d2 !important;
}

/* ⚠️ A mobil rendezés-sheet KIVÉTEL: ott ugyanezek a node-ok lista-sorként jelennek meg,
 * oda ne szivárogjon be a gombos kinézet. */
@media (max-width: 767px) {
    #rezideo-catalog-sort-sheet .rezideo-catalog__sort-chip,
    #rezideo-catalog-sort-sheet .rezideo-catalog__sort-chip.is-active {
        background: transparent !important;
        color: #57473c !important;
        border-radius: 0 !important;
        padding: 12px 16px !important;
        font-size: 16px !important;
    }
}

/* Csúszkák az éles MIB színeivel. */
#rezideo-catalog .noUi-connect {
    background: #57473c;
}

#rezideo-catalog .noUi-handle {
    background: #57473c;
    border-color: #57473c;
}

#rezideo-catalog .noUi-target {
    background: #eae3d2;
}

/* --------------------------------------------------------------------------
   Lapozó
   ⚠️ A mib-compat.css teljes lapozó-CSS-e a nav[aria-label="mib pagination"]-höz van
   kötve, a plugin viszont aria-label="rezideo catalog pagination"-t ad, ezért EGYETLEN
   MIB-szabály sem fog rá. A megjelenést itt kell megadni, alsó margóval együtt.
   -------------------------------------------------------------------------- */

.rezideo-catalog__pager {
    margin: 20px 0 28px;
}

.rezideo-catalog__pager .pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    padding: 0;
    margin: 0;
    list-style: none;
}

.rezideo-catalog__pager .pagination .page-item {
    margin: 0;
}

.rezideo-catalog__pager .pagination .page-link {
    display: inline-block;
    min-width: 38px;
    padding: 7px 12px;
    border: 1px solid rgba(87, 71, 60, .25);
    border-radius: 0.375rem;
    background: #ffffff;
    color: #57473c;
    font-family: 'Libre Baskerville', Georgia, "Times New Roman", serif;
    font-size: 14px;
    line-height: 1.4;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

.rezideo-catalog__pager .pagination .page-item.active .page-link,
.rezideo-catalog__pager .pagination .page-link:hover {
    background: #57473c;
    border-color: #57473c;
    color: #eae3d2;
}

.rezideo-catalog__pager .pagination .page-item.disabled .page-link {
    opacity: .45;
    cursor: default;
}
