/* ==========================================================
   TDS — Listing v2.0
   Views:
   - /properties-search/
   - /property-type/...
   ========================================================== */

:root {
    --tds-dark: #172033;
    --tds-gold: #C69C6D;
    --tds-gold-hover: #B78B5A;
    --tds-bg: #F7F5F1;
    --tds-soft: rgba(23,32,51,.62);
    --tds-line: rgba(23,32,51,.10);
    --tds-container: 1180px;
}

/* 01. RH cleanup */

body.page-template-properties-search .rh_header,
body.tax-property-type .rh_header,
body.tax-property-city .rh_header,
body.tax-property-status .rh_header,
body.tax-property-feature .rh_header,
body.post-type-archive-property .rh_header,
body.page-template-properties-search .rh_mod_header,
body.tax-property-type .rh_mod_header,
body.tax-property-city .rh_mod_header,
body.tax-property-status .rh_mod_header,
body.tax-property-feature .rh_mod_header,
body.post-type-archive-property .rh_mod_header,
body.page-template-properties-search .rh_banner,
body.tax-property-type .rh_banner,
body.tax-property-city .rh_banner,
body.tax-property-status .rh_banner,
body.tax-property-feature .rh_banner,
body.post-type-archive-property .rh_banner,
.rh_page__sidebar,
.rh_page__controls,
.rh_pagination__stats {
    display: none !important;
}

/* 02. Hero */

.tds-listing-hero {
    position: relative;
    min-height: 520px;
    padding-bottom: 76px;
    background-image:
        linear-gradient(90deg, rgba(15,23,42,.78), rgba(15,23,42,.42), rgba(15,23,42,.12)),
        url('/wp-content/themes/realhomes-child/assets/images/targ-hero.png');
    background-size: cover;
    background-position: center;
    overflow: visible;
}

.tds-listing-hero__inner {
    width: min(var(--tds-container), calc(100% - 64px));
    min-height: 520px;
    margin: 0 auto;
    padding-top: 92px;

    display: flex;
    flex-direction: column;
    justify-content: center;
}

.tds-listing-hero__inner span {
    margin-bottom: 18px;
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--tds-gold);
}

.tds-listing-hero__inner h1 {
    margin: 0;
    max-width: 780px;
    font-family: var(--font-heading);
    font-size: clamp(58px, 5vw, 86px);
    line-height: .94;
    font-weight: 800;
    letter-spacing: -.055em;
    color: #fff;
}

/* 03. Search */

.tds-listing-search-wrap {
    position: relative;
    z-index: 30;
    margin-top: -88px;
    padding-bottom: 38px;
    background: linear-gradient(to bottom, transparent 0 44px, var(--tds-bg) 44px 100%);
}

.tds-listing-search-wrap .targ-search {
    width: min(var(--tds-container), calc(100% - 64px));
    margin: 0 auto !important;
}

.tds-listing-search-wrap .targ-search__form {
    box-shadow: 0 26px 80px rgba(15,23,42,.16);
}

.tds-listing-search-wrap .rh_prop_search {
    display: none !important;
}

/* 04. Map */

.tds-map-shell {
    width: min(var(--tds-container), calc(100% - 64px));
    margin: 30px auto 38px !important;
}

.tds-map-toggle {
    width: 100%;
    min-height: 72px;
    padding: 0 28px;

    display: grid;
    grid-template-columns: auto auto 1fr auto;
    gap: 18px;
    align-items: center;

    border: 0;
    border-radius: 24px;
    background: #fff;
    color: var(--tds-dark);
    font-family: var(--font-heading);
    cursor: pointer;
    box-shadow: 0 18px 50px rgba(15,23,42,.08);
}

.tds-map-toggle span,
.tds-map-toggle strong {
    font-size: 15px;
    font-weight: 800;
}

.tds-map-toggle em {
    padding: 8px 13px;
    border-radius: 999px;
    background: var(--tds-bg);
    font-size: 13px;
    font-style: normal;
    font-weight: 800;
    color: rgba(23,32,51,.66);
}

.tds-map-toggle strong {
    justify-self: end;
}

.tds-map-toggle strong::after {
    content: " ↓";
}

.tds-map-toggle--open strong::after {
    content: " ↑";
}

.rh_map.tds-map-collapsed {
    height: 0 !important;
    max-height: 0 !important;
    overflow: hidden !important;
    opacity: 0;
    transition: all .28s ease;
}

.rh_map.tds-map-collapsed.tds-map-open {
    height: 430px !important;
    max-height: 430px !important;
    margin-top: 24px;
    opacity: 1;
    border-radius: 24px;
    overflow: hidden !important;
    background: var(--tds-bg);
}

/* filtrujemy tylko kafelki, nie markery */
.tds-map-shell .leaflet-tile-pane {
    filter: grayscale(.18) saturate(.48) contrast(.9) brightness(1.06) sepia(.08) !important;
}

.tds-map-shell .leaflet-marker-icon,
.tds-map-shell .marker-cluster,
.tds-map-shell .marker-cluster div {
    filter: none !important;
}

.tds-map-shell .leaflet-popup-content-wrapper {
    border-radius: 22px !important;
    border-bottom: 4px solid var(--tds-gold) !important;
    box-shadow: 0 24px 70px rgba(15,23,42,.18) !important;
}

.tds-map-shell .leaflet-popup-tip {
    background: var(--tds-gold) !important;
}

.tds-map-shell .leaflet-control-zoom {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    margin: 18px !important;
    z-index: 9999 !important;
}

.tds-map-shell .leaflet-control-zoom a {
    width: 42px !important;
    height: 42px !important;
    line-height: 39px !important;
    background: #fff !important;
    color: var(--tds-dark) !important;
    border: 1px solid var(--tds-line) !important;
    font-size: 28px !important;
    font-weight: 800 !important;
}

.tds-map-shell .leaflet-control-zoom a:hover {
    background: var(--tds-gold) !important;
    color: #fff !important;
}

/* 05. Toolbar */

.tds-listing-toolbar {
    width: min(var(--tds-container), calc(100% - 64px));
    margin: 0 auto 30px !important;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

.tds-listing-toolbar__stats {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    color: var(--tds-soft);
}

.tds-listing-toolbar__stats span {
    color: var(--tds-gold);
    font-weight: 800;
}

.tds-sort {
    position: relative;
    z-index: 80;
}

.tds-sort__trigger {
    min-width: 280px;
    height: 58px;
    padding: 0 20px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;

    border: 1px solid var(--tds-line);
    border-radius: 18px;
    background: #fff;
    color: var(--tds-dark);
    font-family: var(--font-heading);
    cursor: pointer;
    box-shadow: 0 16px 44px rgba(15,23,42,.08);
}

.tds-sort__trigger span {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: rgba(23,32,51,.48);
}

.tds-sort__trigger strong {
    font-size: 15px;
    font-weight: 800;
}

.tds-sort__trigger::after {
    content: "↓";
    color: rgba(23,32,51,.58);
}

.tds-sort--open .tds-sort__trigger::after {
    content: "↑";
}

.tds-sort__menu {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    width: 280px;
    padding: 10px;

    display: none;

    border-radius: 20px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(15,23,42,.16);
}

.tds-sort--open .tds-sort__menu {
    display: grid;
    gap: 4px;
}

.tds-sort__menu button {
    width: 100%;
    padding: 14px;

    border: 0;
    border-radius: 14px;
    background: transparent;
    color: var(--tds-dark);

    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
}

.tds-sort__menu button:hover {
    background: var(--tds-bg);
}

/* 06. Listing layout */

.page-template-properties-search .rh_section--flex,
.tax-property-type .rh_section--flex,
.tax-property-city .rh_section--flex,
.tax-property-status .rh_section--flex,
.tax-property-feature .rh_section--flex,
.post-type-archive-property .rh_section--flex {
    background: var(--tds-bg);
}

.page-template-properties-search #properties-listing,
.tax-property-type #properties-listing,
.tax-property-city #properties-listing,
.tax-property-status #properties-listing,
.tax-property-feature #properties-listing,
.post-type-archive-property #properties-listing {
    padding: 0 !important;
    margin: 0 !important;
}

.page-template-properties-search .rh_page__main,
.tax-property-type .rh_page__main,
.tax-property-city .rh_page__main,
.tax-property-status .rh_page__main,
.tax-property-feature .rh_page__main,
.post-type-archive-property .rh_page__main {
    width: min(var(--tds-container), calc(100% - 64px)) !important;
    max-width: var(--tds-container) !important;
    margin: 0 auto !important;
    padding: 0 !important;
}

.page-template-properties-search .rh_page__listing,
.tax-property-type .rh_page__listing,
.tax-property-city .rh_page__listing,
.tax-property-status .rh_page__listing,
.tax-property-feature .rh_page__listing,
.post-type-archive-property .rh_page__listing {
    display: grid !important;
    gap: 24px !important;
    width: 100% !important;
}

/* 07. Property card */

.tds-list-card {
    width: 100%;
    display: grid;
    grid-template-columns: 360px 1fr;

    background: #fff;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 22px 60px rgba(15,23,42,.08);
    transition: transform .22s ease, box-shadow .22s ease;
}

.tds-list-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 30px 80px rgba(15,23,42,.14);
}

.tds-list-card__image {
    position: relative;
    display: block;
    min-height: 260px;
    overflow: hidden;
    background: #EAE7E2;
}

.tds-list-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .35s ease;
}

.tds-list-card:hover .tds-list-card__image img {
    transform: scale(1.035);
}

.tds-list-card__badge {
    position: absolute;
    left: 20px;
    top: 20px;

    padding: 8px 13px;
    border-radius: 999px;
    background: rgba(255,255,255,.94);
    color: var(--tds-dark);

    font-family: var(--font-heading);
    font-size: 12px;
    font-weight: 800;
}

.tds-list-card__content {
    display: grid;
    grid-template-columns: 1fr 260px;
    gap: 34px;
    padding: 34px;
}

.tds-list-card__main h2 {
    margin: 0;
    max-width: 540px;
    font-family: var(--font-heading);
    font-size: 28px;
    line-height: 1.12;
    font-weight: 800;
    letter-spacing: -.035em;
}

.tds-list-card__main h2 a {
    color: var(--tds-dark);
    text-decoration: none;
}

.tds-list-card__main h2 a:hover {
    color: var(--tds-gold);
}

.tds-list-card__excerpt {
    max-width: 540px;
    margin: 18px 0 0;
    font-family: var(--font-heading);
    font-size: 16px;
    line-height: 1.6;
    color: var(--tds-soft);
}

.tds-list-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 26px;
}

.tds-list-card__meta span {
    padding: 8px 12px;
    border-radius: 999px;
    background: var(--tds-bg);
    color: rgba(23,32,51,.72);
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 700;
}

.tds-list-card__side {
    border-left: 1px solid var(--tds-line);
    padding-left: 30px;
}

.tds-list-card__status {
    margin: 0 0 10px;
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 800;
    color: rgba(23,32,51,.68);
}

.tds-list-card__price {
    margin: 0;
    font-family: var(--font-heading);
    font-size: 30px;
    line-height: 1;
    font-weight: 800;
    letter-spacing: -.04em;
    color: var(--tds-dark);
}

.tds-list-card__rate {
    margin: 12px 0 0;
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 700;
    color: var(--tds-gold);
}

.tds-list-card__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    margin-top: 28px;
    min-height: 46px;
    padding: 0 20px;

    border-radius: 999px;
    background: var(--tds-dark);
    color: #fff;
    text-decoration: none;

    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 800;
}

.tds-list-card__button:hover {
    background: var(--tds-gold);
    color: #fff;
}

/* 08. Pagination */

.rh_pagination {
    width: min(var(--tds-container), calc(100% - 64px));
    margin: 42px auto 0 !important;
}

/* 09. Scroll top */

body #scroll-top,
body #scroll-top:hover,
body #scroll-top:focus {
    background: var(--tds-gold) !important;
    color: #fff !important;
    border-radius: 18px !important;
    box-shadow: 0 18px 40px rgba(15,23,42,.18) !important;
}

body #scroll-top:hover {
    background: var(--tds-gold-hover) !important;
}

/* 10. Mobile */

@media (max-width: 900px) {
    .tds-list-card {
        grid-template-columns: 1fr;
    }

    .tds-list-card__image {
        min-height: 260px;
    }

    .tds-list-card__content {
        grid-template-columns: 1fr;
    }

    .tds-list-card__side {
        border-left: 0;
        padding-left: 0;
        border-top: 1px solid var(--tds-line);
        padding-top: 24px;
    }
}

@media (max-width: 767px) {
    .tds-listing-hero {
        min-height: 430px;
        padding-bottom: 72px;
    }

    .tds-listing-hero__inner {
        width: calc(100% - 40px);
        min-height: 430px;
        justify-content: flex-end;
        padding-top: 0;
        padding-bottom: 92px;
    }

    .tds-listing-hero__inner h1 {
        font-size: 44px;
    }

    .tds-listing-search-wrap {
        margin-top: -58px;
        padding-bottom: 30px;
    }

    .tds-listing-search-wrap .targ-search,
    .tds-map-shell,
    .tds-listing-toolbar,
    .page-template-properties-search .rh_page__main,
    .tax-property-type .rh_page__main,
    .tax-property-city .rh_page__main,
    .tax-property-status .rh_page__main,
    .tax-property-feature .rh_page__main,
    .post-type-archive-property .rh_page__main,
    .rh_pagination {
        width: calc(100% - 40px) !important;
    }

    .tds-map-toggle {
        min-height: 64px;
        padding: 0 20px;
        border-radius: 20px;
        grid-template-columns: 1fr auto;
    }

    .tds-map-toggle em {
        display: none;
    }

    .rh_map.tds-map-collapsed.tds-map-open {
        height: 340px !important;
        max-height: 340px !important;
    }

    .tds-listing-toolbar {
        display: block;
    }

    .tds-sort {
        margin-top: 18px;
    }

    .tds-sort__trigger,
    .tds-sort__menu {
        width: 100%;
        min-width: 0;
    }

    .tds-list-card {
        border-radius: 24px;
    }

    .tds-list-card__content {
        padding: 24px;
    }

    .tds-list-card__main h2 {
        font-size: 24px;
    }

    .tds-list-card__price {
        font-size: 27px;
    }
}

.tds-price-period {
    white-space: nowrap;
    font: inherit;
    color: inherit;
}

/* TDS LISTING TOOLBAR V3 — START */

/*
 * Jeden pasek: mapa + sortowanie.
 */

.tds-listing-toolbar {
    position: relative;
    z-index: 90;

    width: min(var(--tds-container), calc(100% - 64px));
    min-height: 92px;
    margin: 0 auto 30px !important;
    padding: 14px 18px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;

    border: 1px solid rgba(23, 32, 51, .08);
    border-radius: 26px;
    background: #fff;
    box-shadow: 0 18px 56px rgba(15, 23, 42, .08);
}

.tds-listing-toolbar__map {
    min-width: 0;
    flex: 1 1 auto;
}

.tds-listing-toolbar__actions {
    flex: 0 0 auto;
    padding-left: 28px;
    border-left: 1px solid var(--tds-line);
}

.tds-listing-toolbar--without-map {
    justify-content: flex-end;
}

.tds-listing-toolbar--without-map .tds-listing-toolbar__actions {
    border-left: 0;
}

/*
 * Przycisk mapy.
 */

.tds-listing-toolbar .tds-map-toggle {
    width: 100% !important;
    min-height: 62px !important;
    margin: 0 !important;
    padding: 0 !important;

    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 34px !important;

    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--tds-dark) !important;
    cursor: pointer;
}

.tds-map-toggle__label {
    min-height: 54px;
    padding: 0 18px;

    display: inline-flex;
    align-items: center;
    gap: 11px;

    border: 1px solid var(--tds-line);
    border-radius: 16px;
    background: #fff;

    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 800;
    color: var(--tds-dark);
}

.tds-map-toggle__label svg {
    width: 25px;
    height: 25px;
    flex: 0 0 auto;

    fill: none;
    stroke: var(--tds-gold);
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.tds-listing-toolbar .tds-map-toggle strong {
    margin: 0 !important;
    font-family: var(--font-heading);
    font-size: 16px !important;
    font-weight: 800 !important;
    color: var(--tds-dark) !important;
    white-space: nowrap;
}

.tds-map-toggle__arrow {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;

    fill: none;
    stroke: var(--tds-dark);
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;

    transition: transform .25s ease;
}

.tds-map-toggle--open .tds-map-toggle__arrow {
    transform: rotate(180deg);
}

/*
 * Sortowanie.
 */

.tds-listing-toolbar .tds-sort {
    position: relative;
    z-index: 100;
}

.tds-listing-toolbar .tds-sort__trigger {
    width: auto !important;
    min-width: 380px !important;
    height: 62px !important;
    padding: 0 8px 0 0 !important;

    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 24px !important;

    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.tds-sort__caption {
    display: inline-flex;
    align-items: center;
    gap: 12px;

    font-family: var(--font-heading);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: rgba(23, 32, 51, .56);
}

.tds-sort__caption svg {
    width: 24px;
    height: 24px;

    fill: none;
    stroke: var(--tds-gold);
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.tds-listing-toolbar .tds-sort__trigger strong {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 800;
    color: var(--tds-dark);
    white-space: nowrap;
}

.tds-sort__arrow {
    width: 20px;
    height: 20px;

    fill: none;
    stroke: var(--tds-dark);
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;

    transition: transform .25s ease;
}

.tds-sort--open .tds-sort__arrow {
    transform: rotate(180deg);
}

/*
 * Menu sortowania.
 */

.tds-listing-toolbar .tds-sort__menu {
    right: 0 !important;
    left: auto !important;
    top: calc(100% + 14px) !important;
    min-width: 280px;
}

/*
 * Rozwijana mapa znajduje się bezpośrednio pod paskiem.
 */

.tds-listing-toolbar + .tds-map-shell {
    width: min(var(--tds-container), calc(100% - 64px));
    margin: 0 auto 30px !important;
}

.tds-map-shell--closed {
    display: none !important;
}

.tds-map-shell--open {
    display: block !important;
}

.tds-map-shell--open .rh_map,
.tds-map-shell--open .rh_map__search {
    display: block !important;
}

/*
 * Usunięcie pustej przestrzeni nad listą ofert.
 */

body.page-template-properties-search #properties-listing,
body.tax-property-type #properties-listing,
body.tax-property-city #properties-listing,
body.tax-property-status #properties-listing,
body.tax-property-feature #properties-listing,
body.post-type-archive-property #properties-listing {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

.tds-listing-toolbar + .tds-map-shell + #properties-listing,
.tds-listing-toolbar + #properties-listing {
    padding-top: 0 !important;
}

/*
 * Widok mobilny.
 */

@media (max-width: 900px) {
    .tds-listing-toolbar {
        width: min(var(--tds-container), calc(100% - 32px));
        padding: 14px;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        border-radius: 22px;
    }

    .tds-listing-toolbar__actions {
        width: 100%;
        padding: 12px 0 0;
        border-left: 0;
        border-top: 1px solid var(--tds-line);
    }

    .tds-listing-toolbar .tds-map-toggle {
        justify-content: space-between !important;
        gap: 14px !important;
    }

    .tds-map-toggle__label {
        min-height: 48px;
        padding: 0 14px;
        font-size: 14px;
    }

    .tds-listing-toolbar .tds-map-toggle strong {
        margin-left: auto !important;
        font-size: 14px !important;
    }

    .tds-listing-toolbar .tds-sort__trigger {
        width: 100% !important;
        min-width: 0 !important;
        justify-content: space-between !important;
        gap: 12px !important;
    }

    .tds-listing-toolbar .tds-sort__menu {
        width: 100%;
        min-width: 0;
    }

    .tds-listing-toolbar + .tds-map-shell {
        width: calc(100% - 32px);
    }
}

@media (max-width: 560px) {
    .tds-sort__caption span {
        display: none;
    }

    .tds-map-toggle__label {
        padding: 0 12px;
    }

    .tds-listing-toolbar .tds-sort__trigger strong,
    .tds-listing-toolbar .tds-map-toggle strong {
        font-size: 13px !important;
    }
}

/* TDS LISTING TOOLBAR V3 — END */

/* TDS MAP FIT V3.3 — START */

/*
 * Mapa znajduje się blisko paska narzędzi.
 */

.tds-listing-toolbar + .tds-map-shell {
    width: min(var(--tds-container), calc(100% - 64px)) !important;
    height: 350px !important;
    min-height: 350px !important;
    max-height: 350px !important;

    margin-top: 6px !important;
    margin-bottom: 28px !important;
    padding: 0 !important;

    display: block;
    overflow: hidden !important;

    border-radius: 24px !important;
    background: transparent !important;
    box-shadow: 0 16px 44px rgba(15, 23, 42, .07);
    line-height: 0;
}

/*
 * Zamknięta mapa nie zajmuje miejsca.
 */

.tds-map-shell--closed {
    display: none !important;
}

/*
 * Otwarta mapa dokładnie wypełnia kontener.
 */

.tds-map-shell--open {
    display: block !important;
    height: 350px !important;
    min-height: 350px !important;
    max-height: 350px !important;
    padding: 0 !important;
    overflow: hidden !important;
    border-radius: 24px !important;
}

/*
 * Wszystkie elementy RealHomes i Leaflet mają ten sam wymiar.
 * Eliminuje to biały pasek pod mapą.
 */

.tds-map-shell--open .rh_map,
.tds-map-shell--open .rh_map__search,
.tds-map-shell--open .leaflet-container {
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;

    margin: 0 !important;
    padding: 0 !important;

    display: block !important;
    overflow: hidden !important;

    border-radius: 24px !important;
}

/*
 * Przycinamy kafelki i warstwy Leaflet do zaokrąglonej ramki.
 */

.tds-map-shell--open .leaflet-map-pane,
.tds-map-shell--open .leaflet-tile-pane,
.tds-map-shell--open .leaflet-overlay-pane,
.tds-map-shell--open .leaflet-marker-pane,
.tds-map-shell--open .leaflet-shadow-pane {
    border-radius: 24px !important;
}

/*
 * Usuwamy możliwe odstępy generowane przez wewnętrzne kontenery RH.
 */

.tds-map-shell--open > div,
.tds-map-shell--open .rh_map > div,
.tds-map-shell--open .rh_map__search > div {
    margin: 0 !important;
    padding: 0 !important;
}

/*
 * Tablet.
 */

@media (max-width: 900px) {
    .tds-listing-toolbar + .tds-map-shell,
    .tds-map-shell--open {
        width: calc(100% - 32px) !important;

        height: 300px !important;
        min-height: 300px !important;
        max-height: 300px !important;

        margin-top: 5px !important;
        margin-bottom: 24px !important;

        border-radius: 20px !important;
    }

    .tds-map-shell--open .rh_map,
    .tds-map-shell--open .rh_map__search,
    .tds-map-shell--open .leaflet-container,
    .tds-map-shell--open .leaflet-map-pane,
    .tds-map-shell--open .leaflet-tile-pane,
    .tds-map-shell--open .leaflet-overlay-pane,
    .tds-map-shell--open .leaflet-marker-pane,
    .tds-map-shell--open .leaflet-shadow-pane {
        border-radius: 20px !important;
    }
}

/*
 * Telefon.
 */

@media (max-width: 560px) {
    .tds-listing-toolbar + .tds-map-shell,
    .tds-map-shell--open {
        height: 250px !important;
        min-height: 250px !important;
        max-height: 250px !important;
    }
}

/* TDS MAP FIT V3.3 — END */

/* TDS MAP ZOOM CONTROLS V3.5 — START */

/*
 * Leaflet powinien sam pozycjonować kontenery kontrolek
 * względem obszaru mapy.
 */

.tds-map-shell--open .leaflet-control-container {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: static !important;
    pointer-events: none !important;
}

/*
 * RealHomes umieszcza kontrolkę zoomu w kontenerze
 * .leaflet-bottom.rh_leaflet_controls_zoom.
 * Przenosimy ten kontener do lewego górnego rogu.
 */

.tds-map-shell--open .leaflet-bottom.rh_leaflet_controls_zoom {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;

    position: absolute !important;
    top: 18px !important;
    bottom: auto !important;
    left: 18px !important;
    right: auto !important;

    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;

    z-index: 1000 !important;
    pointer-events: none !important;
}

/*
 * Sama kontrolka + / −.
 */

.tds-map-shell--open
.leaflet-bottom.rh_leaflet_controls_zoom
.leaflet-control-zoom {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;

    flex-direction: column !important;

    position: static !important;
    float: none !important;

    width: 46px !important;
    height: auto !important;

    margin: 0 !important;
    padding: 0 !important;

    border: 1px solid rgba(23, 32, 51, .14) !important;
    border-radius: 10px !important;
    overflow: hidden !important;

    background: #ffffff !important;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .14) !important;

    pointer-events: auto !important;
}

/*
 * Przyciski.
 */

.tds-map-shell--open
.leaflet-bottom.rh_leaflet_controls_zoom
.leaflet-control-zoom a {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;

    align-items: center !important;
    justify-content: center !important;

    width: 46px !important;
    height: 46px !important;
    min-width: 46px !important;
    min-height: 46px !important;

    margin: 0 !important;
    padding: 0 !important;

    border: 0 !important;
    border-bottom: 1px solid rgba(23, 32, 51, .12) !important;
    border-radius: 0 !important;

    background: #ffffff !important;
    color: #172033 !important;

    font-family: Arial, sans-serif !important;
    font-size: 27px !important;
    font-weight: 400 !important;
    line-height: 1 !important;
    text-align: center !important;
    text-decoration: none !important;
    text-indent: 0 !important;

    cursor: pointer !important;
    pointer-events: auto !important;
}

.tds-map-shell--open
.leaflet-bottom.rh_leaflet_controls_zoom
.leaflet-control-zoom a:last-child {
    border-bottom: 0 !important;
}

.tds-map-shell--open
.leaflet-bottom.rh_leaflet_controls_zoom
.leaflet-control-zoom a:hover,
.tds-map-shell--open
.leaflet-bottom.rh_leaflet_controls_zoom
.leaflet-control-zoom a:focus {
    background: #f6f1ea !important;
    color: #9a6f42 !important;
}

.tds-map-shell--open
.leaflet-bottom.rh_leaflet_controls_zoom
.leaflet-control-zoom a.leaflet-disabled {
    background: #f4f4f4 !important;
    color: rgba(23, 32, 51, .32) !important;
    cursor: default !important;
}

/*
 * Zabezpieczenie przed ukrywaniem kontrolki
 * przez wcześniejsze style RealHomes lub TDS.
 */

.tds-map-shell--open .leaflet-control-zoom-in,
.tds-map-shell--open .leaflet-control-zoom-out {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/*
 * Telefon.
 */

@media (max-width: 560px) {
    .tds-map-shell--open .leaflet-bottom.rh_leaflet_controls_zoom {
        top: 12px !important;
        left: 12px !important;
    }

    .tds-map-shell--open
    .leaflet-bottom.rh_leaflet_controls_zoom
    .leaflet-control-zoom {
        width: 40px !important;
    }

    .tds-map-shell--open
    .leaflet-bottom.rh_leaflet_controls_zoom
    .leaflet-control-zoom a {
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        min-height: 40px !important;
        font-size: 24px !important;
    }
}

/* TDS MAP ZOOM CONTROLS V3.5 — END */

/* ==========================================================
   TDS: listing location autocomplete stacking fix
   Podpowiedzi lokalizacji nad panelem mapy i sortowania
   ========================================================== */

/*
 * Kontener wyszukiwarki musi tworzyć warstwę wyższą
 * od listingu, mapy i paska sortowania.
 */
body.page-template-properties-search
.tds-listing-search-wrap,
body[class*="tax-property-"]
.tds-listing-search-wrap {
    position: relative !important;
    z-index: 1200 !important;
    overflow: visible !important;
}

/*
 * Dotychczasowe overflow:hidden przycinało elementy
 * rozwijane poza białą kartą wyszukiwarki.
 */
body.page-template-properties-search
.tds-listing-search-wrap
.rh_prop_search,
body[class*="tax-property-"]
.tds-listing-search-wrap
.rh_prop_search {
    position: relative !important;
    z-index: 1210 !important;
    overflow: visible !important;
}

/*
 * Wewnętrzne kontenery formularza również nie mogą
 * przycinać listy podpowiedzi.
 */
body.page-template-properties-search
.tds-listing-search-wrap
.rh_prop_search__form,
body.page-template-properties-search
.tds-listing-search-wrap
.rh_prop_search__fields,
body.page-template-properties-search
.tds-listing-search-wrap
.rh_prop_search__option,
body[class*="tax-property-"]
.tds-listing-search-wrap
.rh_prop_search__form,
body[class*="tax-property-"]
.tds-listing-search-wrap
.rh_prop_search__fields,
body[class*="tax-property-"]
.tds-listing-search-wrap
.rh_prop_search__option {
    overflow: visible !important;
}

/*
 * Lista AJAX może być dodawana bezpośrednio do body,
 * dlatego otrzymuje własną, wysoką warstwę.
 */
body.page-template-properties-search
.ui-autocomplete,
body.page-template-properties-search
.select2-container--open,
body.page-template-properties-search
.bootstrap-select.open
.dropdown-menu,
body.page-template-properties-search
.bootstrap-select.show
.dropdown-menu,
body[class*="tax-property-"]
.ui-autocomplete,
body[class*="tax-property-"]
.select2-container--open,
body[class*="tax-property-"]
.bootstrap-select.open
.dropdown-menu,
body[class*="tax-property-"]
.bootstrap-select.show
.dropdown-menu {
    z-index: 1250 !important;
}

/*
 * Panel mapy, sortowania i listing pozostają w niższej
 * warstwie, także gdy mapa Leaflet jest rozwinięta.
 */
body.page-template-properties-search
#properties-listing,
body.page-template-properties-search
.tds-listing-toolbar,
body.page-template-properties-search
.tds-map-shell,
body[class*="tax-property-"]
#properties-listing,
body[class*="tax-property-"]
.tds-listing-toolbar,
body[class*="tax-property-"]
.tds-map-shell {
    position: relative;
    z-index: 10 !important;
}

/* =====================================================
   TDS EMPTY RESULTS — START
   ===================================================== */

body.tds-listing-is-empty .tds-listing-toolbar {
    display: none !important;
}

.tds-rh-empty-source {
    display: none !important;
}

.tds-empty-results {
    position: relative;
    left: 50%;
    width: 100vw;
    min-height: 520px;
    margin-left: -50vw;
    padding: 110px max(24px, calc((100vw - 1680px) / 2)) 120px;
    overflow: hidden;
    box-sizing: border-box;
    background-color: #f7f5f1;
    background-image:
        radial-gradient(
            circle at 50% 44%,
            rgba(205, 161, 109, 0.12) 0,
            rgba(205, 161, 109, 0.045) 30%,
            rgba(247, 245, 241, 0) 64%
        ),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1440' height='560' viewBox='0 0 1440 560'%3E%3Cg fill='none' stroke-linecap='round'%3E%3Cpath d='M-45 115L154 62 315 122 507 45 694 104 887 31 1082 97 1284 52 1480 128' stroke='%23cda16d' stroke-opacity='.18'/%3E%3Cpath d='M-28 358L142 284 324 345 493 251 672 322 853 235 1040 303 1225 226 1468 316' stroke='%23172033' stroke-opacity='.11'/%3E%3Cpath d='M94 -30L137 152 74 283 169 448 133 610M348 -30L302 119 382 238 319 394 374 610M646 -30L612 132 704 274 621 428 684 610M964 -30L905 126 1011 252 943 419 1004 610M1268 -30L1211 143 1305 269 1246 435 1312 610' stroke='%23cda16d' stroke-opacity='.14'/%3E%3Cpath d='M-40 202C98 177 170 244 289 215S513 143 631 202 844 270 964 207 1188 131 1481 220' stroke='%23172033' stroke-opacity='.075' stroke-dasharray='7 9'/%3E%3Cpath d='M-25 474C121 407 225 511 363 459S584 400 724 466 927 515 1075 454 1290 393 1480 471' stroke='%23cda16d' stroke-opacity='.12' stroke-dasharray='5 8'/%3E%3Cg fill='%23f7f5f1' stroke='%23172033' stroke-opacity='.42'%3E%3Ccircle cx='137' cy='152' r='4'/%3E%3Ccircle cx='704' cy='274' r='4'/%3E%3Ccircle cx='1011' cy='252' r='4'/%3E%3Ccircle cx='1246' cy='435' r='4'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    background-repeat: no-repeat, repeat-x;
    background-position: center, center top;
    background-size: auto, 1440px 560px;
}

.tds-empty-results__card {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr) auto;
    align-items: center;
    gap: 44px;
    width: 100%;
    min-height: 300px;
    padding: 62px 72px;
    box-sizing: border-box;
    border: 1px solid rgba(205, 161, 109, 0.48);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow:
        0 22px 65px rgba(23, 32, 51, 0.055),
        0 4px 16px rgba(23, 32, 51, 0.025);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.tds-empty-results__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 112px;
    height: 112px;
    border-radius: 50%;
    color: #bd884f;
    background:
        radial-gradient(
            circle at 38% 32%,
            #fffdf9 0,
            #faf4eb 52%,
            #f5ecdf 100%
        );
}

.tds-empty-results__icon svg {
    display: block;
    width: 55px;
    height: 55px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.tds-empty-results__content {
    min-width: 0;
}

.tds-empty-results__eyebrow {
    margin: 0 0 20px;
    color: #c28e55;
    font-size: 15px;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.tds-empty-results__title {
    max-width: 880px;
    margin: 0;
    color: #172033;
    font-size: clamp(30px, 2.25vw, 42px);
    line-height: 1.12;
    font-weight: 700;
    letter-spacing: -0.035em;
}

.tds-empty-results__text {
    max-width: 830px;
    margin: 18px 0 0;
    color: #858b97;
    font-size: clamp(17px, 1.25vw, 21px);
    line-height: 1.55;
    font-weight: 400;
}

.tds-empty-results__action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    min-width: 230px;
    min-height: 70px;
    padding: 18px 28px;
    box-sizing: border-box;
    border: 0;
    border-radius: 13px;
    color: #ffffff;
    background: #172033;
    box-shadow: 0 10px 24px rgba(23, 32, 51, 0.13);
    font-size: 18px;
    line-height: 1.2;
    font-weight: 500;
    text-decoration: none;
    transition:
        color 180ms ease,
        background-color 180ms ease,
        transform 180ms ease,
        box-shadow 180ms ease;
}

.tds-empty-results__action span {
    color: #d3a364;
    font-size: 29px;
    line-height: 1;
    transform: translateY(-1px);
}

.tds-empty-results__action:hover,
.tds-empty-results__action:focus-visible {
    color: #ffffff;
    background: #222d43;
    box-shadow: 0 14px 30px rgba(23, 32, 51, 0.17);
    transform: translateY(-2px);
}

.tds-empty-results__action:focus-visible {
    outline: 3px solid rgba(205, 161, 109, 0.45);
    outline-offset: 4px;
}

@media (max-width: 1199px) {
    .tds-empty-results {
        min-height: 480px;
        padding-top: 80px;
        padding-bottom: 95px;
    }

    .tds-empty-results__card {
        grid-template-columns: 105px minmax(0, 1fr);
        gap: 30px;
        padding: 52px;
    }

    .tds-empty-results__action {
        grid-column: 2;
        justify-self: start;
        margin-top: 3px;
    }

    .tds-empty-results__icon {
        width: 92px;
        height: 92px;
    }

    .tds-empty-results__icon svg {
        width: 46px;
        height: 46px;
    }
}

@media (max-width: 767px) {
    .tds-empty-results {
        min-height: 0;
        padding: 44px 20px 68px;
        background-size: auto, 1100px auto;
    }

    .tds-empty-results__card {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        min-height: 0;
        gap: 0;
        padding: 38px 28px 30px;
        border-radius: 20px;
    }

    .tds-empty-results__icon {
        width: 76px;
        height: 76px;
        margin-bottom: 28px;
    }

    .tds-empty-results__icon svg {
        width: 38px;
        height: 38px;
    }

    .tds-empty-results__eyebrow {
        margin-bottom: 15px;
        font-size: 13px;
    }

    .tds-empty-results__title {
        font-size: 29px;
        line-height: 1.12;
    }

    .tds-empty-results__text {
        margin-top: 15px;
        font-size: 17px;
        line-height: 1.5;
    }

    .tds-empty-results__action {
        width: 100%;
        min-width: 0;
        min-height: 62px;
        margin-top: 30px;
        font-size: 17px;
    }
}

/* =====================================================
   TDS EMPTY RESULTS — END
   ===================================================== */

/* =====================================================
   ===================================================== */

/* =====================================================
   TDS EMPTY RESULTS WIDTH FIX — START
   Dynamiczne dopasowanie do wyszukiwarki
   ===================================================== */

.tds-empty-results {
    padding-right: 0 !important;
    padding-left: 0 !important;
}

.tds-empty-results__card {
    width: var(
        --tds-empty-card-width,
        calc(100% - 48px)
    ) !important;

    max-width: none !important;

    margin-right: 0 !important;

    margin-left: var(
        --tds-empty-card-left,
        24px
    ) !important;
}

@media (max-width: 767px) {
    .tds-empty-results {
        padding-right: 0 !important;
        padding-left: 0 !important;
    }

    .tds-empty-results__card {
        width: var(
            --tds-empty-card-width,
            calc(100% - 40px)
        ) !important;

        margin-left: var(
            --tds-empty-card-left,
            20px
        ) !important;
    }
}

/* =====================================================
   TDS EMPTY RESULTS WIDTH FIX — END
   ===================================================== */

/* =====================================================
   TDS EMPTY RESULTS VERTICAL RHYTHM — START
   Odstępy pomiędzy wyszukiwarką, komunikatem i stopką
   ===================================================== */

/*
 * Desktop:
 * – przesunięcie sekcji bliżej wyszukiwarki o 80 px,
 * – ograniczenie dolnej przestrzeni do około 140 px.
 */
.tds-empty-results {
    margin-top: -80px !important;
    padding-bottom: 95px !important;
}

/*
 * Tablet:
 * łagodniejsza korekta ze względu na mniejszą wysokość
 * wyszukiwarki i możliwe zawijanie jej elementów.
 */
@media (min-width: 768px) and (max-width: 1199px) {
    .tds-empty-results {
        margin-top: -55px !important;
        padding-bottom: 80px !important;
    }
}

/*
 * Telefon:
 * zachowany bezpieczny odstęp od mobilnej wyszukiwarki.
 */
@media (max-width: 767px) {
    .tds-empty-results {
        margin-top: -20px !important;
        padding-bottom: 55px !important;
    }
}

/* =====================================================
   TDS EMPTY RESULTS VERTICAL RHYTHM — END
   ===================================================== */

/* =====================================================
   TDS_LISTING_PAGINATION_START
   Własna paginacja wyników TARG Design System
   ===================================================== */

.tds-pagination {
    box-sizing: border-box;

    width: min(
        var(--tds-container),
        calc(100% - 64px)
    );

    margin: 54px auto 76px;
}

.tds-pagination__list {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;

    margin: 0;
    padding: 0;

    list-style: none;
}

.tds-pagination__item {
    margin: 0;
    padding: 0;

    list-style: none;
}

.tds-pagination .page-numbers {
    box-sizing: border-box;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 56px;
    height: 56px;
    padding: 0 16px;

    border: 1px solid #deddd9 !important;
    border-radius: 16px !important;

    background: #ffffff !important;
    color: var(--tds-dark) !important;

    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none !important;

    box-shadow: none !important;

    transition:
        color 160ms ease,
        border-color 160ms ease,
        background-color 160ms ease,
        transform 160ms ease,
        box-shadow 160ms ease;
}

.tds-pagination a.page-numbers:hover,
.tds-pagination a.page-numbers:focus-visible {
    border-color: var(--tds-gold) !important;
    background: #fbf7f0 !important;
    color: var(--tds-dark) !important;

    transform: translateY(-1px);

    box-shadow:
        0 12px 28px
        rgba(15, 23, 42, 0.07) !important;
}

.tds-pagination .page-numbers.current {
    border-color: var(--tds-dark) !important;
    background: var(--tds-dark) !important;
    color: #ffffff !important;

    box-shadow:
        0 14px 30px
        rgba(15, 23, 42, 0.16) !important;
}

.tds-pagination .page-numbers.dots {
    min-width: 34px;
    padding-inline: 4px;

    border-color: transparent !important;
    background: transparent !important;
    color: #9297a1 !important;
}

.tds-pagination .page-numbers.prev,
.tds-pagination .page-numbers.next {
    gap: 15px;

    min-width: 170px;
    padding-inline: 23px;
}

.tds-pagination__arrow {
    color: var(--tds-gold);
    font-size: 25px;
    font-weight: 400;
    line-height: 1;
}

.tds-pagination__label {
    color: inherit;
    font-size: 15px;
    font-weight: 750;
}

/*
 * Ukrywa techniczną statystykę RH.
 * Dane pozostają w HTML na potrzeby mechanizmu wyników.
 */
.rh_pagination__stats {
    display: none !important;
}

/* Tablet */

@media (max-width: 900px) {

    .tds-pagination {
        margin-top: 44px;
        margin-bottom: 62px;
    }

    .tds-pagination__list {
        gap: 9px;
    }

    .tds-pagination .page-numbers.prev,
    .tds-pagination .page-numbers.next {
        min-width: 145px;
        padding-inline: 18px;
    }
}

/* Telefon */

@media (max-width: 767px) {

    .tds-pagination {
        width: calc(100% - 40px);

        margin-top: 36px;
        margin-bottom: 48px;
    }

    .tds-pagination__list {
        flex-wrap: nowrap;
        gap: 7px;
    }

    .tds-pagination .page-numbers {
        min-width: 46px;
        height: 46px;
        padding: 0 11px;

        border-radius: 14px !important;

        font-size: 14px;
    }

    .tds-pagination .page-numbers.prev,
    .tds-pagination .page-numbers.next {
        gap: 0;

        min-width: 46px;
        width: 46px;
        padding: 0;
    }

    .tds-pagination__label {
        position: absolute;

        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;

        overflow: hidden;
        clip: rect(0, 0, 0, 0);

        white-space: nowrap;
        border: 0;
    }

    .tds-pagination__arrow {
        font-size: 22px;
    }

    .tds-pagination .page-numbers.dots {
        min-width: 22px;
        padding: 0;
    }
}

@media (max-width: 420px) {

    .tds-pagination__list {
        gap: 5px;
    }

    .tds-pagination .page-numbers {
        min-width: 42px;
        height: 42px;
        padding: 0 9px;

        border-radius: 13px !important;
    }

    .tds-pagination .page-numbers.prev,
    .tds-pagination .page-numbers.next {
        min-width: 42px;
        width: 42px;
    }
}

/* TDS_LISTING_PAGINATION_END */

/* =====================================================
   TDS_TAXONOMY_FOOTER_SPACING_START
   Paginacja TARG DS i odstęp listy od stopki
   ===================================================== */

body.tax-property-type #properties-listing {
    box-sizing: border-box;
    padding-bottom: clamp(72px, 6vw, 104px) !important;
}

body.tax-property-type #properties-listing .tds-pagination {
    margin-bottom: 0;
}

@media (max-width: 767px) {
    body.tax-property-type #properties-listing {
        padding-bottom: 56px !important;
    }
}

/* TDS_TAXONOMY_FOOTER_SPACING_END */

/* ==========================================================
   TDS_LISTING_FOOTER_GAP_START
   Stały odstęp między wynikami/paginacją a stopką.
   ========================================================== */

body.page-template-properties-search #properties-listing,
body.tax-property-type #properties-listing,
body.tax-property-city #properties-listing,
body.tax-property-status #properties-listing,
body.tax-property-feature #properties-listing,
body.post-type-archive-property #properties-listing {
    padding-bottom: 80px !important;
}

/*
 * TDS_LISTING_PAGINATION_GAP_CONDITION
 * Paginacja posiada własny dolny margines, dlatego wyłączamy
 * dodatkowy padding kontenera, gdy paginacja jest widoczna.
 */
body.page-template-properties-search #properties-listing:has(.tds-pagination),
body.tax-property-type #properties-listing:has(.tds-pagination),
body.tax-property-city #properties-listing:has(.tds-pagination),
body.tax-property-status #properties-listing:has(.tds-pagination),
body.tax-property-feature #properties-listing:has(.tds-pagination),
body.post-type-archive-property #properties-listing:has(.tds-pagination) {
    padding-bottom: 0 !important;
}

@media (max-width: 767px) {
    body.page-template-properties-search #properties-listing,
    body.tax-property-type #properties-listing,
    body.tax-property-city #properties-listing,
    body.tax-property-status #properties-listing,
    body.tax-property-feature #properties-listing,
    body.post-type-archive-property #properties-listing {
        padding-bottom: 48px !important;
    }
}

/* TDS_LISTING_FOOTER_GAP_END */
/* ==========================================================
   TDS_LISTING_FOOTER_GAP_FIX_START
   Odstęp między paginacją/listą wyników a stopką.
   ========================================================== */

body.page-template-properties-search #properties-listing:has(.tds-pagination),
body.tax-property-type #properties-listing:has(.tds-pagination),
body.tax-property-city #properties-listing:has(.tds-pagination),
body.tax-property-status #properties-listing:has(.tds-pagination),
body.tax-property-feature #properties-listing:has(.tds-pagination),
body.post-type-archive-property #properties-listing:has(.tds-pagination) {
    padding-bottom: clamp(72px, 6vw, 96px) !important;
}

body.page-template-properties-search #properties-listing .tds-pagination,
body.tax-property-type #properties-listing .tds-pagination,
body.tax-property-city #properties-listing .tds-pagination,
body.tax-property-status #properties-listing .tds-pagination,
body.tax-property-feature #properties-listing .tds-pagination,
body.post-type-archive-property #properties-listing .tds-pagination {
    margin-bottom: 0;
}

@media (max-width: 767px) {
    body.page-template-properties-search #properties-listing:has(.tds-pagination),
    body.tax-property-type #properties-listing:has(.tds-pagination),
    body.tax-property-city #properties-listing:has(.tds-pagination),
    body.tax-property-status #properties-listing:has(.tds-pagination),
    body.tax-property-feature #properties-listing:has(.tds-pagination),
    body.post-type-archive-property #properties-listing:has(.tds-pagination) {
        padding-bottom: 48px !important;
    }
}

/* TDS_LISTING_FOOTER_GAP_FIX_END */

/* ==========================================================

/* ==========================================================
   TDS_SORT_DROPDOWN_CLIPPING_FIX_START
   Menu sortowania ponad listą i bez przycinania przez RH.
   ========================================================== */

body.page-template-properties-search .rh_section--flex,
body[class*="tax-property-"] .rh_section--flex,
body.post-type-archive-property .rh_section--flex {
    overflow: visible !important;
}

body.page-template-properties-search .rh_page,
body[class*="tax-property-"] .rh_page,
body.post-type-archive-property .rh_page,
body.page-template-properties-search .rh_page__listing_page,
body[class*="tax-property-"] .rh_page__listing_page,
body.post-type-archive-property .rh_page__listing_page {
    overflow: visible !important;
}

body.page-template-properties-search .tds-listing-toolbar,
body[class*="tax-property-"] .tds-listing-toolbar,
body.post-type-archive-property .tds-listing-toolbar {
    position: relative !important;
    z-index: 200 !important;
    overflow: visible !important;
    isolation: auto !important;
}

body.page-template-properties-search .tds-sort,
body[class*="tax-property-"] .tds-sort,
body.post-type-archive-property .tds-sort {
    position: relative !important;
    z-index: 210 !important;
    overflow: visible !important;
}

body.page-template-properties-search .tds-sort__menu,
body[class*="tax-property-"] .tds-sort__menu,
body.post-type-archive-property .tds-sort__menu {
    z-index: 220 !important;
}

body.page-template-properties-search #properties-listing,
body[class*="tax-property-"] #properties-listing,
body.post-type-archive-property #properties-listing {
    position: relative !important;
    z-index: 1 !important;
}

/* TDS_SORT_DROPDOWN_CLIPPING_FIX_END */
