/* =============================================
   LISTING SHELL
   ============================================= */
body {
    --roark-listing-side-padding: 16px;
    --roark-map-sidebar-width: 380px;

    /* --roark-btn-bg / -bg-hover / -fg and the --roark-global-color-primary
       alias are the shared theme-aware button-colour chain — single source
       of truth now lives in roark-tokens.css (registered as this
       stylesheet's dependency in AssetsManager, loaded on every page that
       can render a Roark primary CTA, including the exposé where this file
       itself isn't loaded). Fallback with the same literal here only
       defends against roark-tokens.css somehow not being enqueued.
       Declared on `body` (not `:root`) to match roark-tokens.css: this rule
       reads --roark-global-color-primary, which is only resolvable where
       Elementor's `--e-global-color-*` kit vars are visible (on `body`,
       which carries the kit's `.elementor-kit-{id}` class — see the longer
       explanation in roark-tokens.css). Declaring this alias-consuming rule
       on `:root` instead would re-introduce the same bug one level up: at
       `:root` (an ancestor of `body`), --roark-global-color-primary would
       resolve using :root's own (kit-blind) view of the chain, ignoring
       whatever body's rule actually resolved it to. */
    --roark-filter-accent: var(--roark-global-color-primary, #2563eb);
    --roark-filter-accent-contrast: #fff;

    --roark-card-padding: 10px;
    --roark-card-image-height: 280px;  /* grid card main photo height */
    --roark-card-h-image-width: 400px; /* horizontal (list/map) card image column width */
    --roark-card-button-bg: #1f5d8f;
    --roark-card-button-bg-hover: #184d76;
    /* Sticky offset for the split-view map column. Small fallback gap for
       themes with no fixed/sticky header; listing-map.js measures any
       actual fixed/sticky header at runtime and overrides this variable on
       the root element, so this value only matters before JS runs / when
       no such header is found. */
    --roark-map-top: 12px;
}

.roark-listing-shell {
    width: 100%;
    box-sizing: border-box;
    position: relative; /* anchor for the loading overlay */
}

/* ── AJAX loading overlay ─────────────────────────────────────────────── */
/* The overlay itself still spans the whole (often multi-thousand-px-tall)
   .roark-listing-shell so the dimmed backdrop covers the entire result set,
   but the spinner is `position: sticky` inside it so it stays pinned to the
   middle of the *viewport* while the overlay scrolls past underneath —
   without this, a flex-centered spinner ends up centered on the overlay's
   full height and can render thousands of px below the fold. `align-items:
   flex-start` is required for the sticky offset below to take effect (a
   flex-centered sticky child never reaches the `top` threshold from a
   normal scroll position). z-index is raised above the mobile "Karte"
   full-screen map panel (900, see `.is-mobile-map …__map` below) and the
   mobile Liste/Karte bar (400) so the spinner isn't hidden behind either. */
.roark-listing-loader {
    position: absolute;
    inset: 0;
    z-index: 950;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease;
    border-radius: inherit;
    min-height: 120px;
}

.roark-listing-loader.is-loading {
    opacity: 1;
    pointer-events: auto;
}

.roark-listing-loader__spinner {
    position: sticky;
    top: calc(50vh - 18px);
    width: 36px;
    height: 36px;
    border: 3px solid rgba(0, 0, 0, 0.08);
    border-top-color: var(--roark-global-color-primary, #2563eb);
    border-radius: 50%;
    animation: roark-loader-spin 0.65s linear infinite;
}

@keyframes roark-loader-spin {
    to { transform: rotate(360deg); }
}

.roark-listing-shell--full {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    padding-left: var(--roark-listing-side-padding, 16px);
    padding-right: var(--roark-listing-side-padding, 16px);
}

/* =============================================
   GRID / LIST LAYOUT
   ============================================= */
.roark-grid {
    display: grid;
    gap: 16px;
    align-items: stretch; /* equal-height cards so footers line up across the row */
}

.roark-grid > :not(style, script, link, template) {
    height: 100%;
    min-width: 0; /* prevent grid blowout */
}

/* Theme addons (ThemeREX etc.) print <style>/<script> tags inside each rendered
   card template; never let them become grid/flex items or show raw CSS text. */
.roark-grid > style, .roark-grid > script, .roark-grid > link, .roark-grid > template,
.roark-list > style, .roark-list > script, .roark-list > link, .roark-list > template,
.roark-list-card-wrap > style, .roark-list-card-wrap > script, .roark-list-card-wrap > link,
.roark-map-sidebar-item > style, .roark-map-sidebar-item > script, .roark-map-sidebar-item > link,
.roark-favorites__grid > style, .roark-favorites__grid > script, .roark-favorites__grid > link,
.roark-favorites__item > style, .roark-favorites__item > script, .roark-favorites__item > link,
.roark-other-offers-slider-wrap style, .roark-other-offers-slider-wrap script {
    display: none !important;
}

.roark-grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.roark-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.roark-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Responsive grid column collapse */
@media (max-width: 1199px) {
    .roark-grid-4 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
    .roark-grid-3,
    .roark-grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .roark-grid-2,
    .roark-grid-3,
    .roark-grid-4 { grid-template-columns: 1fr; }
}

.roark-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 1100px;
    margin: 0 auto;
}

.roark-property-card {
    padding: 20px;
}

.roark-list .roark-property-card {
    padding: 0;
}

/* Elementor's own `.elementor-icon` base style ships a `font-size: 50px`
   default (meant for the Icon Box widget) that any icon rendered through
   IconControlsTrait::render_icon_html() inherits unless a widget sets its
   own icon-size control — the icon's SVG uses `1em`, so it silently blows
   up to 50×50px. `roark-card` (PropertyAddressWidget's declared style
   dependency) carries the same rule; duplicated here since listing.css is
   the one guaranteed loaded wherever ListingWidget/PropertyAddressWidget
   render on the card grid/list/map. Feature-badge icons render inline SVG
   directly (no `.elementor-icon` wrapper) and are unaffected. */
.roark-card .elementor-icon,
.roark-list-card-wrap .elementor-icon {
    font-size: 1em;
}

.roark-property-address__icon {
    font-size: 1em;
    width: 1em;
    height: 1em;
    display: inline-flex;
    vertical-align: -0.15em;
}

.roark-property-address__icon svg {
    width: 1em;
    height: 1em;
}

/* =============================================
   CARD TEMPLATE CONTAINMENT + EQUAL HEIGHTS
   ============================================= */

/* ── Width containment ───────────────────────── */

.roark-grid .elementor-container,
.roark-list .elementor-container,
.roark-listing-map-view__list .elementor-container,
.roark-map-sidebar .elementor-container {
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.roark-grid .e-con-inner,
.roark-list .e-con-inner,
.roark-listing-map-view__list .e-con-inner,
.roark-map-sidebar .e-con-inner {
    max-width: 100% !important;
    width: 100% !important;
}

/* ── Grid cell: stretch the Elementor root wrappers to fill cell height ── */
/* get_builder_content_for_display() wraps output in .elementor > .elementor-section-wrap */

.roark-grid > :not(style, script, link, template),
.roark-list > :not(style, script, link, template) {
    display: flex;
    flex-direction: column;
}

.roark-grid > :not(style, script, link, template) > .elementor,
.roark-list > :not(style, script, link, template) > .elementor,
.roark-list-card-wrap > .elementor,
.roark-map-sidebar-item > .elementor {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    width: 100%;
}

.roark-grid > :not(style, script, link, template) > .elementor > .elementor-section-wrap,
.roark-list > :not(style, script, link, template) > .elementor > .elementor-section-wrap,
.roark-list-card-wrap > .elementor > .elementor-section-wrap,
.roark-map-sidebar-item > .elementor > .elementor-section-wrap {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

/* Section / e-con root: full width + fill height */
.roark-grid > :not(style, script, link, template) > .elementor-section,
.roark-grid > :not(style, script, link, template) > .elementor > .elementor-section-wrap > .elementor-section,
.roark-list > :not(style, script, link, template) > .elementor-section,
.roark-list > :not(style, script, link, template) > .elementor > .elementor-section-wrap > .elementor-section,
.roark-list-card-wrap > .elementor-section,
.roark-list-card-wrap > .elementor > .elementor-section-wrap > .elementor-section,
.roark-map-sidebar-item > .elementor-section,
.roark-map-sidebar-item > .elementor > .elementor-section-wrap > .elementor-section {
    max-width: 100% !important;
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    flex: 1;
}

.roark-grid > :not(style, script, link, template) > .e-con,
.roark-grid > :not(style, script, link, template) > .elementor > .elementor-section-wrap > .e-con,
.roark-list > :not(style, script, link, template) > .e-con,
.roark-list > :not(style, script, link, template) > .elementor > .elementor-section-wrap > .e-con,
.roark-list-card-wrap > .e-con,
.roark-map-sidebar-item > .e-con {
    max-width: 100% !important;
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    flex: 1;
    min-height: 0;
}

/* ── Grid card: propagate flex-column through the classic wrapper chain ── */

/* Card root and card body need the identical propagation chain (body is
   itself a nested Elementor section inside the card) — grouped together
   instead of repeating the same three declarations blocks twice. */
.roark-demo-grid-card > .elementor-container,
.roark-demo-grid-card > .elementor-container > .elementor-row,
.roark-demo-grid-card > .elementor-container > .elementor-row > .elementor-column,
.roark-demo-grid-card > .elementor-container > .elementor-row > .elementor-column > .elementor-column-wrap,
.roark-demo-grid-card .roark-demo-grid-card__body > .elementor-container,
.roark-demo-grid-card .roark-demo-grid-card__body > .elementor-container > .elementor-row,
.roark-demo-grid-card .roark-demo-grid-card__body > .elementor-container > .elementor-row > .elementor-column,
.roark-demo-grid-card .roark-demo-grid-card__body > .elementor-container > .elementor-row > .elementor-column > .elementor-column-wrap {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 !important;
    min-height: 0;
}

/* Override Elementor's default flex-wrap:wrap on widget-wrap inside the card column */
.roark-demo-grid-card > .elementor-container > .elementor-row > .elementor-column > .elementor-column-wrap > .elementor-widget-wrap,
.roark-demo-grid-card .roark-demo-grid-card__body > .elementor-container > .elementor-row > .elementor-column > .elementor-column-wrap > .elementor-widget-wrap {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    flex: 1 !important;
    min-height: 0;
    align-content: flex-start;
}

/* e-con path (card root + body) */
.roark-demo-grid-card.e-con > .e-con-inner,
.roark-demo-grid-card .roark-demo-grid-card__body.e-con > .e-con-inner {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 !important;
    min-height: 0;
}

/* Body inner section fills remaining vertical space */
.roark-demo-grid-card .roark-demo-grid-card__body {
    flex: 1 !important;
}

/* Grid card vertical chain — real DOM path.
   This Elementor build renders `.elementor-column > .elementor-widget-wrap`
   directly (no `.elementor-column-wrap`), so the legacy chain above never
   matches. Propagate flex-column + grow here so the body fills the card height
   and the footer can pin to the bottom in equal-height grid cells. */
.roark-demo-grid-card > .elementor-container,
.roark-demo-grid-card > .elementor-container > .elementor-column,
.roark-demo-grid-card > .elementor-container > .elementor-column > .elementor-widget-wrap,
.roark-demo-grid-card__body > .elementor-container,
.roark-demo-grid-card__body > .elementor-container > .elementor-column,
.roark-demo-grid-card__body > .elementor-container > .elementor-column > .elementor-widget-wrap {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto !important;
    min-height: 0;
}

/* Keep the card image at its fixed height (don't let the flex column shrink it) */
.roark-demo-grid-card__image {
    flex: 0 0 auto !important;
}

/* Footer always at bottom of body */
.roark-demo-grid-card .roark-demo-grid-card__footer {
    margin-top: auto !important;
}

/* ── List card: equal-height image and body columns ─────────────────────── */

/* Outer wrapper chain: make the outer column fill the card height */
.roark-demo-list-card > .elementor-container,
.roark-demo-list-card > .elementor-container > .elementor-row,
.roark-demo-list-card > .elementor-container > .elementor-row > .elementor-column,
.roark-demo-list-card > .elementor-container > .elementor-row > .elementor-column > .elementor-column-wrap {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 !important;
    min-height: 0;
}

.roark-demo-list-card > .elementor-container > .elementor-row > .elementor-column > .elementor-column-wrap > .elementor-widget-wrap {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    flex: 1 !important;
    min-height: 0;
}

/* Inner row section: stretch both columns to equal height */
.roark-demo-list-card .elementor-inner-section > .elementor-container > .elementor-row {
    display: flex !important;
    align-items: stretch !important;
    min-height: 200px;
}

/* Image column: keep Elementor's 38% width (do NOT put flex on the column itself,
   that collapses its basis to 0); stretch the inner wrapper to full card height.
   This Elementor build renders `.elementor-column > .elementor-widget-wrap`
   directly (no `.elementor-column-wrap`), so target the widget-wrap. */
.roark-demo-list-card__image-col {
    display: flex !important;
    flex-direction: column !important;
    flex: 0 0 var(--roark-card-h-image-width, 240px) !important;
    max-width: var(--roark-card-h-image-width, 240px) !important;
    min-height: 0;
}

.roark-demo-list-card__body-col {
    flex: 1 1 auto !important;
    min-width: 0 !important;
}

.roark-demo-list-card__image-col > .elementor-widget-wrap,
.roark-demo-list-card__image-col > .elementor-column-wrap,
.roark-demo-list-card__image-col > .elementor-column-wrap > .elementor-widget-wrap,
.roark-demo-list-card__image-col.e-con > .e-con-inner {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 !important;
    min-height: 0;
}

/* Body column: flex column so footer can sit at bottom */
.roark-demo-list-card__body-col > .elementor-widget-wrap,
.roark-demo-list-card__body-col > .elementor-column-wrap,
.roark-demo-list-card__body-col > .elementor-column-wrap > .elementor-widget-wrap,
.roark-demo-list-card__body-col.e-con > .e-con-inner {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    flex: 1 !important;
    min-height: 0;
}

.roark-demo-list-card .roark-demo-list-card__footer {
    margin-top: auto !important;
}

/* ── Map card image column ───────────────────────────────────────────────── */

.roark-demo-map-card__image-col {
    display: flex !important;
    flex-direction: column !important;
    flex: 0 0 var(--roark-card-h-image-width, 240px) !important;
    max-width: var(--roark-card-h-image-width, 240px) !important;
    min-height: 0;
}

.roark-demo-map-card__image-col > .elementor-widget-wrap,
.roark-demo-map-card__image-col > .elementor-column-wrap,
.roark-demo-map-card__image-col > .elementor-column-wrap > .elementor-widget-wrap,
.roark-demo-map-card__image-col.e-con > .e-con-inner {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 !important;
    height: 100%;
    min-height: 0;
}

/* Property count line above listing */
.roark-listing-count {
    margin: 0 0 20px;
    font-size: 1.25rem;
    color: #334155;
    font-weight: 700;
    letter-spacing: 0.01em;
    text-align: center;
}

/* ── Demo list card — two-column horizontal (image left | body right) ── */
/* Card frame (background/border/radius/shadow) is identical across all
   three demo card skins (list/map/grid) — shared here once; each skin's
   own block below only adds what genuinely differs (e.g. the grid card's
   flex-column self layout). */
.roark-demo-list-card,
.roark-demo-map-card,
.roark-demo-grid-card {
    position: relative;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: var(--roark-radius-card, 10px);
    overflow: hidden;
    box-shadow: var(--roark-shadow-card, 0 0 16px rgba(15, 23, 42, 0.10));
    transition: box-shadow 0.18s ease;
}

.roark-demo-list-card:hover,
.roark-demo-map-card:hover,
.roark-demo-grid-card:hover {
    box-shadow: 0 0 26px rgba(15, 23, 42, 0.17);
}

/* Badge pill overlaid on the image */
.roark-demo-list-card__image-col,
.roark-demo-map-card__image-col {
    position: relative;
}

/*
 * The image column stacks overlay widgets (badge, favorite) above the image in a
 * flex-COLUMN widget-wrap. Elementor's default flex-wrap:wrap would let the image
 * — whose height equals the card height — wrap into a phantom second column once
 * an extra (overlay) widget is added, pushing it over the body column. Force a
 * single column so the image always fills its own column.
 */
.roark-demo-list-card__image-col > .elementor-widget-wrap,
.roark-demo-map-card__image-col > .elementor-widget-wrap {
    flex-wrap: nowrap;
}

/*
 * The image|body row must never wrap: Elementor's default flex-wrap lets the
 * body column (percentage flex-basis) drop BELOW the fixed-width image column
 * as soon as both no longer fit (e.g. tablet widths). Then the body no longer
 * stretches to the card height and the footer loses its bottom anchor. With
 * nowrap the body simply shrinks (it has min-width: 0) and stays beside the
 * image, so `margin-top: auto` pins the footer to the card bottom everywhere.
 */
.roark-demo-list-card .elementor-inner-section > .elementor-container,
.roark-demo-map-card .elementor-inner-section > .elementor-container {
    flex-wrap: nowrap;
}

/*
 * Map sidebar cards live in containers of very different widths (wide split
 * on desktop, narrow sidebar on tablet, full width on mobile). Stack the
 * image|body row whenever the CARD ITSELF is narrow — a container query,
 * since the viewport says nothing about the sidebar width. Mirrors the
 * mobile media-query stack below, which stays as a fallback.
 */
.roark-list-card-wrap {
    container-type: inline-size;
}

@container (max-width: 559px) {
    .roark-demo-map-card > .elementor-container > .elementor-column > .elementor-widget-wrap > .elementor-inner-section > .elementor-container {
        flex-direction: column !important;
        min-height: 0;
    }

    .roark-demo-map-card > .elementor-container > .elementor-column > .elementor-widget-wrap > .elementor-inner-section > .elementor-container > .elementor-column,
    .roark-demo-map-card__image-col {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 auto !important;
    }

    .roark-demo-map-card__image img {
        height: 200px;
        min-height: 0;
        flex: none;
    }

    /* Ratio-box images stay governed by their own aspect-ratio, even at this
       narrow width (higher specificity than the fixed-height rule above). */
    .roark-demo-map-card__image .roark-property-image__ratio-box img {
        height: 100%;
        min-height: 0;
    }
}

.roark-demo-list-card__badge {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 3;
}

/* Common badge look shared across all three card skins; each skin's own
   rule below only carries what genuinely differs (padding/font-size, and
   whether the pill gets a drop shadow). */
.roark-demo-list-card__badge .roark-expose-field,
.roark-demo-map-card__badge .roark-expose-field,
.roark-demo-grid-card__badge .roark-expose-field {
    display: inline-flex;
    align-items: center;
    border-radius: var(--roark-radius-pill, 999px);
    background: rgba(255, 255, 255, 0.95);
    color: #0f172a;
    font-weight: 700;
    line-height: 1.2;
}

.roark-demo-list-card__badge .roark-expose-field {
    padding: 5px 12px;
    font-size: 0.78rem;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.14);
    backdrop-filter: blur(6px);
}

/* Image stretches to fill the column */
.roark-demo-list-card__image {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.roark-demo-list-card__image .elementor-widget-container {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.roark-demo-list-card__image img {
    flex: 1;
    width: 100%;
    object-fit: cover;
    display: block;
    min-height: 200px;
}

/* Body text */
.roark-demo-list-card .roark-property-title {
    font-size: 1.18rem;
    font-weight: 700;
    line-height: 1.3;
    color: #0f172a;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
}

.roark-demo-list-card .roark-property-address {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #64748b;
    font-size: 0.88rem;
    max-width: 100%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.roark-demo-list-card .roark-property-price {
    display: block;
    font-size: 1.45rem;
    font-weight: 800;
    line-height: 1.2;
    color: #0f172a;
    margin: 0;
}

/* Fact pills */
.roark-demo-list-card__facts {
    margin-top: 4px;
    margin-bottom: 6px;
}

.roark-demo-list-card__fact .roark-expose-field {
    display: inline-flex;
    flex-direction: row-reverse;
    align-items: baseline;
    gap: 4px;
    padding: 4px 10px;
    border-radius: var(--roark-radius-pill, 999px);
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #334155;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}

.roark-demo-list-card__fact--reverse .roark-expose-field-label {
    order: 2;
    color: #94a3b8;
    font-weight: 500;
}

.roark-demo-list-card__fact--reverse .roark-expose-field-value {
    order: 1;
    color: #1e293b;
}

/* Footer row: agent (left) + button (right) */
.roark-demo-list-card__footer {
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid #f1f5f9;
}

.roark-demo-list-card__footer .elementor-row {
    align-items: center;
}

/* The agent block and the Details button used to sit side by side in
   Elementor's classic 60/40 percentage columns (`.elementor-col-60` /
   `.elementor-col-40`). On a narrow split-view sidebar card (map tab) that
   40% column is far narrower than a real agent name + company needs, so the
   name/company truncated to a couple of characters ("Mar…" / "Mus…") no
   matter how the columns were proportioned — there just isn't room for both
   a name and a button on one row at ~220px. Stack instead: the agent block
   gets the full card width on its own row, the Details button gets the
   full width on the row below — readable at any card width (including the
   narrow map-tab sidebar and mobile), and identical across list/map/grid
   card contexts (see the grid-card footer rules further down). */
.roark-demo-list-card__footer .elementor-container,
.roark-demo-map-card__footer .elementor-container {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
}

.roark-demo-list-card__footer .elementor-column,
.roark-demo-map-card__footer .elementor-column {
    flex: 0 0 auto;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0;
}

.roark-demo-list-card__footer .elementor-column:last-child .elementor-widget-wrap,
.roark-demo-map-card__footer .elementor-column:last-child .elementor-widget-wrap {
    align-items: stretch;
}

.roark-demo-list-card__footer .roark-property-button,
.roark-demo-map-card__footer .roark-property-button {
    width: 100%;
    white-space: nowrap;
}

/* Agent: photo (left, 2 rows) | name + firma (right, stacked) — list + map cards.
   (Grid card's own agent block is nearby, further below — it shares the
   __title/__logo/__item/__buttons hiding, the "firma" line and the photo
   <img> declarations byte-for-byte with list/map, so those are grouped in
   here too; only the grid-template-columns width, the photo box size, and
   the name's font-size/overflow behavior genuinely differ per card and stay
   in the grid card's own block.) */
.roark-demo-list-card__agent .roark-expose-agent,
.roark-demo-map-card__agent .roark-expose-agent {
    display: grid;
    grid-template-columns: 32px 1fr;
    gap: 0 8px;
    align-items: center;
    min-width: 0;
}

.roark-demo-list-card__agent .roark-expose-agent__title,
.roark-demo-list-card__agent .roark-expose-agent-logo,
.roark-demo-list-card__agent .roark-expose-agent__item:not(.roark-expose-agent-firma),
.roark-demo-list-card__agent .roark-expose-agent__buttons,
.roark-demo-map-card__agent .roark-expose-agent__title,
.roark-demo-map-card__agent .roark-expose-agent-logo,
.roark-demo-map-card__agent .roark-expose-agent__item:not(.roark-expose-agent-firma),
.roark-demo-map-card__agent .roark-expose-agent__buttons,
.roark-demo-grid-card__agent .roark-expose-agent__title,
.roark-demo-grid-card__agent .roark-expose-agent-logo,
.roark-demo-grid-card__agent .roark-expose-agent__item:not(.roark-expose-agent-firma),
.roark-demo-grid-card__agent .roark-expose-agent__buttons {
    display: none;
}

.roark-demo-list-card__agent .roark-expose-agent-firma,
.roark-demo-map-card__agent .roark-expose-agent-firma,
.roark-demo-grid-card__agent .roark-expose-agent-firma {
    grid-column: 2;
    grid-row: 2;
    display: block !important;
    font-size: 0.75rem;
    color: #64748b;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.roark-demo-list-card__agent .roark-expose-agent-firma .roark-expose-agent__label,
.roark-demo-map-card__agent .roark-expose-agent-firma .roark-expose-agent__label,
.roark-demo-grid-card__agent .roark-expose-agent-firma .roark-expose-agent__label {
    display: none;
}

.roark-demo-list-card__agent .roark-expose-agent-photo,
.roark-demo-map-card__agent .roark-expose-agent-photo {
    margin: 0;
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 50%;
    overflow: hidden;
    grid-column: 1;
    grid-row: 1 / 3;
    align-self: center;
}

.roark-demo-list-card__agent .roark-expose-agent-photo img,
.roark-demo-map-card__agent .roark-expose-agent-photo img,
.roark-demo-grid-card__agent .roark-expose-agent-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.roark-demo-list-card__agent .roark-expose-agent-name,
.roark-demo-map-card__agent .roark-expose-agent-name {
    margin: 0;
    grid-column: 2;
    grid-row: 1;
    color: #0f172a;
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.2;
    /* The footer stacking fix above (full-width agent row) leaves enough
       room for almost every name, but a long name + narrow map-tab sidebar
       card can still come a few px short — wrap to a 2nd line instead of
       ellipsizing a real name into 1-2 characters. The photo spans both
       grid rows (grid-row: 1 / 3) so it stays centered next to a 2-line
       name without extra changes. */
    overflow-wrap: break-word;
}

/* Visual styling (background, radius, color) is inherited from the Elementor
   theme's button kit via the .elementor-button class. Only layout remains here. */
.roark-demo-list-card .roark-property-button,
.roark-demo-map-card .roark-property-button {
    text-align: center;
}

.roark-demo-map-card__footer .roark-property-button {
    min-height: 44px;
    width: auto;
    min-width: 124px;
}

/* Demo map card template styling — horizontal (image left | body right) */
/* Card frame: shared with list/map/grid above. */

/* Propagate full height through Elementor wrappers so the image fills the card */
.roark-demo-map-card__image-col > .elementor-column-wrap,
.roark-demo-map-card__image-col > .elementor-column-wrap > .elementor-widget-wrap {
    height: 100%;
}

.roark-demo-map-card__image .elementor-widget-container {
    height: 100%;
}

.roark-demo-map-card__image,
.roark-demo-map-card__image .elementor-widget-container,
.roark-demo-map-card__image img {
    display: block;
    width: 100%;
}

.roark-demo-map-card__image img {
    height: 100%;
    min-height: 90px;
    object-fit: cover;
}

.roark-demo-map-card__badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 3;
}

.roark-demo-map-card__badge .roark-expose-field {
    padding: 4px 9px;
    font-size: 0.75rem;
}

.roark-demo-map-card .roark-property-price {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.2;
    color: #0f172a;
}

.roark-demo-map-card .roark-property-title {
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.3;
    color: #0f172a;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.roark-demo-map-card .roark-property-address {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #475569;
    font-size: 0.82rem;
    max-width: 100%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.roark-demo-map-card__facts {
    /* Was 16px — tuned back when the facts row was immediately followed by
       the footer. Now the feature-chips widget (ExposeFeaturesWidget) sits
       between them, and the leftover 16px plus its own 20px "Card Styling"
       padding (see the .roark-demo-card__features .roark-features override
       above) made the gap to the chips ~40px, nearly double every other
       row-to-row gap in this card (title/price 4px, address 8px). Match the
       address row's own trailing gap instead. */
    margin-bottom: 8px;
}

.roark-demo-map-card__fact .roark-expose-field {
    display: inline-flex;
    flex-direction: row-reverse;
    align-items: baseline;
    gap: 3px;
    padding: 3px 7px;
    border-radius: var(--roark-radius-pill, 999px);
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #334155;
    font-size: 0.75rem; /* ≥12px: readability floor for card facts */
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}

.roark-demo-map-card__fact--reverse .roark-expose-field-label {
    order: 2;
}

.roark-demo-map-card__fact--reverse .roark-expose-field-value {
    order: 1;
    color: #0f172a;
}

.roark-demo-map-card__footer {
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid #e2e8f0;
}

.roark-demo-map-card__footer .elementor-row {
    align-items: center;
}

.roark-demo-map-card__footer .elementor-column:last-child .elementor-widget-wrap {
    justify-content: flex-end;
    align-items: center;
}

.roark-demo-map-card__footer .roark-property-button {
    min-height: 38px;
}

/* Demo grid card template styling */
/* Card frame: shared with list/map above; only the grid card needs its own
   flex-column self layout (equal-height grid cells). */
.roark-demo-grid-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Grid image is a fixed-height area so every card matches: a single-photo card
   fills the whole area with the main image, while a card with the thumbnail
   strip splits it into (main image + 3 thumbnails). */
.roark-demo-grid-card__image {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.roark-demo-grid-card__image .elementor-widget-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    /* No fixed px height: the ratio-box below (PropertyImageWidget's
       `image_ratio` control) sizes the main photo via `aspect-ratio`, and the
       optional thumbnail strip adds its own height under it. */
}

.roark-demo-grid-card__image .elementor-widget-container > a {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.roark-demo-grid-card__image img {
    flex: 1 1 auto;
    width: 100%;
    height: 100%;
    min-height: 0;
    object-fit: cover;
    display: block;
}

/* ── Fixed-ratio image box (PropertyImageWidget `image_ratio` control) ──────
   When set to anything other than "Auto", the main photo (+ its floorplan /
   video / count badges) is wrapped in this box: a fixed `aspect-ratio` crop
   (padding-top fallback for browsers without `aspect-ratio` support) with
   `object-fit: cover; object-position: center` on the <img>. Every card gets
   the same image height regardless of the source photo's own aspect, and the
   box sits at the top of its column — it is intentionally NOT stretched to
   fill a taller column. */
.roark-property-image__ratio-box {
    position: relative;
    display: block;
    width: 100%;
    overflow: hidden;
}

.roark-property-image__ratio-box[data-roark-ratio="4-3"] {
    aspect-ratio: 4 / 3;
}

.roark-property-image__ratio-box[data-roark-ratio="3-2"] {
    aspect-ratio: 3 / 2;
}

.roark-property-image__ratio-box[data-roark-ratio="16-9"] {
    aspect-ratio: 16 / 9;
}

.roark-property-image__ratio-box[data-roark-ratio="1-1"] {
    aspect-ratio: 1 / 1;
}

@supports not (aspect-ratio: 1 / 1) {
    .roark-property-image__ratio-box[data-roark-ratio="4-3"] {
        height: 0;
        padding-top: 75%;
    }

    .roark-property-image__ratio-box[data-roark-ratio="3-2"] {
        height: 0;
        padding-top: 66.6667%;
    }

    .roark-property-image__ratio-box[data-roark-ratio="16-9"] {
        height: 0;
        padding-top: 56.25%;
    }

    .roark-property-image__ratio-box[data-roark-ratio="1-1"] {
        height: 0;
        padding-top: 100%;
    }
}

.roark-property-image__ratio-box > a {
    position: absolute;
    inset: 0;
    display: block;
}

.roark-property-image__ratio-box > img,
.roark-property-image__ratio-box > a > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* ── Photo-count badge (bottom-right of card images) ─────────────────────── */
.roark-demo-grid-card__image .elementor-widget-container,
.roark-demo-list-card__image .elementor-widget-container,
.roark-demo-map-card__image .elementor-widget-container,
.roark-map-popup-wrapper .roark-map-popup__image .elementor-widget-container {
    position: relative;
}

.roark-property-image__count {
    position: absolute;
    right: 8px;
    bottom: 8px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: var(--roark-radius-pill, 999px);
    background: rgba(15, 23, 42, 0.72);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
    pointer-events: none;
}

.roark-property-image__count svg {
    display: block;
}

/* ── Video badge — bottom-left of card images ───────────────────────────── */
.roark-property-image__video {
    position: absolute;
    left: 8px;
    bottom: 8px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    border-radius: var(--roark-radius-pill, 999px);
    background: rgba(15, 23, 42, 0.72);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
    pointer-events: none;
}

.roark-property-image__video svg {
    display: block;
}

/* ── Floor-plan (Grundriss) badge — top-left, under the immo-type badge ───── */
/* Stacked cleanly below the category/type badge on the top-left, with a
   real gap between the two pills. The category badge's own height differs
   per card type (grid ~14px top + ~29-33px tall, list ~14px top + ~25-30px
   tall, map ~10px top + ~22-27px tall — see `.roark-demo-*-card__badge`),
   so a single shared offset has to clear the tallest (grid) case with
   margin to spare; this still leaves a comfortable, consistent gap for
   list/map, on both desktop and the (slightly larger, 13px/12px) mobile
   type scale below. The favorite heart is top-right, so there is no
   overlap with that. */
.roark-property-image__floorplan {
    position: absolute;
    top: 52px;
    left: 10px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: var(--roark-radius-pill, 999px);
    background: rgba(255, 255, 255, 0.95);
    color: #0f172a;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.16);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    pointer-events: none;
}

.roark-property-image__floorplan svg {
    display: block;
    color: var(--roark-btn-bg, #2563eb);
}

.roark-demo-grid-card__badge {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 3;
}

/*
 * Image flush to the card edges (like the map card): remove Elementor's
 * default 10px column-gap padding on the grid card column and the list
 * card image column. The grid body section and the list body column carry
 * their own padding, so only the picture inset disappears.
 */
.roark-demo-grid-card > .elementor-container > .elementor-column > .elementor-widget-wrap,
.roark-demo-grid-card > .elementor-container > .elementor-column > .elementor-column-wrap > .elementor-widget-wrap,
.roark-demo-list-card__image-col > .elementor-widget-wrap,
.roark-demo-list-card__image-col > .elementor-column-wrap > .elementor-widget-wrap {
    padding: 0 !important;
}

/*
 * The favorite widget's button is an absolute overlay, but its Elementor
 * widget wrapper stays in flow: a zero-height block whose default widget
 * margin-bottom pushes the image down (gap above the picture). Pin the
 * wrapper itself to the corner so it leaves the flow entirely.
 */
.roark-demo-grid-card__fav,
.roark-demo-list-card__fav,
.roark-demo-map-card__fav {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 3;
    margin: 0 !important;
}

.roark-demo-grid-card__badge .roark-expose-field {
    padding: 6px 12px;
    font-size: 0.82rem;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.14);
    backdrop-filter: blur(6px);
}

.roark-demo-grid-card__badge .roark-expose-field-value {
    color: inherit;
}

.roark-demo-grid-card__body {
    background: #fff;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    padding: var(--roark-card-padding, 14px) !important;
}

.roark-demo-grid-card .elementor-widget:not(:last-child) {
    margin-bottom: 4px;
}

.roark-demo-grid-card .elementor-column,
.roark-demo-grid-card .elementor-column-wrap,
.roark-demo-grid-card .elementor-widget-wrap {
    gap: 0;
}

.roark-demo-grid-card .roark-property-price {
    display: block;
    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1.2;
    color: #0f172a;
    margin: 0;
}

.roark-demo-grid-card .roark-property-title {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
    color: #0f172a;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
}

.roark-demo-grid-card .roark-property-address {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 0;
    color: #475569;
    font-size: 0.9rem;
    min-height: 1.2em;
    max-width: 100%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.roark-demo-grid-card__facts {
    margin-top: 2px;
    margin-bottom: 12px;
}

.roark-demo-grid-card__fact .roark-expose-field {
    display: inline-flex;
    flex-direction: row-reverse;
    align-items: baseline;
    gap: 4px;
    padding: 5px 9px;
    border-radius: var(--roark-radius-pill, 999px);
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #334155;
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}

.roark-demo-grid-card__fact--reverse .roark-expose-field-label {
    order: 2;
}

.roark-demo-grid-card__fact--reverse .roark-expose-field-value {
    order: 1;
    color: #0f172a;
}

/* Icon-only fact badges (ExposeFieldWidget `label_mode: icon`):
   no label span is rendered, so the `--reverse` row-reverse dance above (which
   exists to flip [label, value] back into reading order) doesn't apply —
   force a plain row so [icon, value] reads left-to-right as-is. */
.roark-demo-grid-card__fact--icon .roark-expose-field,
.roark-demo-list-card__fact--icon .roark-expose-field,
.roark-demo-map-card__fact--icon .roark-expose-field {
    flex-direction: row;
}

/* Agent: photo (left, 2 rows) | name + firma (right, stacked) */
.roark-demo-grid-card__agent .roark-expose-agent {
    display: grid;
    grid-template-columns: 34px 1fr;
    gap: 0 8px;
    align-items: center;
    min-width: 0;
}

/* __title/__logo/__item/__buttons hide, the "firma" line, the firma
   label-hide, and the photo <img> are shared with list/map — see the
   grouped rules above. Only what differs per card stays here. */
.roark-demo-grid-card__agent .roark-expose-agent-photo {
    margin: 0;
    width: 34px;
    height: 34px;
    min-width: 34px;
    border-radius: 50%;
    overflow: hidden;
    text-align: left;
    grid-column: 1;
    grid-row: 1 / 3;
    align-self: center;
}

.roark-demo-grid-card__agent .roark-expose-agent-name {
    margin: 0;
    grid-column: 2;
    grid-row: 1;
    color: #0f172a;
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.roark-demo-grid-card__footer {
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px solid #e2e8f0;
}

/* Stacked to match the list/map card footer fix above:
   agent block full width on its own row, Details button full width below —
   a grid card's column is often narrower than the list/map cards, so the
   old side-by-side 60/40-ish split truncated the name just as badly there.
   `.elementor-row` never matched real markup here (cards render columns as
   direct children of `.elementor-container`, no `.elementor-row` — see
   card-elementor-render-quirk); the rules below target what's actually
   rendered. */
.roark-demo-grid-card__footer .elementor-container {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
}

.roark-demo-grid-card__footer .elementor-column {
    flex: 0 0 auto;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0;
    margin-left: 0;
}

.roark-demo-grid-card__footer .elementor-widget-wrap {
    align-items: stretch;
}

.roark-demo-grid-card__footer .roark-property-button {
    min-height: 44px;
    width: 100%;
}

.roark-demo-grid-card__footer .elementor-column:last-child .elementor-widget-wrap {
    justify-content: stretch;
}

/* Visual styling inherited from the Elementor theme button kit (.elementor-button). */
.roark-demo-grid-card .roark-property-button {
    text-align: center;
}

.roark-demo-grid-card .roark-property-button:focus-visible {
    outline: 2px solid rgba(34, 113, 177, 0.35);
    outline-offset: 2px;
}

/* ── Fact pills: cluster left with even spacing ──────────────────────────────
   Elementor renders each fact in its own equal-flex column, which stretches the
   pills across the full card width. Collapse the columns to content width and let
   them sit next to each other with a small gap (wrapping when space runs out). */
.roark-demo-grid-card__facts > .elementor-container,
.roark-demo-list-card__facts > .elementor-container,
.roark-demo-map-card__facts > .elementor-container {
    flex-wrap: wrap !important;
    justify-content: flex-start !important;
    gap: 6px;
}

.roark-demo-grid-card__facts > .elementor-container > .elementor-column,
.roark-demo-list-card__facts > .elementor-container > .elementor-column,
.roark-demo-map-card__facts > .elementor-container > .elementor-column {
    flex: 0 0 auto !important;
    width: auto !important;
    max-width: none !important;
}

/* Compact footer: the agent widget ships a 20px card padding via Elementor
   post-CSS (CardStylingTrait default) — too airy for a card footer. Kill the
   horizontal padding (the columns pad themselves) and shrink the vertical. */
.roark-demo-grid-card__agent .roark-expose-agent,
.roark-demo-list-card__agent .roark-expose-agent,
.roark-demo-map-card__agent .roark-expose-agent {
    padding: 6px 0 !important;
}

.roark-demo-grid-card__footer,
.roark-demo-list-card__footer,
.roark-demo-map-card__footer {
    padding-top: 5px !important;
}

/* Less dead space under the footer: the body columns carry generous bottom
   padding (16px template value on the list card, Elementor's 10px default
   on the map card). */
.roark-demo-list-card__body-col > .elementor-widget-wrap {
    padding-bottom: 8px !important;
}

.roark-demo-map-card > .elementor-container > .elementor-column > .elementor-widget-wrap > .elementor-inner-section > .elementor-container > .elementor-column:not(.roark-demo-map-card__image-col) > .elementor-widget-wrap {
    padding-bottom: 6px !important;
}

/* Footer row: vertically center each column's content (agent block, Details
   button) — the columns stretch to the tallest one, but Elementor's
   widget-wrap pins content to the top (align-content: flex-start). */
.roark-demo-grid-card__footer > .elementor-container > .elementor-column > .elementor-widget-wrap,
.roark-demo-list-card__footer > .elementor-container > .elementor-column > .elementor-widget-wrap,
.roark-demo-map-card__footer > .elementor-container > .elementor-column > .elementor-widget-wrap {
    align-content: center;
}

/* A fact column whose field resolved to nothing still contributes a flex GAP
   (6px per empty slot), shifting the first pill right and making the spacing
   between pills depend on which facts happen to be empty. Hide empty slots. */
.roark-demo-grid-card__facts > .elementor-container > .elementor-column:not(:has(.roark-expose-field)),
.roark-demo-list-card__facts > .elementor-container > .elementor-column:not(:has(.roark-expose-field)),
.roark-demo-map-card__facts > .elementor-container > .elementor-column:not(:has(.roark-expose-field)) {
    display: none;
}

/* ── Compact, consistent horizontal cards (list + map share the same rules) ──
   Fixed-width image that always crops to fill, plus a tight body. Description
   and feature pills are hidden so every horizontal card is the same compact
   height (and the photo box is therefore always the same size). */
/* Only the TOP-LEVEL image+body row gets the stretch + min-height — not the
   nested facts/footer inner sections (scoping this prevented those from
   inheriting a 180px min-height and blowing the card up). */
.roark-demo-list-card > .elementor-container > .elementor-column > .elementor-widget-wrap > .elementor-inner-section > .elementor-container,
.roark-demo-map-card > .elementor-container > .elementor-column > .elementor-widget-wrap > .elementor-inner-section > .elementor-container {
    align-items: stretch !important;
    min-height: 190px;
}

/* Map card main pic ~25% shorter than the list card */
.roark-demo-map-card > .elementor-container > .elementor-column > .elementor-widget-wrap > .elementor-inner-section > .elementor-container {
    min-height: 142px;
}

/* Map card: body column fills the space next to the fixed-width image */
.roark-demo-map-card__image-col ~ .elementor-column {
    flex: 1 1 auto !important;
    min-width: 0 !important;
}

/* Image always crops to fill its column → consistent size on every card.
   The widget-container is a flex column holding the main image link and an
   optional thumbnail strip below it. */
.roark-demo-list-card__image,
.roark-demo-list-card__image .elementor-widget-container,
.roark-demo-map-card__image,
.roark-demo-map-card__image .elementor-widget-container {
    flex: 1 1 auto !important;
    display: flex !important;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

/* Main image link fills the space above the optional thumbnail strip */
.roark-demo-list-card__image .elementor-widget-container > a,
.roark-demo-map-card__image .elementor-widget-container > a {
    flex: 1 1 auto !important;
    display: flex !important;
    flex-direction: column;
    min-height: 0;
}

.roark-demo-list-card__image img,
.roark-demo-map-card__image img {
    flex: 1 1 auto !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 100% !important;
    object-fit: cover !important;
    display: block;
}

/* When the photo uses a fixed `image_ratio` (not "Auto"), stop stretching the
   widget/container to fill the column height — the ratio-box above already
   governs its own height via `aspect-ratio` and sits at the top of the
   column instead ("no stretching"). The `:has()` scoping
   means "Auto" mode (no ratio-box in the DOM) is completely unaffected. */
.roark-demo-list-card__image:has(.roark-property-image__ratio-box),
.roark-demo-list-card__image .elementor-widget-container:has(.roark-property-image__ratio-box),
.roark-demo-map-card__image:has(.roark-property-image__ratio-box),
.roark-demo-map-card__image .elementor-widget-container:has(.roark-property-image__ratio-box) {
    flex: 0 0 auto !important;
    height: auto !important;
    min-height: 0 !important;
}

/*
 * List card (always) and map card WHEN shown as a horizontal row in the
 * view-switcher's split "list" panel (`.roark-listing-map-view__list` —
 * `ListingWidget::renderListAndMap()` renders that panel's cards from the
 * map card template regardless of the widget's own grid/list layout
 * setting, see resolveMapTemplateId()): the row (image column + body
 * column) is stretched to equal height, but the ratio-box above pins the
 * image to a short, fixed `aspect-ratio` height sitting at the top of the
 * column — whenever the body content is taller, this leaves a white strip
 * below the image inside the card. There the image column has nothing else
 * to show in that gap, so it should fill the full row height instead.
 *
 * This must NOT reach the map card wherever a short, fixed-height photo is
 * actually wanted next to a deliberately narrow column: the map-hero
 * sidebar list (`.roark-map-sidebar-item`, `show_map_sidebar=yes`) and the
 * Leaflet marker popup (`.roark-map-popup-wrapper`, a separate template/
 * class entirely) are intentionally excluded — only the
 * `.roark-listing-map-view__list` split-list wrapper is targeted for the
 * map card. Scoped to widths where the row is still side-by-side (see the
 * `max-width: 767px` stack breakpoint above, where the image reverts to
 * its own fixed top height on mobile).
 */
@media (min-width: 768px) {
    .roark-demo-list-card__image:has(.roark-property-image__ratio-box),
    .roark-demo-list-card__image .elementor-widget-container:has(.roark-property-image__ratio-box) {
        flex: 1 !important;
        height: 100% !important;
        min-height: 300px !important;
    }

    .roark-demo-list-card__image .roark-property-image__ratio-box {
        height: 100%;
        min-height: 300px;
    }

    .roark-demo-list-card__image .roark-property-image__ratio-box[data-roark-ratio] {
        aspect-ratio: auto;
    }

    .roark-demo-list-card__image .roark-property-image__ratio-box img {
        height: 100%;
        min-height: 300px;
        object-fit: cover;
        object-position: center;
    }
}

/*
 * Same fill-height treatment for the map card, but ONLY while it is laid
 * out side-by-side. Unlike the list card (whose only stacking breakpoint
 * is the `max-width: 767px` viewport query above), the map card inside the
 * split "list" panel stacks based on its own CARD width via a container
 * query (`.roark-list-card-wrap { container-type: inline-size }` +
 * `@container (max-width: 559px)` above) — the split panel can leave a
 * narrow card column at some desktop viewport widths too (e.g. 1024px),
 * where the card is already correctly stacked (image on top, governed by
 * its own aspect-ratio) and must NOT be force-filled. Mirroring that same
 * 559/560px threshold as a container query (rather than reusing the
 * viewport media query above) targets exactly the side-by-side case.
 */
@container (min-width: 560px) {
    .roark-listing-map-view__list .roark-demo-map-card__image:has(.roark-property-image__ratio-box),
    .roark-listing-map-view__list .roark-demo-map-card__image .elementor-widget-container:has(.roark-property-image__ratio-box) {
        flex: 1 !important;
        height: 100% !important;
        min-height: 300px !important;
    }

    .roark-listing-map-view__list .roark-demo-map-card__image .roark-property-image__ratio-box {
        height: 100%;
        min-height: 300px;
    }

    .roark-listing-map-view__list .roark-demo-map-card__image .roark-property-image__ratio-box[data-roark-ratio] {
        aspect-ratio: auto;
    }

    .roark-listing-map-view__list .roark-demo-map-card__image .roark-property-image__ratio-box img {
        height: 100%;
        min-height: 300px;
        object-fit: cover;
        object-position: center;
    }
}

/* ── Thumbnail strip (main photo + up to 3 extras below) ─────────────────── */
.roark-property-image__thumbs {
    flex: 0 0 auto;
    display: flex;
    gap: 4px;
    margin-top: 4px;
    height: 62px;
}

.roark-property-image__thumb {
    position: relative;
    flex: 1 1 0;
    min-width: 0;
    display: block;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 6px;
    overflow: hidden;
    transition: opacity 0.15s ease;
}

.roark-property-image__thumb:hover {
    opacity: 0.9;
}

.roark-property-image__more {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.58);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 700;
}

/* Feature pills sit where the description used to: compact
   icon chips built from Ausstattung, capped to a handful of items per card via
   ExposeFeaturesWidget's `max_items` control (see the demo card templates). */
.roark-demo-card__features {
    margin-top: 2px;
}

/* Card description excerpt (3 lines, muted) — kept for pages that still use
   PropertyDescriptionWidget on a card manually; the demo templates no longer
   place it. */
.roark-demo-list-card .roark-property-description,
.roark-demo-map-card .roark-property-description,
.roark-demo-grid-card .roark-property-description {
    margin: 0;
    color: #64748b;
    font-size: 0.875rem;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Card photo width (matches the shared horizontal image width var), capped to
   42% of the card row so the text column keeps >= ~58% even when the card sits
   in a narrow split-view column (container capped by the Design tab). */
.roark-demo-list-card__image-col {
    flex: 0 0 min(var(--roark-card-h-image-width, 400px), 42%) !important;
    max-width: min(var(--roark-card-h-image-width, 400px), 42%) !important;
}

@container (min-width: 560px) {
    .roark-list-card-wrap .roark-demo-map-card__image-col {
        flex: 0 0 min(var(--roark-card-h-image-width, 400px), 42%) !important;
        max-width: min(var(--roark-card-h-image-width, 400px), 42%) !important;
    }
}

/* Tight body padding */
.roark-demo-list-card__body-col,
.roark-demo-map-card__image-col ~ .elementor-column {
    padding: 12px 14px !important;
}

/* Map + list card: compress body spacing + description so the card (and main pic)
   is ~25% shorter on desktop. The image stretches to the card height, which is
   driven by the body content — so trimming the body shrinks the picture. */
.roark-demo-map-card__image-col ~ .elementor-column .elementor-widget:not(:last-child),
.roark-demo-list-card__body-col .elementor-widget:not(:last-child) {
    margin-bottom: 6px !important;
}

.roark-demo-map-card .roark-property-description,
.roark-demo-list-card .roark-property-description {
    -webkit-line-clamp: 4;
}

@media (max-width: 767px) {
    /* On mobile, stack list card vertically (image on top, body below).
       Scoped to the TOP-LEVEL image|body row — nested inner sections
       (facts, footer) keep their row layout. */
    .roark-demo-list-card > .elementor-container > .elementor-column > .elementor-widget-wrap > .elementor-inner-section > .elementor-container {
        flex-direction: column !important;
        min-height: 0;
    }

    .roark-demo-list-card__image-col,
    .roark-demo-list-card__body-col {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 auto !important;
    }

    .roark-demo-list-card__image img {
        min-height: 200px;
        height: 220px;
        flex: none;
    }

    /* Ratio-box images stay governed by their own aspect-ratio, even on
       mobile (higher specificity than the fixed-height rule above) — same
       override for list and map cards, grouped together. */
    .roark-demo-list-card__image .roark-property-image__ratio-box img,
    .roark-demo-map-card__image .roark-property-image__ratio-box img {
        height: 100%;
        min-height: 0;
    }

    /* Map card stacks on mobile like the list card: full-width photo on top,
       body below (a 40%-wide side photo is too small on a phone). Only the
       top-level image|body row stacks — nested sections (facts, footer)
       keep their row layout. */
    .roark-demo-map-card > .elementor-container > .elementor-column > .elementor-widget-wrap > .elementor-inner-section > .elementor-container {
        flex-direction: column !important;
        min-height: 0;
    }

    .roark-demo-map-card > .elementor-container > .elementor-column > .elementor-widget-wrap > .elementor-inner-section > .elementor-container > .elementor-column,
    .roark-demo-map-card__image-col {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 auto !important;
    }

    .roark-demo-map-card__image img {
        height: 200px;
        min-height: 0;
        flex: none;
    }

    /* Ratio-box override: shared with list card above. */

    .roark-demo-list-card .roark-property-title {
        font-size: 1.05rem;
    }

    .roark-demo-list-card .roark-property-price {
        font-size: 1.2rem;
    }

    .roark-demo-map-card .roark-property-title {
        font-size: 0.88rem;
    }

    .roark-demo-map-card .roark-property-price {
        font-size: 1rem;
    }

    .roark-demo-grid-card .roark-property-title {
        font-size: 1.02rem;
    }

    .roark-demo-grid-card .roark-property-price {
        font-size: 1.1rem;
    }

    .roark-demo-grid-card__agent .roark-expose-agent-photo {
        width: 30px;
        height: 30px;
        min-width: 30px;
    }

    .roark-demo-grid-card__agent .roark-expose-agent-name {
        font-size: 0.9rem;
    }

    .roark-demo-grid-card__badge {
        top: 12px;
        left: 12px;
    }

    .roark-demo-grid-card__fact .roark-expose-field {
        font-size: 0.78rem;
    }

    .roark-demo-grid-card__footer {
        margin-top: auto;
        padding-top: 8px;
    }
}

/* =============================================
   FILTER FORM  — shared
   ============================================= */
.roark-filter-form {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.roark-filter-column {
    flex-direction: column;
    align-items: stretch;
}

/* column layout inputs */
.roark-filter-column input,
.roark-filter-column select {
    padding: 8px 12px;
    width: 100%;
    min-height: 40px;
    box-sizing: border-box;
}

.roark-filter-column .roark-filter-submit,
.roark-filter-column .roark-filter-reset {
    min-height: 40px;
}

.roark-filter-column .roark-filter-reset {
    text-decoration: none;
}

.roark-filter-reset {
    display: inline-flex;
    align-items: center;
}

/* =============================================
   FILTER BAR (ROW / pill-based layout)
   ============================================= */
.roark-filter-row {
    display: block;
    margin-bottom: 20px;
}

/* Full-width modifier: stretch the filter bar to fill its container */
.roark-filter-form--full-width {
    width: 95vw;
    max-width: 95vw;
    margin-left: calc(50% - 47.5vw);
    margin-right: calc(50% - 47.5vw);
    box-sizing: border-box;
    overflow: visible;
}

.roark-filter-form--full-width .roark-filter-bar {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: visible;
}

.roark-filter-form--full-width.roark-filter-column {
    align-items: stretch;
}

/* Utility: visually-hidden class for radio inputs */
.roark-filter-row .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* ─── Bar shell ─────────────────────────────── */
/* `flex-wrap: wrap` (content-driven, no hardcoded breakpoint): how much
   width the pills + location need before the reset/sort/view/Suchen group
   (`.roark-filter-bar__tail`) runs out of room varies by page — a card with
   its own side padding (e.g. the roark-home structured filter section)
   leaves less room at the same viewport width than a full-width section
   (e.g. /immobilien/) — so a fixed max-width breakpoint here previously
   fit one context and silently overflowed the other (Suchen clipped by the
   theme's `overflow-x: clip` wrapper). Letting the row wrap lets the
   browser decide per actual available width instead. Mobile (`.is-open`
   grid / collapsed `:not(.is-open)` nowrap below) overrides this. */
.roark-filter-bar {
    display: flex;
    align-items: stretch;
    flex-wrap: wrap;
    row-gap: 8px;
    gap: 0;
    border-radius: var(--roark-radius-pill, 999px);
    padding: 4px 6px;
    overflow: visible;
    scrollbar-width: none;
    position: relative;
    min-height: 52px;
}

/* Reset/sort/view/Suchen as one unit (see the `.roark-filter-bar__tail`
   wrapper in FilterWidget.php): `margin-left: auto` pushes it to the row's
   right edge whether it's sharing row 1 with the pills (same job the
   `.roark-filter-bar__flex` spacer does) or has wrapped onto a row of its
   own (nothing else on that row to push against, so the auto margin eats
   the whole row and shoves the group flush right — no `justify-content`
   trick or forced `flex-basis: 100%` needed). */
.roark-filter-bar__tail {
    display: flex;
    align-items: center;
    flex-shrink: 1;
    min-width: 0;
    max-width: 100%;
    margin-left: auto;
}

.roark-filter-bar::-webkit-scrollbar { display: none; }

/* Divider between location and pills */
.roark-filter-bar__divider {
    width: 1px;
    background: #e5e7eb;
    flex-shrink: 0;
    margin: 6px 4px;
    align-self: stretch;
}

/* Flex spacer to push end controls to the right */
.roark-filter-bar__flex {
    flex: 1;
    min-width: 8px;
}

/* ─── Location area ──────────────────────────── */
.roark-filter-location-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 12px 0 14px;
    /* The Google Places web component that replaces the plain input on focus
       (see google-places.js) renders itself from a *closed* shadow root and
       picks its own Material palette from the inherited `color-scheme` — on a
       visitor whose OS/browser is in dark mode that turned the whole location
       box black inside our otherwise white bar. The bar is a fixed light
       design, so pin the scheme here instead of letting the component follow
       the visitor's preference. */
    color-scheme: light;
    /* min-width keeps the text input inside from dropping under its own
       placeholder's rendered width (was 240, too tight — see
       .roark-filter-location-input). max-width capped at 300 (was 520,
       effectively unbounded): with the input itself no longer flex-growing
       either (see below), letting the *pill* keep growing past what its
       own content needs just stretched it into empty space on a wrapped
       row 1 (pills left, an oversized, mostly-blank location box filling
       the rest) instead of leaving that space for `.roark-filter-bar__tail`
       to claim via its own `margin-left: auto`. */
    flex: 1 1 280px;
    min-width: 260px;
    max-width: 300px;
}

.roark-filter-location-pill svg {
    color: #6b7280;
    flex-shrink: 0;
}

.roark-filter-location-input {
    border: none !important;
    outline: none !important;
    background: transparent !important;
    padding: 0 !important;
    font-size: 0.9rem;
    color: #111827;
    /* flex-basis 0 + grow:1 (desktop overrides to grow:0 below, ≥768px):
       on mobile the pill is already `width: 100%` (its own rule further
       down), so growing to fill it is exactly the wanted full-width field;
       basis 0 shares that growth/shrink fairly with the radius <select>
       instead of this field alone absorbing the pill's shrinkage (which
       used to crush it under its own placeholder's width — see the
       ≥768px comment below for why it's capped there instead). */
    flex: 1 1 0%;
    width: auto;
    min-width: 70px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    box-shadow: none !important;
    height: 100%;
    margin: 0;
    border-radius: 0;
}

.roark-filter-location-input::placeholder { color: #9ca3af; }

/* Modern Google Places web component (google.maps.places.PlaceAutocompleteElement),
   inserted next to the plain text input once Maps JS has loaded — see
   google-places.js. The original input stays in the DOM (hidden) as the field
   that actually submits. Sizing/border/font matched to the input it replaces;
   the custom properties are the CSS part API the element itself exposes. */
.roark-places-autocomplete-el {
    display: block;
    width: auto;
    flex: 1 1 0%;
    min-width: 70px;
    /* Two generations of theming tokens, both kept on purpose: `--gmpx-*` is
       the Extended Component Library naming that older PlaceAutocompleteElement
       builds read, `--gmp-mat-*` is what the current `weekly` build reads.
       Both are best-effort: nothing else can reach the component, its shadow
       root is closed and it exports no parts, so these tokens are the only
       offer we can make it — the current build takes the font ones and
       ignores the colour ones. */
    --gmpx-font-family-base: inherit;
    --gmpx-font-size-base: 0.9rem;
    --gmpx-color-on-surface: #111827;
    --gmpx-color-on-surface-variant: #9ca3af;
    --gmp-mat-color-on-surface: #111827;
    --gmp-mat-color-on-surface-variant: #9ca3af;
    --gmp-mat-color-outline: transparent;
}

.roark-filter-location-pill .roark-places-autocomplete-el {
    height: 100%;
    /* The decisive one: the component sets `color-scheme: light dark` on its
       own host, which beats the `color-scheme: light` inherited from the pill
       (a direct declaration always wins over an inherited value) — measured
       in Chrome against the live `weekly` build, where the field still came
       out black in a dark-mode browser until this rule existed. A plain
       (non-`!important`) declaration is enough: document styles outrank the
       component's internal `:host` rule.

       The `--gmp-mat-*` tokens below are best-effort — this build ignores
       them and keeps drawing its own outlined Material field, whose surface
       and border are unreachable from outside (closed shadow root, no
       exported parts). Forcing the light scheme is what actually keeps the
       box readable inside the white bar. */
    color-scheme: light;
    /* Hard cap so the component's own intrinsic height can never grow the
       pill (and with it the whole bar) the moment it swaps in for the plain
       input — that vertical growth is what made the filter row visibly jump
       on first focus. 44px = the bar's 52px min-height minus its 4px×2
       padding, i.e. exactly what the plain input renders at via `height:
       100%`, so the swap is a no-op for layout. */
    max-height: 44px;
    box-sizing: border-box;
    --gmpx-color-surface: transparent;
    --gmp-mat-color-surface: transparent;
    --gmp-mat-color-surface-container-low: transparent;
}

.roark-filter-column .roark-places-autocomplete-el {
    min-height: 40px;
}

/* Desktop only: stop growing past what the placeholder actually needs.
   flex-grow: 1 (mobile default above, on both the plain input and its
   Google Places replacement) used to fill the *pill's* entire available
   width — harmless full-width on mobile, but on desktop, once
   `.roark-filter-bar__tail` wraps onto its own row (see there), row 1 had
   nothing else to claim the leftover space, so this field ballooned past
   300px around a ~20-char placeholder that only needs ~126px. flex-basis
   150px covers the full "PLZ, Ort oder Straße" with room to spare;
   flex-shrink stays 1 (ellipsis above as a fallback) so it still gives up
   room gracefully when the pill itself is squeezed. Declared after both
   base rules above so it wins the source-order tie at equal specificity. */
@media (min-width: 768px) {
    .roark-filter-location-input {
        flex: 0 1 150px;
    }

    .roark-places-autocomplete-el {
        flex: 0 1 150px;
    }
}

.roark-places-autocomplete-el-hidden-input {
    display: none !important;
}

.roark-filter-location-input--postcode {
    max-width: 64px;
    flex-shrink: 0;
}

.roark-filter-location-input--city {
    flex: 1;
}

/* Umkreis (radius) select inside the location pill: a quiet inline control with
   a custom caret, separated from the location input by a thin divider.
   Allowed to shrink (was flex-shrink:0, a fixed ~115px that forced the text
   input next to it to eat the entire row's squeeze — see
   .roark-filter-location-input above) so the free-text field always keeps
   priority; the ellipsis keeps a squeezed "Genauer Ort" legible rather than
   hard-clipped. */
.roark-geo-radius {
    flex: 0 1 auto;
    min-width: 44px;
    max-width: 140px;
    margin-left: 6px;
    padding: 5px 26px 5px 10px;
    border: none;
    border-left: 1px solid #e5e7eb;
    border-radius: 0;
    background-color: transparent;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%236b7280'%3E%3Cpath fill-rule='evenodd' d='M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z' clip-rule='evenodd'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 6px center;
    background-size: 14px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    font-size: 0.85rem;
    font-weight: 500;
    color: #4b5563;
    cursor: pointer;
    outline: none;
    box-shadow: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.roark-filter-location-pill .roark-geo-radius.roark-geo-radius {
    width: auto;
    height: auto;
    margin-top: 0;
    margin-bottom: 0;
}

.roark-geo-radius:hover,
.roark-geo-radius:focus {
    color: #111827;
}

/* ─── Pill wrap + pill button ────────────────── */
.roark-filter-pill-wrap {
    position: relative;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.roark-filter-pill-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    background: transparent;
    border: none;
    border-radius: var(--roark-radius-pill, 999px);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
    line-height: 1.3;
    transition: background .15s, color .15s;
    height: 100%;
}

/* Theme-hardening: themes style bare `button`/`.wp-element-button`; pin the
   properties that break the bar. (0,2,0), placed before the state rules so
   those (and Elementor Style controls) still win. */
.roark-filter-pill-wrap .roark-filter-pill-btn {
    width: auto;
    min-width: 0;
    margin: 0;
    color: #111827;
    font-family: inherit;
    text-transform: var(--roark-btn-transform, none);
    letter-spacing: var(--roark-btn-letter-spacing, normal);
    text-shadow: none;
    box-shadow: none;
    background-color: transparent;
    border: 0;
    padding: 6px 14px;
}

.roark-filter-pill-wrap--active .roark-filter-pill-btn {
    font-weight: 600;
    color: #111827;
    background: #f3f4f6;
    outline: 2px solid #111827;
    outline-offset: -2px;
}

.roark-filter-pill-btn__caret {
    opacity: .55;
    transition: transform .2s;
    flex-shrink: 0;
}

.roark-filter-pill-wrap.is-open .roark-filter-pill-btn__caret {
    transform: rotate(180deg);
    opacity: .8;
}

/* ─── Dropdown panel ─────────────────────────── */
.roark-filter-panel {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    border-radius: var(--roark-radius-card, 18px);
    padding: 18px 20px 16px;
    z-index: 9999;
    min-width: 280px;
    max-width: min(380px, calc(100vw - 16px));
    animation: ewfPanelIn .15s ease;
}

/* Panels on the right side of the bar shift left */
.roark-filter-bar__end .roark-filter-pill-wrap .roark-filter-panel,
.roark-filter-pill-wrap:last-child .roark-filter-panel {
    left: auto;
    right: 0;
    transform: none;
}

/* Compact range panel */
.roark-filter-panel--range {
    min-width: 260px;
    max-width: 320px;
}

/* Second (rent) price group in the Preis panel — same separation rhythm as
   .roark-filter-panel__section below, so "Miete ab" doesn't sit flush under
   the buy-price fields above it (was 0px; ref: other section titles get
   29px above / 10px below via this same margin/padding/border combo). */
.roark-filter-price-group + .roark-filter-price-group {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #f3f4f6;
}

@keyframes ewfPanelIn {
    from { opacity: 0; transform: translateX(-50%) translateY(-6px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.roark-filter-panel[aria-hidden="true"] {
    display: none;
}

/* ─── Panel internals ────────────────────────── */
.roark-filter-panel__section {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #f3f4f6;
}

.roark-filter-panel__section:first-child,
/* Same reset when the section instead follows a panel-level heading (the
   Ausstattung & Merkmale panel: overarching title, then its first
   sub-section) — otherwise that first section rendered its own separator
   line directly under the heading, on top of the panel's usual title
   spacing. */
.roark-filter-panel__section-title + .roark-filter-panel__section {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.roark-filter-panel__section-title {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #6b7280;
    margin: 0 0 10px;
}

/* ─── Type icon grid ─────────────────────────── */
.roark-filter-type-grid {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.roark-filter-type-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 10px 14px;
    border-radius: var(--roark-radius-btn, 12px);
    border: 2px solid #e5e7eb;
    background: #f9fafb;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    color: #374151;
    flex: 1;
    min-width: 72px;
    text-align: center;
    transition: border-color .15s, background .15s, color .15s;
}

.roark-filter-type-btn:hover {
    border-color: #9ca3af;
    background: #f3f4f6;
}

.roark-filter-type-btn.is-active {
    border-color: var(--roark-filter-accent);
    background: var(--roark-filter-accent);
    color: var(--roark-filter-accent-contrast);
}

.roark-filter-type-btn.is-active svg {
    stroke: currentColor;
}

/* ─── Object art list ────────────────────────── */
.roark-filter-object-art-search {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #e5e7eb;
    border-radius: var(--roark-radius-input, 6px);
    padding: 7px 10px;
    font-size: 0.85rem;
    color: #374151;
    background: #f9fafb;
    margin-bottom: 8px;
    outline: none;
}

.roark-filter-object-art-search:focus {
    border-color: #9ca3af;
    background: #fff;
}

/* ─── Wohnen / Gewerbe purpose tabs ─── */
.roark-filter-purpose-tabs-wrap {
    padding-bottom: 0 !important;
    border-top: none !important;
    margin-top: 0 !important;
}

.roark-filter-purpose-tabs {
    display: flex;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 10px;
}

/* Theme-hardening (0,3,0): themes and Elementor kits style bare `button`
   incl. :hover/:focus (`.elementor-kit-N button:hover` is 0,2,1) — fill colour,
   white text, radius, min-width, big padding. These are plain underline tabs,
   so every such property is pinned, in all states. */
.roark-filter-purpose-tabs .roark-filter-purpose-tab.roark-filter-purpose-tab {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    height: auto;
    min-height: 0;
    margin: 0 0 -1px;
    padding: 8px 12px;
    font-family: inherit;
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.4;
    text-transform: var(--roark-btn-transform, none);
    letter-spacing: var(--roark-btn-letter-spacing, normal);
    text-shadow: none;
    text-decoration: none;
    border: none;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    background: none;
    box-shadow: none;
    outline: none;
    cursor: pointer;
    color: #6b7280;
    transition: color .15s, border-color .15s;
    /* Wraps: a theme's uppercase + letter-spacing makes "Gewerbe & Sonstiges"
       wider than half the panel. */
    white-space: normal;
    overflow-wrap: break-word;
    text-align: center;
}

.roark-filter-purpose-tabs .roark-filter-purpose-tab.roark-filter-purpose-tab:hover,
.roark-filter-purpose-tabs .roark-filter-purpose-tab.roark-filter-purpose-tab:focus,
.roark-filter-purpose-tabs .roark-filter-purpose-tab.roark-filter-purpose-tab:active {
    background: none;
    box-shadow: none;
    color: #374151;
}

.roark-filter-purpose-tabs .roark-filter-purpose-tab.roark-filter-purpose-tab:focus-visible {
    outline: 2px solid #111827;
    outline-offset: -2px;
}

.roark-filter-purpose-tabs .roark-filter-purpose-tab.roark-filter-purpose-tab.is-active {
    color: #111827;
    border-bottom-color: #111827;
    font-weight: 600;
}

.roark-filter-object-art-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
    max-height: 210px;
    overflow-y: auto;
}

.roark-filter-object-art-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: var(--roark-radius-input, 8px);
    cursor: pointer;
    font-size: 0.875rem;
    color: #374151;
    transition: background .1s;
}

.roark-filter-object-art-option:hover {
    background: #f3f4f6;
}

.roark-filter-object-art-option.is-active {
    background: #f0fdf4;
    color: #166534;
    font-weight: 600;
}

.roark-filter-object-art-option input[type="radio"],
.roark-filter-object-art-option input[type="checkbox"] {
    accent-color: #166534;
    flex-shrink: 0;
}

/* ─── Subtype section (category-dependent) ───── */

.roark-filter-subtype-group.roark-filter-object-art-list {
    max-height: 230px;
}

/* ─── Feature / equipment checkboxes (2-column grid) ─── */
.roark-filter-feature-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-height: none;
}

/* ─── Range inputs ───────────────────────────── */
.roark-filter-range-row {
    display: flex;
    align-items: flex-end;
    gap: 10px;
}

.roark-filter-range-sep {
    font-size: 1.1rem;
    color: #9ca3af;
    padding-bottom: 8px;
    flex-shrink: 0;
}

.roark-filter-range-field {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.roark-filter-range-label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #9ca3af;
}

.roark-filter-range-input {
    width: 100%;
    box-sizing: border-box;
    border: 2px solid #e5e7eb;
    border-radius: var(--roark-radius-input, 6px);
    padding: 8px 10px;
    font-size: 0.9rem;
    color: #111827;
    background: #f9fafb;
    outline: none;
    transition: border-color .15s, background .15s;
    -moz-appearance: textfield;
}

.roark-filter-range-input::-webkit-inner-spin-button,
.roark-filter-range-input::-webkit-outer-spin-button { -webkit-appearance: none; }

.roark-filter-range-input:focus {
    border-color: #6b7280;
    background: #fff;
}

/* ─── Stepper row ────────────────────────────── */
.roark-filter-stepper-row {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.roark-filter-stepper-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 13px;
    border-radius: var(--roark-radius-pill, 999px);
    border: 2px solid #e5e7eb;
    background: #f9fafb;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    color: #374151;
    white-space: nowrap;
    transition: border-color .15s, background .15s, color .15s;
}

.roark-filter-stepper-btn:hover {
    border-color: #9ca3af;
    background: #f3f4f6;
}

.roark-filter-stepper-btn.is-active {
    border-color: #111827;
    background: #111827;
    color: #fff;
}

/* ─── Right-side controls ────────────────────── */
.roark-filter-bar__end {
    display: flex;
    align-items: center;
    gap: 4px;
    padding-left: 4px;
    flex-shrink: 0;
}

.roark-filter-reset-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: #6b7280;
    cursor: pointer;
    text-decoration: none;
    transition: background .15s, color .15s;
    flex-shrink: 0;
}

.roark-filter-reset-btn:hover {
    background: #f3f4f6;
    color: #111827;
}

/* Icon-only everywhere by default (desktop circular button, collapsed mobile
   toolbar); revealed as an icon+text pill only on the mobile expanded
   toolbar row (see the ≤767px `.is-open` rules). */
.roark-filter-reset-btn__label {
    display: none;
}

.roark-filter-sort-select {
    border: 1px solid #e5e7eb;
    border-radius: var(--roark-radius-input, 6px);
    padding: 5px 8px;
    font-size: 0.8rem;
    color: #374151;
    background: #f9fafb;
    cursor: pointer;
    outline: none;
    flex-shrink: 0;
    max-width: 140px;
}

.roark-filter-sort-select:focus {
    border-color: #9ca3af;
}

/* View buttons in bar */
.roark-filter-view-buttons {
    display: flex;
    gap: 2px;
    align-items: center;
    margin: 0;
    padding: 0;
    flex-shrink: 0;
}

.roark-filter-view-buttons .roark-view-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--roark-radius-btn, 8px);
    padding: 0;
    color: #6b7280;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: background .15s, color .15s;
}

.roark-filter-view-buttons .roark-view-tab:hover {
    background: #f3f4f6;
    color: #374151;
}

.roark-filter-view-buttons .roark-view-tab.is-active {
    background: var(--roark-filter-accent);
    color: var(--roark-filter-accent-contrast);
}

.roark-filter-view-buttons .roark-view-tab.is-active:hover,
.roark-filter-view-buttons .roark-view-tab.is-active:focus,
.roark-filter-view-buttons .roark-view-tab.is-active:focus-visible {
    background: var(--roark-filter-accent);
    color: var(--roark-filter-accent-contrast);
}

/* ─── Submit button ──────────────────────────── */
/* Uses --roark-btn-bg/-fg (theme fallback chain, see roark-tokens.css), not the
   plain --roark-filter-accent used by pills/view-tabs — this is the one
   "primary button" in the bar meant to pick up the site's own button
   design. No `.elementor-button` class on this one (see markup), so no
   Elementor-default fight / class-doubling needed here. */
.roark-filter-submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    background: var(--roark-btn-bg);
    color: var(--roark-btn-fg);
    border: 1px solid transparent;
    border-radius: var(--roark-radius-pill, 999px);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background .15s, transform .1s;
    align-self: center;
    /* Small breathing room from the view/map layout switcher */
    margin-left: 8px;
}

/* Theme-hardening (0,2,0): themes set width:100%/min-width/height/margin/
   text-transform on bare buttons and `.wp-element-button`. Geometry is locked
   with !important so the bar never wraps; colours stay overridable. */
.roark-filter-submit-btn.roark-filter-submit-btn {
    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: auto !important;
    flex: 0 0 auto;
    margin: 0 0 0 8px;
    line-height: 1.6;
    font-family: inherit;
    text-transform: var(--roark-btn-transform, none);
    letter-spacing: var(--roark-btn-letter-spacing, normal);
    text-shadow: none;
    box-shadow: none;
    padding: 10px 20px;
}

/* View/map layout tabs. */
.roark-filter-view-buttons .roark-view-tab.roark-view-tab {
    min-width: 0;
    min-height: 0;
    margin: 0;
    box-shadow: none;
    text-transform: var(--roark-btn-transform, none);
    letter-spacing: var(--roark-btn-letter-spacing, normal);
    line-height: 1;
}

/* Inputs / selects inside the filter: themes stretch them (width:100%, height, margin). */
.roark-filter-form .roark-filter-range-input.roark-filter-range-input {
    width: 100%;
    height: auto;
    margin: 0;
    box-shadow: none;
    border-radius: var(--roark-radius-input, 6px);
    padding: 8px 10px;
}

.roark-filter-form .roark-filter-sort-select.roark-filter-sort-select {
    width: auto;
    max-width: 140px;
    height: auto;
    margin: 0;
    box-shadow: none;
    border-radius: var(--roark-radius-input, 6px);
    padding: 5px 8px;
}

.roark-filter-submit-btn:hover {
    background: var(--roark-btn-bg-hover);
    color: var(--roark-btn-fg);
    text-decoration: none;
    transform: translateY(-1px);
}

.roark-filter-submit-btn:active {
    background: var(--roark-btn-bg-hover);
    color: var(--roark-btn-fg);
    transform: translateY(0);
}

.roark-filter-submit-btn:focus,
.roark-filter-submit-btn:focus-visible {
    color: var(--roark-btn-fg);
    text-decoration: none;
}

/* ─── Responsive ─────────────────────────────── */
@media (max-width: 767px) {
    .roark-filter-bar {
        border-radius: var(--roark-radius-card, 18px);
        flex-wrap: wrap;
        overflow: visible;
        padding: 6px 8px;
        gap: 4px;
    }

    .roark-filter-bar__divider { display: none; }
    .roark-filter-bar__flex { display: none; }

    .roark-filter-location-pill {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        padding: 6px 10px;
        border-bottom: 1px solid #f3f4f6;
    }

    .roark-filter-pill-wrap .roark-filter-pill-btn {
        padding: 6px 10px;
        font-size: 0.82rem;
    }

    .roark-filter-bar__end {
        width: 100%;
        justify-content: flex-end;
        padding: 4px 2px 2px;
        border-top: 1px solid #f3f4f6;
    }

    .roark-filter-submit-btn {
        width: 100%;
        justify-content: center;
        border-radius: var(--roark-radius-btn, 12px);
        padding: 11px 16px;
        order: 99;
        margin-top: 4px;
    }

    .roark-filter-submit-btn.roark-filter-submit-btn {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 auto;
        padding: 11px 16px;
        margin: 4px 0 0;
        border-radius: var(--roark-radius-btn, 12px);
    }

    .roark-filter-submit-btn__text { display: block; }

    .roark-filter-panel {
        left: 0;
        right: 0;
        transform: none;
        max-width: 100%;
        min-width: 0;
        border-radius: var(--roark-radius-card, 14px);
    }

    /* Open panel spans the whole filter bar (not just its half-width grid
       cell). The wrap drops its positioning so the bar is the containing
       block; `top:auto` keeps the panel at its static position, i.e.
       directly below the clicked pill. Specificity beats the desktop
       `:last-child` / `__end` right-anchor rules. */
    .roark-filter-bar {
        position: relative;
    }

    .roark-filter-bar .roark-filter-pill-wrap {
        position: static;
        min-width: 0;
    }

    .roark-filter-bar .roark-filter-pill-wrap .roark-filter-panel {
        position: absolute;
        top: auto;
        left: 8px;
        right: 8px;
        width: auto;
        min-width: 0;
        max-width: none;
        margin-top: 8px;
        transform: none;
        box-sizing: border-box;
        overflow-x: hidden;
        animation: ewfPanelInMobile .15s ease;
    }

    .roark-filter-purpose-tabs .roark-filter-purpose-tab.roark-filter-purpose-tab {
        min-width: 0;
        white-space: normal;
        padding: 8px 6px;
    }
}

@keyframes ewfPanelInMobile {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Desktop/tablet (>=768px; mobile has its own `.is-open` grid / collapsed
   nowrap below): when `.roark-filter-bar__tail` (reset/sort/view/Suchen)
   doesn't fit next to the pills + location, it wraps as a whole onto its
   own row — see the base `.roark-filter-bar { flex-wrap: wrap; row-gap:
   8px }` and `.roark-filter-bar__tail { margin-left: auto }` rules above.
   `row-gap` only ever applies *between* wrapped lines, so it adds the 8px
   breathing room above a wrapped tail without pushing it down out of
   alignment on the (far more common) single-line layout — no
   width-specific rule needed here at all. */
@media (min-width: 1025px) {
    .roark-filter-submit-btn__text { display: block; }
}

/* =============================================
   VIEW SWITCHER (standalone / column layout)
   ============================================= */
.roark-view-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    align-items: center;
    flex-wrap: wrap;
}

/* column layout view buttons */
.roark-filter-column .roark-filter-view-buttons {
    display: flex;
    gap: 4px;
    align-items: center;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
}

.roark-filter-column .roark-view-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 6px 12px;
    line-height: 1.2;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    font-size: 0.95em;
}


/* Hide the inactive panel */
.roark-view-panel--hidden {
    display: none !important;
}

/* Map layout: cards left, map right */
.roark-listing-map-view {
    display: flex;
    gap: 0;
    align-items: stretch;
    width: 100%;
    /* `overflow: hidden` here would make this row a scroll container and
       break `position: sticky` on the map column below — the row must
       stay `visible` on desktop for the sticky map to work. Mobile resets
       this back to a plain stacked layout (see the 900px breakpoint). */
    overflow: visible;
    position: relative;
}

.roark-listing-map-view__list {
    flex: 1 1 50%;
    min-width: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0 16px 16px;
}

.roark-listing-map-view__map {
    flex: 1 1 50%;
    min-width: 320px;
    /* Sticks while the card list (taller, normal document flow) scrolls
       past it, and fills the remaining viewport height instead of the
       widget's fixed `map_height` setting. */
    position: sticky;
    top: var(--roark-map-top, 90px);
    height: calc(100vh - var(--roark-map-top, 90px) - 16px);
    min-height: 400px;
}

.roark-listing-map-view__map .roark-listing-map {
    height: 100% !important;
    min-height: 0;
    border-radius: 0;
}

/* Standalone "Map" tab panel (view switcher, no split sidebar): same
   fill-the-viewport rule as the split view's map column, minus the
   sticky positioning (there is no independent scrolling sibling here —
   the whole panel is the map). Overrides the widget's inline
   `style="height: {map_height}px"`. Desktop only — mobile keeps the
   widget's configured `map_height` as before. */
@media (min-width: 901px) {
    .roark-view-panel[data-panel="map"] > .roark-listing-map,
    .roark-view-panel[data-panel="map"] > .roark-map-split {
        height: calc(100vh - var(--roark-map-top, 90px) - 16px) !important;
        min-height: 400px;
    }
}

/* Count badge overlaid on the map (map view only) */
.roark-listing-count--map {
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    margin: 0;
    padding: 8px 18px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--roark-radius-pill, 999px);
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.18);
    font-size: 1rem;
    font-weight: 700;
    color: #334155;
    white-space: nowrap;
    pointer-events: none;
}

.roark-listing-map-view .roark-list {
    gap: 16px;
}

.roark-listing-map-view .roark-list > :not(style, script, link, template) {
    width: 100%;
}

/* =============================================
   MAP HERO LISTING PAGE
   ============================================= */

/**
 * Sticky, frosted-glass filter bar that floats above the full-height map.
 * Applied via css_classes on the Elementor section.
 */
.roark-demo-map-hero-filter {
    position: sticky !important;
    top: 0 !important;
    z-index: 100 !important;
    background: rgba(255, 255, 255, 0.96) !important;
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    box-shadow: 0 2px 18px rgba(15, 23, 42, 0.10) !important;
}

.roark-demo-map-hero-filter .roark-filter-form {
    margin-bottom: 0;
}

/**
 * Section wrapper for the full-height map + list sidebar.
 * Applied via css_classes on the Elementor section.
 */
.roark-demo-map-hero-section {
    padding: 0 !important;
}

.roark-demo-map-hero-section > .elementor-container,
.roark-demo-map-hero-section > .e-con-inner {
    max-width: 100% !important;
    padding: 0 !important;
}

.roark-demo-map-hero-section .elementor-column-gap-default > .elementor-column > .elementor-element-populated {
    padding: 0 !important;
}

/* Remove side-padding from the full-width listing shell */
.roark-demo-map-hero-section .roark-listing-shell--full {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Total height counter-of-filter-bar ~72 px */
.roark-demo-map-hero-section .roark-map-split {
    height: calc(100vh - 72px) !important;
    min-height: 520px;
    border: none !important;
    border-radius: 0 !important;
}

/* Greyscale / muted map tiles for the hero page */
.roark-demo-map-hero-section .leaflet-tile-pane {
    filter: grayscale(0.82) brightness(1.06) contrast(0.94);
    transition: filter 0.4s ease;
}

/* Frosted-glass property sidebar */
.roark-demo-map-hero-section .roark-map-sidebar {
    background: rgba(255, 255, 255, 0.94) !important;
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    box-shadow: 4px 0 24px rgba(15, 23, 42, 0.12);
    z-index: 10;
}

.roark-demo-map-hero-section .roark-map-sidebar-item:hover {
    background: rgba(249, 250, 251, 0.98) !important;
}

.roark-demo-map-hero-section .roark-map-sidebar-item.is-active {
    background: rgba(239, 246, 255, 0.98) !important;
}

/* Responsive adjustments */
@media (max-width: 900px) {
    .roark-demo-map-hero-section .roark-map-split {
        height: auto !important;
    }

    .roark-demo-map-hero-section .roark-map-main {
        height: 60vw;
        min-height: 300px;
    }
}

/* =============================================
   MAP LAYOUT
   ============================================= */
.roark-listing-map {
    width: 100%;
    border-radius: var(--roark-radius-card, 8px);
    overflow: hidden;
    z-index: 0;
}

/* =============================================
   MAP SPLIT LAYOUT  (sidebar + map)
   ============================================= */
.roark-map-split {
    display: flex;
    width: 100%;
    overflow: hidden;
    border-radius: var(--roark-radius-card, 8px);
    border: 1px solid #e5e7eb;
}

.roark-map-sidebar {
    width: var(--roark-map-sidebar-width, 380px);
    flex-shrink: 0;
    overflow-y: auto;
    overflow-x: hidden;
    background: #fff;
    border-right: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
}

.roark-map-sidebar-item {
    border-bottom: 1px solid #e5e7eb;
    cursor: pointer;
    transition: background 0.15s;
}

.roark-map-sidebar-item:last-child {
    border-bottom: none;
}

.roark-map-sidebar-item:hover {
    background: #f9fafb;
}

.roark-map-sidebar-item.is-active {
    background: #eff6ff;
    box-shadow: inset 3px 0 0 var(--roark-global-color-primary, #2563eb);
}

.roark-map-main {
    flex: 1;
    min-width: 0;
    position: relative;
}

.roark-map-main .roark-listing-map {
    border-radius: 0;
    height: 100% !important;
}

@media (max-width: 900px) {
    .roark-listing-map-view {
        flex-direction: column;
        height: auto !important;
        overflow: visible;
    }

    .roark-listing-map-view__list {
        overflow-y: visible;
        padding: 0;
    }

    .roark-listing-map-view__map {
        width: 100%;
        min-width: 0;
        flex-basis: auto;
        /* Undo the desktop sticky/viewport-fill rules — mobile keeps its
           own fixed-aspect-ratio map (below), not the sticky column.
           Stay `relative` (not `static`): `.roark-listing-count--map` is
           `position: absolute` and needs this element as its containing
           block, otherwise it escapes to the next positioned ancestor up
           the tree and floats over whatever happens to be there (the
           first listing card) instead of sitting inside the map box. */
        position: relative;
        top: auto;
        height: auto;
        min-height: 0;
    }

    .roark-listing-map-view__map .roark-listing-map {
        height: 55vw !important;
        min-height: 320px;
    }

    .roark-map-split {
        flex-direction: column;
        height: auto !important;
    }

    .roark-map-sidebar {
        width: 100%;
        max-height: 38vh;
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
    }

    .roark-map-main {
        height: 55vw;
        min-height: 300px;
    }

    .roark-map-main .roark-listing-map {
        height: 100% !important;
    }
}

/* Custom pin icon */
.roark-map-pin {
    width: 28px;
    height: 28px;
    background: currentColor;
    border: 3px solid #fff;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    box-shadow: 0 2px 6px rgba(0,0,0,0.35);
    transition: transform 0.15s, box-shadow 0.15s;
}

/* Price bubble pin */
.roark-map-price-pin {
    position: absolute;
    transform: translate(-50%, -100%);
    background: var(--roark-global-color-primary, #1a2332);
    color: #fff;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0,0,0,0.28);
    cursor: pointer;
    transition: background .15s, transform .15s;
    margin-top: -4px;
}

.roark-map-price-pin::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -5px;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: var(--roark-global-color-primary, #1a2332);
    border-bottom: none;
}

/* Active pin — hovered from a map layout card */
.roark-marker--active {
    z-index: 1000 !important;
}
.roark-marker--active .roark-map-pin {
    background: var(--roark-global-color-primary, #2563eb) !important;
    transform: rotate(-45deg) scale(1.35);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.55);
}
.roark-marker--active .roark-map-price-pin {
    background: color-mix(in srgb, var(--roark-global-color-primary, #2563eb) 70%, #000);
    transform: translate(-50%, -100%) scale(1.12);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
}
.roark-marker--active .roark-map-price-pin::after {
    border-top-color: color-mix(in srgb, var(--roark-global-color-primary, #2563eb) 70%, #000);
}
/* When the hovered card's marker is hidden in a cluster, highlight the cluster */
.roark-marker--active .roark-map-cluster-inner {
    transform: scale(1.18);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.35), 0 4px 14px rgba(37, 99, 235, 0.5);
}

/* =============================================
   SPLIT LISTING CARD WRAPPERS
   ============================================= */
.roark-list-card-wrap {
    transition: outline 0.12s;
    outline: 2px solid transparent;
    outline-offset: 2px;
    border-radius: 4px;
}

.roark-list-card-wrap.is-active {
    outline-color: var(--roark-global-color-primary, #2563eb);
}

/* Cluster icon */
.roark-map-cluster {
    background: transparent;
}

.roark-map-cluster-inner {
    width: 40px;
    height: 40px;
    background: var(--roark-global-color-primary, #2563eb);
    color: #fff;
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8125rem;
    font-weight: 700;
    transition: transform .15s, box-shadow .15s;
}

/* Popup wrapper — remove default Leaflet arrow / padding */
.roark-map-popup-wrapper .leaflet-popup-content-wrapper {
    padding: 0;
    border-radius: var(--roark-radius-card, 10px);
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.18);
}

.roark-map-popup-wrapper .leaflet-popup-content {
    margin: 0;
    width: auto !important;
}

.roark-map-popup-wrapper .leaflet-popup-tip-container {
    display: none;
}

/* Popup card */
.roark-map-popup {
    display: flex;
    flex-direction: column;
    width: 220px;
    background: #fff;
    font-family: inherit;
    font-size: inherit;
    line-height: 1.4;
}

/* Loading state — centered spinner while the popup template is fetched */
.roark-map-popup--loading {
    align-items: center;
    justify-content: center;
    width: 200px;
    min-height: 150px;
    padding: 24px;
}

.roark-map-popup-img-link {
    display: block;
    overflow: hidden;
    height: 130px;
}

.roark-map-popup-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.25s;
}

.roark-map-popup-img:hover {
    transform: scale(1.04);
}

.roark-map-popup-body {
    padding: 10px 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.roark-map-popup-title {
    font-weight: 700;
    font-size: inherit;
    color: inherit;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.roark-map-popup-title:hover {
    text-decoration: underline;
}

.roark-map-popup-price {
    font-weight: 700;
    font-size: inherit;
}

.roark-map-popup-address {
    opacity: 0.75;
    font-size: 0.8125rem;
}

.roark-map-popup-meta {
    opacity: 0.85;
    font-size: 0.8125rem;
}

.roark-map-popup-btn {
    display: inline-block;
    margin-top: 6px;
    padding: 6px 12px;
    background: currentColor;
    color: #fff !important;
    border-radius: var(--roark-radius-btn, 6px);
    font-family: inherit;
    font-size: 0.8125rem;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
}

.roark-map-popup-btn:hover {
    color: #fff !important;
}

/* ── Elementor-template map popup (roark_map_popup) ───────────────────────────
   The marker-click popup renders PropertyMapPopupTemplate. Its widgets output
   `.roark-property-*` (wrapped in `.roark-card`). Give the popup a sensible
   fixed width and style the title / price / button so it reads as a clean card
   instead of stacked, wrapping plain text. */
.roark-map-popup-wrapper .leaflet-popup-content {
    width: 230px !important;
}

/* Full-bleed photo at the top of the popup */
.roark-map-popup-wrapper .roark-map-popup__image,
.roark-map-popup-wrapper .roark-map-popup__image .elementor-widget-container {
    display: block;
    line-height: 0;
}

/* The ratio-box (image_ratio control, default 4:3) governs the photo's own
   width/height/object-fit; this rule only remains as a fallback for "Auto". */
.roark-map-popup-wrapper .roark-map-popup__image img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    display: block;
}

.roark-map-popup-wrapper .roark-map-popup__image .roark-property-image__ratio-box img {
    height: 100%;
}

.roark-map-popup-wrapper .roark-map-popup__body {
    padding: 10px 12px 12px !important;
}

.roark-map-popup-wrapper .elementor-section,
.roark-map-popup-wrapper .elementor-container,
.roark-map-popup-wrapper .elementor-column,
.roark-map-popup-wrapper .elementor-widget-wrap {
    width: 100% !important;
    max-width: 100% !important;
}

/* Neutralise the default card wrapper around the popup widgets */
.roark-map-popup-wrapper .roark-card {
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    background: none !important;
    box-shadow: none !important;
}

.roark-map-popup-wrapper .elementor-widget:not(:last-child) {
    margin-bottom: 6px !important;
}

.roark-map-popup-wrapper .roark-property-price {
    font-size: 1.15rem;
    font-weight: 800;
    line-height: 1.2;
    color: #0f172a;
}

.roark-map-popup-wrapper .roark-property-title {
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.3;
    color: #0f172a;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.roark-map-popup-wrapper .roark-property-address {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    color: #64748b;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.roark-map-popup-wrapper .roark-property-button {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin-top: 4px;
    padding: 9px 14px;
    border-radius: var(--roark-radius-btn, 8px);
    background: var(--roark-card-button-bg, #1f5d8f);
    color: #fff !important;
    font-size: 0.85rem;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(24, 77, 118, 0.2);
    transition: background .15s, transform .15s;
}

.roark-map-popup-wrapper .roark-property-button:hover {
    background: var(--roark-card-button-bg-hover, #184d76);
    transform: translateY(-1px);
}

.roark-agent-iframe-widget__title {
    margin: 0 0 1rem;
}

/* =============================================
   EXPOSE ENERGIEAUSWEIS (STRUCTURE ONLY)
   ============================================= */
.roark-energieausweis {
    width: 100%;
}

.roark-energieausweis__title {
    margin: 0 0 1rem;
}

.roark-energieausweis--table .roark-energieausweis__content {
    width: 100%;
    border-collapse: collapse;
}

.roark-energieausweis--table .roark-energieausweis__label,
.roark-energieausweis--table .roark-energieausweis__value {
    vertical-align: top;
    text-align: left;
}

.roark-energieausweis--grid .roark-energieausweis__content {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.roark-energieausweis--grid .roark-energieausweis__item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.roark-energieausweis--grid .roark-energieausweis__label,
.roark-energieausweis--grid .roark-energieausweis__value {
    display: block;
}

/* =============================================
   EXPOSE ECKDATEN (STRUCTURE ONLY)
   ============================================= */
.roark-eckdaten {
    width: 100%;
}

.roark-eckdaten__title {
    margin: 0 0 1rem;
}

.roark-eckdaten--table .roark-eckdaten__content {
    width: 100%;
    border-collapse: collapse;
}

.roark-eckdaten--table .roark-eckdaten__label,
.roark-eckdaten--table .roark-eckdaten__value {
    vertical-align: top;
    text-align: left;
}

.roark-eckdaten--grid .roark-eckdaten__content {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.roark-eckdaten--grid .roark-eckdaten__item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.roark-eckdaten--grid .roark-eckdaten__label,
.roark-eckdaten--grid .roark-eckdaten__value {
    display: block;
}

.roark-eckdaten__icon {
    margin-right: 0.5em;
    display: inline-block;
    vertical-align: middle;
}

/* "Garage / Stellplatz" sub-block (decision 5a) — visually separated from
   the mixed fields grid/table above via a top divider and extra spacing. */
.roark-eckdaten__parking {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

/* Scalar fallback only (pre-1.2.6 data with no per-type Property::$parking
   rows): a single Art/Anzahl/Kaufpreis-or-Miete row, one item per field. */
.roark-eckdaten__parking-row {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

/* Same item look regardless of the widget's Table/Grid layout setting for
   the mixed fields above — the scalar parking row always renders as a row. */
.roark-eckdaten__parking .roark-eckdaten__item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.roark-eckdaten__parking .roark-eckdaten__item .roark-eckdaten__label,
.roark-eckdaten__parking .roark-eckdaten__item .roark-eckdaten__value {
    display: block;
}

/* One-header table — Property::$parking rows (DB 1.2.6+), one row per
   parking-space type. A real <table> (not the auto-fit grid above) so it
   never loses the label↔value / row-to-row grouping at narrow widths: the
   header (Art | Anzahl | Kaufpreis-or-Miete) prints once, each type gets one
   compact row, and it comfortably fits a 360px viewport. Header cells reuse
   `.roark-eckdaten__label`, data cells `.roark-eckdaten__value` — both
   already exposed as Elementor Typography controls on this widget. */
.roark-eckdaten__parking-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.roark-eckdaten__parking-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.roark-eckdaten__parking-table th.roark-eckdaten__label,
.roark-eckdaten__parking-table td.roark-eckdaten__value {
    display: table-cell;
    text-align: left;
    vertical-align: middle;
    padding: 0.5rem 0.375rem;
}

.roark-eckdaten__parking-table th.roark-eckdaten__label:first-child,
.roark-eckdaten__parking-table td.roark-eckdaten__value:first-child {
    padding-left: 0;
    width: 38%;
}

.roark-eckdaten__parking-table thead th.roark-eckdaten__label {
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    border-bottom: 1px solid #e5e7eb;
}

.roark-eckdaten__parking-table tbody td.roark-eckdaten__value {
    border-bottom: 1px solid #f0f0f1;
}

.roark-eckdaten__parking-table tbody tr:last-child td.roark-eckdaten__value {
    border-bottom: 0;
}

@media (max-width: 480px) {
    .roark-eckdaten__parking-table th.roark-eckdaten__label,
    .roark-eckdaten__parking-table td.roark-eckdaten__value {
        padding: 0.4rem 0.25rem;
        font-size: 0.875rem;
    }
}

/* =============================================
   EXPOSE AGENT / ANSPRECHPARTNER
   ============================================= */
.roark-expose-agent {
    width: 100%;
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    color: inherit;
}

.roark-expose-agent__title {
    margin: 0 0 1rem;
    font-family: inherit;
}

/* Agent photo */
.roark-expose-agent-photo {
    margin-bottom: 0.75rem;
    text-align: center;
}

.roark-expose-agent-photo img {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 0 auto;
}

/* Agent logo */
.roark-expose-agent-logo {
    margin-bottom: 0.75rem;
    text-align: center;
}

.roark-expose-agent-logo img {
    display: block;
    max-width: 180px;
    max-height: 60px;
    width: auto;
    height: auto;
    object-fit: contain;
    margin: 0 auto;
}

/* Agent name */
.roark-expose-agent-name {
    font-weight: 700;
    margin-bottom: 0.75rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Contact items */
.roark-expose-agent__item {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.roark-expose-agent__label {
    font-weight: 700;
    flex-shrink: 0;
    white-space: nowrap;
}

.roark-expose-agent__label::after {
    content: ':';
    margin-right: 0.25em;
}

.roark-expose-agent__label--icon-only::after {
    content: none;
}

.roark-expose-agent__value {
    flex: 1;
    min-width: 0;
    overflow-wrap: break-word;
    word-break: break-word;
}

.roark-expose-agent__value a {
    text-decoration: none;
    /* `break-all` used to chop long values (mostly e-mails) at an arbitrary
       character regardless of word shape ("development+a130@expo" /
       "wand.de"). Long e-mails now carry their own <wbr> break hints before
       "@" and "." (see ExposeAgentWidget::render()), so a plain
       `overflow-wrap: break-word` is enough here as a safety net for any
       value without those hints (phone/website/address). */
    overflow-wrap: break-word;
}

.roark-expose-agent__value a:hover {
    text-decoration: underline;
}

.roark-expose-agent__icon {
    margin-right: 0.4em;
    display: inline-block;
    vertical-align: middle;
}

/* Stacked layout: label on top, value below */
.roark-expose-agent--stacked .roark-expose-agent__item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
}

.roark-expose-agent--stacked .roark-expose-agent__label::after {
    content: ':';
}

.roark-expose-agent--stacked .roark-expose-agent__value {
    width: 100%;
}

/* Legal links (Impressum / Datenschutz / AGB) — decision 11.
   A field holding a URL renders as <a class="…legal-link">; free text
   renders as <details class="…legal-details"><summary class="…legal-link">.
   Two things made the three look inconsistent:
   1. `text-decoration: underline` on the shared .legal-link class was being
      overridden for real <a> elements by the embedding site's own theme
      (a common default reset targeting `a`), but not for <summary> — not an
      anchor — leaving Impressum underlined and Datenschutz/AGB not. Use
      `border-bottom` instead: same "underlined link" look, but not a
      property any theme's anchor reset touches.
   2. `.legal-details { flex: 1 1 100% }` forced Impressum (whenever it is a
      details, i.e. free-text) onto its own full-width row, wrapping the
      other two links onto a second line even though all three fit on one.
      Size it like a plain link instead, and only claim the full row once
      the disclosure is actually expanded (so the expanded text has room). */
.roark-expose-agent__legal {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.4rem 1rem;
    margin-top: 0.75rem;
}

.roark-expose-agent__legal-link {
    display: inline-block;
    font-size: 0.85em;
    color: inherit;
    text-decoration: none;
    border: none;
    border-bottom: 1px solid currentColor;
    cursor: pointer;
    background: none;
    padding: 0;
    list-style: none;
    line-height: 1.3;
}

.roark-expose-agent__legal-link::-webkit-details-marker {
    display: none;
}

.roark-expose-agent__legal-details {
    flex: 0 1 auto;
    min-width: 0;
}

.roark-expose-agent__legal-details[open] {
    flex-basis: 100%;
}

.roark-expose-agent__legal-text {
    margin-top: 0.5rem;
    font-size: 0.85em;
    opacity: 0.85;
}

/* Contact CTA buttons (Anrufen / WhatsApp) */
/* Functional layout only — button appearance (background, border, radius,
   typography, padding, shadow) comes from .elementor-button + Elementor's button
   styling. The WhatsApp brand green is a control default, not hardcoded here. */
.roark-expose-agent__buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1rem;
}

.roark-expose-agent__btn {
    flex: 1 1 auto;
}

.roark-expose-agent__btn .elementor-button-content-wrapper {
    gap: 0.4em;
}

/* Responsive: narrow containers / mobile */
@media (max-width: 480px) {
    /* Previously forced `flex-direction: column` here, which stacked the
       (icon-only) label above the value on every row — e-mail/phone/
       website/company each rendered as icon glyph on its own line above
       the text instead of an inline "icon | text" row. The base rule above
       (row + baseline + wrap) already keeps the icon a fixed width and lets
       only the value text wrap, which is what we want at any width — so
       mobile no longer needs its own direction override here. */
    .roark-expose-agent-logo img {
        max-width: 140px;
    }

    .roark-expose-agent__buttons {
        flex-direction: column;
    }
}

/* =============================================
   EXPOSE FLAECHE (STRUCTURE ONLY)
   ============================================= */
.roark-flaeche {
    width: 100%;
}

.roark-flaeche__title {
    margin: 0 0 1rem;
}

.roark-flaeche--table .roark-flaeche__content {
    width: 100%;
    border-collapse: collapse;
}

.roark-flaeche--table .roark-flaeche__label,
.roark-flaeche--table .roark-flaeche__value {
    vertical-align: top;
    text-align: left;
}

.roark-flaeche--grid .roark-flaeche__content {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.roark-flaeche--grid .roark-flaeche__item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.roark-flaeche--grid .roark-flaeche__label,
.roark-flaeche--grid .roark-flaeche__value {
    display: block;
}

/* =============================================
   EXPOSE FIELD GRID
   ============================================= */
.roark-expose-field-grid {
    display: grid;
    gap: 1rem;
}

.roark-expose-field-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.roark-expose-field-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.roark-expose-field-grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.roark-expose-field-grid-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.roark-expose-field-grid-label {
    font-weight: 700;
}

.roark-expose-field-grid-icon {
    margin-right: 0.5em;
    display: inline-block;
    vertical-align: middle;
}

/* =============================================
   EXPOSE FIELD (SINGLE FIELD WIDGET)
   ============================================= */
.roark-field-icon {
    margin-right: 0.5em;
    display: inline-block;
    vertical-align: middle;
}

.roark-field-icon-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
}

.roark-field-icon-hidden {
    display: none;
}

/* =============================================
   EXPOSE FLAECHE (AREA FIELDS)
   ============================================= */

.roark-flaeche-icon {
    margin-right: 0.5em;
    display: inline-block;
    vertical-align: middle;
}

.roark-flaeche--table .roark-flaeche__label,
.roark-eckdaten--table .roark-eckdaten__label {
    white-space: nowrap;
}
.roark-features {
    width: 100%;
}

.roark-features__title {
    margin: 0 0 1rem;
}

.roark-features__row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.roark-features__col {
    text-align: center;
}

.roark-features__tag {
    display: inline-block;
    font-size: smaller;
    padding: 0.6em 0.9em;
    margin: 0.2em;
    border-radius: 0.5em;
    border: 1px solid #ccc;
}

/* Neutralise ExposeFeaturesWidget's own "Card Styling" section (Card Styling
   tab defaults: 20px padding, white background, border, box-shadow) inside
   the demo card templates. That styling is meant for the widget's standalone
   "Ausstattung" use on the exposé page; nested inside a grid/list/map card
   it produced a 20px left offset (chips indented relative to the title/
   price/address/fact-pills above them, all flush with the card padding) and
   an oversized gap under the fact pills (16px inter-widget spacing + this
   20px top padding). Card templates only ever pass `_css_classes:
   'roark-demo-card__features'` and never override the Card Styling
   controls, so this same rule covers the grid, list and map card templates. */
.roark-demo-card__features .roark-features {
    padding: 0 !important;
    margin: 0 !important;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}

/* Feature tags inside card templates — polished pill style */
.roark-demo-card__features .roark-features__row {
    gap: 4px;
    flex-wrap: wrap;
}

.roark-demo-card__features .roark-features__tag {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: var(--roark-radius-pill, 999px);
    border: 1px solid #e2e8f0;
    background: #f1f5f9;
    color: #475569;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.4;
    margin: 0 2px 2px 0;
    white-space: nowrap;
}

.roark-feature-icon {
    margin-right: 0.25em;
    display: inline-block;
    vertical-align: middle;
}

/* =============================================
   EXPOSE AUSSTATTUNG (COMBINED TAGS + TEXT)
   ============================================= */
.roark-ausstattung {
    width: 100%;
}

.roark-ausstattung__title {
    margin: 0 0 1rem;
}

.roark-ausstattung__row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 0.25rem 0 1rem;
}

/* left, not center: a `.roark-ausstattung__col` is a flex item with
   flex-shrink but no flex-grow — it only ever stretches wider than its tag
   when the tag's own text wraps onto two lines (e.g. "Bodenbelag: Laminat,
   Parkett, …") AND that item lands alone on its wrapped row, at which point
   flexbox lets it shrink to fit but never grows it past that need — except
   here, where the row has run out of items and this last one gets whatever
   width is left in the row. `text-align: center` then centered the
   (narrower) multi-line tag inside that leftover width, visibly indenting
   its icon+text vs. every single-line row above it (issue 25). */
.roark-ausstattung__col {
    text-align: left;
}

.roark-ausstattung__tag {
    display: inline-block;
}

.roark-ausstattung-icon {
    margin-right: 0.25em;
    display: inline-block;
    vertical-align: middle;
}

.roark-ausstattung__text {
    margin: 1rem 0 0 0;
    padding: 0;
    line-height: 1.6;
}

/* =============================================
   EXPOSE PRICE
   ============================================= */
.roark-price-widget__icon {
    margin-right: 0.5em;
    display: inline-block;
    vertical-align: middle;
}

/* Price Section Widget Styles */
.roark-price-section {
    margin: 0 0 1rem;
}

.roark-price-section-label {
    margin: 0 0 1rem;
}

.roark-price-section-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5em;
}

.roark-price-section-table tbody tr {
    border-bottom: 1px solid #e0e0e0;
}

.roark-price-section-table tbody tr:last-child {
    border-bottom: none;
}

.roark-price-section-table-label {
    width: 50%;
    text-align: left;
    padding: 0.75em 1em 0.75em 0;
}

.roark-price-section-table-value {
    width: 50%;
    text-align: left;
    padding: 0.75em 0;
}

.roark-price-disclaimer {
    font-size: 0.95em;
    margin-bottom: 1em;
    line-height: 1.6;
}

/* =============================================
   PAGINATION
   ============================================= */
.roark-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-top: 24px;
    margin-bottom: 24px;
}

.roark-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: var(--roark-radius-btn, 4px);
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
    box-shadow: none;
    outline: none;
}

.roark-pagination .page-numbers.current {
    cursor: default;
    font-weight: 600;
}

.roark-pagination .page-numbers.dots {
    border: none;
    background: transparent;
    cursor: default;
    min-width: auto;
    padding: 0 4px;
}

.roark-pagination .page-numbers.prev,
.roark-pagination .page-numbers.next {
    font-weight: 700;
}


/* ── Load-more trigger (infinite scroll sentinel) ──────────────────────── */
.roark-load-more-trigger {
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0; /* invisible sentinel; spinner appears when loading */
}

.roark-load-more-trigger[data-roark-lm-init] {
    opacity: 1;
}

@keyframes roark-spin {
    to { transform: rotate(360deg); }
}

.roark-load-more-trigger::after {
    content: '';
    width: 24px;
    height: 24px;
    border: 3px solid #ccc;
    border-top-color: var(--roark-global-color-primary, #2563eb);
    border-radius: 50%;
    animation: roark-spin 0.7s linear infinite;
    opacity: 0;
    transition: opacity 0.2s;
}

.roark-load-more-trigger[data-roark-lm-init]::after {
    opacity: 1;
}

/* ── Free-text search bar (SearchBarWidget) ─────────────────────────────── */
.roark-searchbar {
    display: flex;
    align-items: stretch;
    gap: 8px;
    width: 100%;
    background: #fff;
    padding: 8px;
    border-radius: var(--roark-radius-pill, 999px);
    box-shadow: 0 2px 14px rgba(15, 23, 42, 0.10);
    flex-wrap: wrap;
}

.roark-searchbar__input {
    flex: 1 1 220px;
    min-width: 0;
    border: none;
    background: transparent;
    padding: 10px 16px;
    font-size: 1rem;
    line-height: 1.4;
    outline: none;
}

.roark-searchbar__purpose {
    flex: 0 0 auto;
    border: none;
    background: transparent;
    padding: 10px 12px;
    font-size: 1rem;
    outline: none;
    cursor: pointer;
}

/* ─── Suchen / KI-Suche submit buttons ───────────────────────────────────
   Both carry Elementor's own `.elementor-button` class (for the widget
   editor's generic button controls) alongside these, so left unstyled they
   fall back to Elementor core's bare grey default (~#6b7280 — reads as
   "disabled") instead of the theme/kit-aware colour below. Same
   class-doubling trick as roark-card.css's button rules: `.elementor-button`
   is a plain (0,1,0) selector, so a same-specificity rule here would lose
   the cascade tie-break to Elementor's core stylesheet on source order
   alone; doubling the class reaches (0,2,0), which reliably wins without
   `!important` while still losing (correctly) to any colour a user sets via
   SearchBarWidget's own "Button Background"/"Button Text Color" Style
   controls (also (0,2,0), printed by Elementor after this stylesheet). Also
   carries `wp-element-button` in the markup so a theme that only styles
   that class (no reusable colour var) still contributes font-family — every
   size-related property (padding/font-size/line-height/border/radius) is
   pinned here regardless, so the theme's own button proportions can't blow
   out this compact pill bar. */
.roark-searchbar__submit.roark-searchbar__submit,
.roark-ai-search__submit.roark-ai-search__submit {
    flex: 0 0 auto;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0 24px;
    min-height: 44px;
    border: 1px solid transparent;
    border-radius: var(--roark-radius-pill, 999px);
    background: var(--roark-btn-bg);
    color: var(--roark-btn-fg);
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    text-decoration: none;
    transition: background .15s;
}

.roark-searchbar__submit.roark-searchbar__submit:hover,
.roark-searchbar__submit.roark-searchbar__submit:focus-visible,
.roark-ai-search__submit.roark-ai-search__submit:hover,
.roark-ai-search__submit.roark-ai-search__submit:focus-visible {
    background: var(--roark-btn-bg-hover);
    color: var(--roark-btn-fg);
}

@media (max-width: 600px) {
    .roark-searchbar {
        border-radius: var(--roark-radius-card, 14px);
    }

    .roark-searchbar__submit {
        flex: 1 1 100%;
    }
}

/* ── AI Search ──────────────────────────────────────────────────────────── */
.roark-ai-search {
    flex-wrap: wrap;
    align-items: center;
}

/* Let the input shrink inside the flex row instead of overflowing onto the
   submit pill (the long placeholder would otherwise force an overlap).
   Also carries the theme's own `input[type=text]` chrome (Kadence: a 1px
   border + 3px radius + its own background) — that selector is
   `input[type=text]` at (0,1,1) specificity, which beats a plain single
   class like this one at (0,1,0), so the border kept winning despite being
   set here; it read as a second, inner outline nested inside the
   `.roark-searchbar` white pill. Doubling the class (see roark-card.css /
   the searchbar-submit rule above for the same trick) reaches (0,2,0),
   reliably beating it without `!important`. Reset to borderless/transparent
   like `.roark-searchbar__input`, with its own visible :focus-visible ring
   so keyboard/AT users don't lose the focus indicator the native border
   used to (double-)provide. */
.roark-ai-search__input.roark-ai-search__input {
    flex: 1 1 0;
    min-width: 0;
    border: none;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    padding: 10px 16px;
    font-size: 1rem;
    line-height: 1.4;
    outline: none;
}

.roark-ai-search__input.roark-ai-search__input:focus-visible {
    outline: 2px solid var(--roark-btn-bg);
    outline-offset: -2px;
    border-radius: var(--roark-radius-pill, 999px);
}

.roark-ai-search__submit {
    flex: 0 0 auto;
    white-space: nowrap;
}

/* Loading feedback lives inside the search bar: the submit button label is
   swapped for a spinner. The textual status stays in the DOM for screen
   readers only (see .roark-sr-only). */
.roark-ai-search__submit {
    position: relative;
}

.roark-ai-search.is-loading .roark-ai-search__submit-label {
    visibility: hidden;
}

.roark-ai-search.is-loading .roark-ai-search__submit::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: roark-ai-spin 0.6s linear infinite;
}

@keyframes roark-ai-spin {
    to { transform: rotate(360deg); }
}

.roark-sr-only {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* "Verstanden als" interpretation chips shown on the results page after an AI
   search, so the visitor can read back (and refine via the filters below). */
.roark-ai-search__interpretation {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}

/* The author display:flex above beats the UA stylesheet, so the [hidden]
   attribute alone won't hide the chip row — force it. */
.roark-ai-search__interpretation[hidden] {
    display: none;
}

.roark-ai-search__interpretation-label {
    font-size: 13px;
    font-weight: 600;
    color: #555;
}

.roark-ai-search__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.roark-ai-search__chip {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    font-size: 13px;
    line-height: 1.4;
    color: #1f2937;
    background: #eef2f7;
    border: 1px solid #dde3ea;
    border-radius: var(--roark-radius-pill, 999px);
}

/* Info box shown under the AI search bar when the query contained words the
   AI couldn't map to any filter (or, without a filter match at all, when it
   couldn't extract any search criteria) — subtle warning styling, distinct
   from the neutral "Verstanden als" interpretation chips above. */
.roark-ai-search__notice {
    margin-top: 10px;
    padding: 8px 12px;
    font-size: 13px;
    line-height: 1.5;
    color: #7c4a03;
    background: #fdf6e3;
    border: 1px solid #f1dfa6;
    border-radius: 8px;
}

.roark-ai-search__notice[hidden] {
    display: none;
}

/*
 * On narrow phones the full "✨ KI-Suche" text button (~127px, see
 * `.roark-searchbar__submit.roark-searchbar__submit` above) leaves so
 * little room for the input that its placeholder gets cut down to a few
 * characters. Shrink the button to a square icon-only pill (the text label
 * is emptied visually via `.roark-ai-search__submit-label`, replaced by a
 * `::before` sparkle) — the button keeps a static `aria-label="KI-Suche"`
 * (set in FilterWidget's markup) so it stays announced correctly either
 * way. filter.js swaps the input's placeholder for a shorter one at the
 * same breakpoint via `data-ai-placeholder-mobile`. Desktop (>480px) is
 * unaffected.
 */
@media (max-width: 480px) {
    .roark-ai-search__submit.roark-ai-search__submit {
        flex: 0 0 44px;
        width: 44px;
        min-width: 44px;
        padding: 0;
    }

    .roark-ai-search__submit .roark-ai-search__submit-label {
        display: none;
    }

    .roark-ai-search__submit::before {
        content: "\2728";
        font-size: 1.05rem;
        line-height: 1;
    }

    .roark-ai-search.is-loading .roark-ai-search__submit::before {
        visibility: hidden;
    }
}

/* KI-Suche bar built into the filter form as its top row. Sits above the
   filter pill bar; the AI fills the controls below and reloads in place. */
.roark-filter-ai {
    margin-bottom: 12px;
}

.roark-filter-form .roark-filter-ai__input {
    flex: 1 1 0;
    min-width: 0;
}

/* =============================================
   PROPERTY ENERGY (CARD ONE-LINER)
   ============================================= */
.roark-property-energy {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .35em;
    line-height: 1.3;
    font-size: 0.8rem;
    color: #475569;
}

@media (max-width: 767px) {
    .roark-property-energy {
        font-size: 13px;
    }
}

.roark-property-energy__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.4em;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: max(0.75em, 11px); /* never below 11px, even in 0.72rem cards */
    font-weight: 700;
    line-height: 1.5;
    color: #1f2937;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.35);
}

.roark-property-energy__label {
    font-weight: 600;
}

/* Value is split into individual parts (one span per "Klasse C" / "100
   kWh/(m²·a)" / "Bedarf" / … segment) so long lines wrap between parts
   instead of jumping the whole value onto its own line. */
.roark-property-energy__text {
    display: contents;
}

.roark-property-energy__part + .roark-property-energy__part::before {
    content: '·';
    margin-right: .35em;
    color: #94a3b8;
}

/* =============================================
   EXPOSE ENERGIEAUSWEIS — CLASS SCALE (A+..H)
   ============================================= */
.roark-energy-scale {
    display: flex;
    align-items: stretch;
    gap: 2px;
    margin: 0 0 1rem;
}

.roark-energy-scale__band {
    flex: 1 1 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px 2px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #1f2937;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.35);
    border-radius: 3px;
    opacity: 0.45;
    transform: scale(0.94);
    transition: opacity .15s, transform .15s;
}

.roark-energy-scale__band--active {
    opacity: 1;
    transform: scale(1.08);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}
/* Optional H1 above the listing (ListingWidget "SEO Heading" section). Off by
   default; the demo page enables it since the theme does not otherwise print
   a heading on the listing page. */
.roark-listing-heading {
    margin: 0 0 16px;
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.25;
}

/* =============================================================================
   MOBILE AUDIT FIXES (docs/plans/audit-2026-09/design.md §4, §8)
   Scoped to ≤767px — desktop is untouched.
   ============================================================================= */

/* ─────────────────────────────────────────────────────────────────────────
   1) Collapsible filter bar (row layout)
   Collapsed by default: [Filter (n) toggle] … [sort select].
   Everything else (location, pills, reset, view buttons, submit) lives in
   the existing mobile "expanded" layout above and only becomes visible once
   `.roark-filter-bar` gets `.is-open` (toggled by FilterWidget's inline JS).
   ───────────────────────────────────────────────────────────────────────── */
.roark-filter-mobile-toggle {
    display: none;
}

.roark-filter-mobile-toggle__badge {
    display: none;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: var(--roark-radius-pill, 999px);
    background: var(--roark-filter-accent, #2563eb);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}

.roark-filter-mobile-toggle__badge:not(:empty) {
    display: inline-flex;
}

@media (max-width: 767px) {
    .roark-filter-mobile-toggle {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        min-height: 44px;
        padding: 8px 14px;
        border: 1px solid #e5e7eb;
        border-radius: var(--roark-radius-pill, 999px);
        background: #f9fafb;
        color: #111827;
        font-size: 0.875rem;
        font-weight: 600;
        cursor: pointer;
        flex-shrink: 0;
    }

    .roark-filter-mobile-toggle.has-active {
        border-color: #111827;
        background: #f3f4f6;
    }

    .roark-filter-bar:not(.is-open) {
        flex-wrap: nowrap;
    }

    .roark-filter-bar:not(.is-open) .roark-filter-location-pill,
    .roark-filter-bar:not(.is-open) .roark-filter-pill-wrap,
    .roark-filter-bar:not(.is-open) .roark-filter-reset-btn,
    .roark-filter-bar:not(.is-open) .roark-filter-view-buttons,
    .roark-filter-bar:not(.is-open) .roark-filter-submit-btn {
        display: none;
    }

    .roark-filter-bar:not(.is-open) .roark-filter-bar__end {
        width: auto;
        margin-left: auto;
        padding: 0;
        border-top: none;
    }
}

/* ─────────────────────────────────────────────────────────────────────────
   1b) Expanded filter panel — even grid + aligned toolbar row.
   Left to plain flex-wrap, the open panel reflowed at whatever width each
   pill's own label happened to need: a long "Ausstattung & Merkmale" pill
   left too little room for "Favoriten" to share its row (stranding it alone
   on the next one), and every row started at a slightly different left
   edge. The reset/sort/view row also inherited the *collapsed* state's
   `justify-content: flex-end` (meant to hug the sort select against the
   "Filter" toggle when collapsed), which in the open panel just floated the
   "×" ~40px in from the edge instead of lining up under the pills above it.
   A fixed 2-column grid gives every row the same left edge and gutters
   regardless of label length, and the toolbar row gets its own left-aligned
   treatment. Suchen stays a full-width row at the bottom (existing rule
   above, unchanged).
   ───────────────────────────────────────────────────────────────────────── */
@media (max-width: 767px) {
    .roark-filter-bar.is-open {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        align-items: stretch;
        gap: 8px;
        padding: 10px;
    }

    .roark-filter-bar.is-open .roark-filter-mobile-toggle,
    .roark-filter-bar.is-open .roark-filter-location-pill,
    .roark-filter-bar.is-open .roark-filter-bar__tail {
        grid-column: 1 / -1;
    }

    .roark-filter-bar.is-open .roark-filter-location-pill {
        width: auto;
        padding: 10px 12px;
        border: 1px solid #e5e7eb;
        border-bottom: 1px solid #e5e7eb;
        border-radius: var(--roark-radius-btn, 12px);
    }

    .roark-filter-bar.is-open .roark-filter-pill-wrap {
        width: 100%;
    }

    .roark-filter-bar.is-open .roark-filter-pill-btn {
        width: 100%;
        justify-content: space-between;
        padding: 10px 12px;
        border: 1px solid #e5e7eb;
        border-radius: var(--roark-radius-btn, 10px);
        background: #f9fafb;
    }

    /* The favourites toggle has no trailing caret (it's a plain on/off
       pill, not a dropdown) — `justify-content: space-between` above is
       meant for the caret pills and instead shoved its label ~60px away
       from the heart icon on its own. Keep it a normal icon+label pair. */
    .roark-filter-bar.is-open .roark-filter-fav-toggle {
        justify-content: flex-start;
        gap: 6px;
    }

    .roark-filter-bar.is-open .roark-filter-pill-wrap--active .roark-filter-pill-btn {
        outline: none;
        border-color: #111827;
    }

    /* Tail wrapper: was previously two separate grid rows (bar__end,
       Suchen); now both live inside one grid cell (`.roark-filter-bar__tail`,
       assigned above), stacked as a flex column so the visual result is
       unchanged. */
    .roark-filter-bar.is-open .roark-filter-bar__tail {
        display: flex;
        flex-direction: column;
        gap: 8px;
        width: 100%;
        margin-left: 0;
    }

    /* Toolbar row: reset (icon+label) — sort select (fills the middle) —
       view switcher (pinned right), all on the same left edge as the pills
       above instead of the collapsed view's right-aligned pair. */
    .roark-filter-bar.is-open .roark-filter-bar__end {
        justify-content: flex-start;
        width: 100%;
        margin-left: 0;
        padding: 10px 0 0;
        border-top: 1px solid #f3f4f6;
    }

    /* Compact enough (padding/gap/font trimmed from the desktop icon-only
       circle's expanded icon+label form) to leave the sort select a
       realistic minimum — see .roark-filter-sort-select below — instead of
       reset(desktop-sized)+view(44px x3, fixed) eating so much of the row
       that "Neueste" had almost nothing left and rendered hard-clipped. */
    .roark-filter-bar.is-open .roark-filter-reset-btn {
        width: auto;
        height: 44px;
        padding: 0 10px;
        border: 1px solid #e5e7eb;
        border-radius: var(--roark-radius-pill, 999px);
        background: #fff;
        gap: 4px;
        flex-shrink: 0;
    }

    .roark-filter-bar.is-open .roark-filter-reset-btn__label {
        display: inline;
        font-size: 0.8rem;
        font-weight: 600;
        white-space: nowrap;
    }

    /* min-width kept modest (not 0, not auto/longest-option-based) so the
       select never gets crushed below a short label like "Neueste" — an
       ellipsis is still there as a fallback for a very narrow screen
       (~360px) or a longer sort label. */
    .roark-filter-bar.is-open .roark-filter-sort-select {
        flex: 1 1 auto;
        max-width: none;
        min-width: 72px;
        height: 44px;
        padding: 0 8px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .roark-filter-bar.is-open .roark-filter-view-buttons {
        margin-left: auto;
        flex-shrink: 0;
    }

    /* Suchen's own `margin-left: 8px` (desktop rule, spacing it from
       bar__end on the same row) doesn't apply here — the two are stacked
       in separate rows of the tail's flex column — but it was never reset,
       so the button rendered 8px right of the pills'/location's left edge
       instead of flush with them. */
    .roark-filter-bar.is-open .roark-filter-submit-btn {
        margin-left: 0;
    }
}

/* ─────────────────────────────────────────────────────────────────────────
   2) Sticky bottom bar — mobile listing (List/Map toggle + result count).
   Rendered by ListingWidget::renderMobileBar() only when the widget's own
   view switcher is enabled. On most layouts the toggle clicks whichever
   `.roark-view-tab` is present on the page, so it also works when
   FilterWidget's own grid/list/map buttons are what actually drives the
   view. Exception: the list+map split layout (`.roark-listing-map-view`,
   renderListAndMap()) has no `.roark-view-tab` of its own — see
   view-switcher.js's `setMobileMapMode()`, which instead toggles the
   `is-mobile-map` class styled below.
   ───────────────────────────────────────────────────────────────────────── */
.roark-mobile-listing-bar {
    display: none;
}

@media (max-width: 767px) {
    .roark-listing-shell:has(.roark-mobile-listing-bar) {
        padding-bottom: 76px;
    }

    /* Hidden while its listing is scrolled out of view (view-switcher.js). */
    .roark-mobile-listing-bar.is-offscreen {
        transform: translateY(110%);
        opacity: 0;
        pointer-events: none;
    }

    .roark-mobile-listing-bar {
        display: flex;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 400;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
        background: #fff;
        border-top: 1px solid #e5e7eb;
        box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.12);
    }

    .roark-mobile-listing-bar__count {
        font-size: 13px;
        font-weight: 600;
        color: #111827;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .roark-mobile-listing-bar__toggle {
        display: flex;
        flex-shrink: 0;
        gap: 2px;
        padding: 3px;
        border-radius: var(--roark-radius-pill, 999px);
        background: #f3f4f6;
    }

    .roark-mobile-listing-bar__btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 44px;
        padding: 0 18px;
        border: none;
        border-radius: var(--roark-radius-pill, 999px);
        background: transparent;
        color: #4b5563;
        font-size: 14px;
        font-weight: 600;
        cursor: pointer;
    }

    .roark-mobile-listing-bar__btn.is-active {
        background: var(--roark-filter-accent, var(--roark-global-color-primary, #2563eb));
        color: #fff;
    }

    /* ── "Karte" mode for the list+map split layout ──────────────────────
       Without this, the split's mobile layout (the 900px breakpoint below)
       simply stacks map under list, so reaching the map means scrolling
       past every card first. `is-mobile-map` (toggled by view-switcher.js)
       instead isolates one panel at a time: hide the list, and pin the map
       to fill the remaining viewport between the (fixed/sticky) page
       header and this bar. */
    .roark-listing-shell.is-mobile-map .roark-listing-map-view__list {
        display: none;
    }

    .roark-listing-shell.is-mobile-map .roark-listing-map-view__map {
        position: fixed;
        top: var(--roark-map-top, 0);
        left: 0;
        right: 0;
        bottom: calc(71px + env(safe-area-inset-bottom));
        height: auto;
        z-index: 900;
    }

    .roark-listing-shell.is-mobile-map .roark-listing-map-view__map .roark-listing-map {
        height: 100% !important;
        min-height: 0;
    }

    /* The map now owns the whole viewport — lock background scroll so the
       (now `position: fixed`) map box doesn't sit on top of a page that
       keeps scrolling underneath it. */
    body.roark-mobile-map-open {
        overflow: hidden;
    }
}

/* ─────────────────────────────────────────────────────────────────────────
   3) Tighter section spacing on mobile (demo listing page).
   Elementor bakes the section paddings from DemoPageCreator into
   per-element inline CSS with ID-level specificity, which wins over a
   plain class selector at equal specificity tiers on some cached CSS
   files — !important guarantees the mobile override always applies
   regardless of which desktop padding value shipped with the page.
   ───────────────────────────────────────────────────────────────────────── */
@media (max-width: 767px) {
    .roark-demo-listing__filter-row {
        padding-top: 12px !important;
        padding-bottom: 4px !important;
    }

    .roark-demo-listing__grid-row {
        padding-top: 8px !important;
    }

    .roark-listing-heading {
        margin-top: 0;
        margin-bottom: 8px;
    }
}

/* ─────────────────────────────────────────────────────────────────────────
   4) Touch targets ≥ 44px (WCAG 2.5.8 / Apple HIG)
   ───────────────────────────────────────────────────────────────────────── */
@media (max-width: 767px) {
    .roark-filter-reset-btn {
        width: 44px;
        height: 44px;
    }

    .roark-filter-view-buttons .roark-view-tab {
        width: 44px;
        height: 44px;
    }

    .roark-filter-pill-wrap .roark-filter-pill-btn {
        min-height: 44px;
        padding: 10px 14px;
    }

    .roark-pagination .page-numbers {
        min-width: 44px;
        height: 44px;
        padding: 0 14px;
    }

    .roark-demo-map-card__footer .roark-property-button,
    .roark-demo-grid-card__footer .roark-property-button,
    .roark-map-popup-wrapper .roark-property-button {
        min-height: 44px;
    }
}

/* ─────────────────────────────────────────────────────────────────────────
   5) Type scale: badges/captions >= 13px, nothing below 12px, on mobile.
   Sources: category badge + Zi/SZ/Bad/Wf fact chips (roark-expose-field
   inside card badges/facts), agent "Firma" line, filter panel labels,
   feature tags, and the small icon-badges overlaid on card photos.
   ───────────────────────────────────────────────────────────────────────── */
@media (max-width: 767px) {
    .roark-demo-list-card__badge .roark-expose-field,
    .roark-demo-map-card__badge .roark-expose-field,
    .roark-demo-grid-card__badge .roark-expose-field,
    .roark-demo-list-card__fact .roark-expose-field,
    .roark-demo-map-card__fact .roark-expose-field,
    .roark-demo-grid-card__fact .roark-expose-field,
    .roark-demo-list-card__agent .roark-expose-agent-firma,
    .roark-demo-map-card__agent .roark-expose-agent-firma,
    .roark-demo-grid-card__agent .roark-expose-agent-firma,
    .roark-filter-panel__section-title,
    .roark-filter-range-label,
    .roark-demo-card__features .roark-features__tag {
        font-size: 13px;
    }

    .roark-property-image__count,
    .roark-property-image__video,
    .roark-property-image__floorplan,
    .roark-map-price-pin,
    .roark-energy-scale__band {
        font-size: 12px;
    }
}

/* ─────────────────────────────────────────────────────────────────────────
   Favorites filter pill. Row layout reuses
   `.roark-filter-pill-btn` (see the row-layout pill styles above) for the
   base look; these rules only add the heart glyph + its active-state color
   and the standalone column-layout appearance.
   ───────────────────────────────────────────────────────────────────────── */
.roark-filter-fav-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.roark-filter-fav-toggle__icon {
    display: inline-flex;
    line-height: 1;
    font-size: 1rem;
}

.roark-filter-fav-toggle__icon::before {
    content: '\2661'; /* ♡ */
}

.roark-filter-fav-toggle.is-active .roark-filter-fav-toggle__icon::before {
    content: '\2665'; /* ♥ */
}

.roark-filter-fav-toggle.is-active {
    color: #ef4444;
}

.roark-filter-column .roark-filter-fav-toggle {
    padding: 8px 14px;
    border: 1px solid #d1d5db;
    border-radius: var(--roark-radius-pill, 999px);
    background: #fff;
    cursor: pointer;
    font-size: 0.875rem;
}

.roark-filter-column .roark-filter-fav-toggle.is-active {
    border-color: #ef4444;
    background: #fef2f2;
}

/* =============================================================================
   THEME-HARDENING II (customer report 2026-10, Qwery/ThemeREX): nothing below
   changes the look under a neutral theme — each rule pins something a theme's
   bare element rules (img{height:auto;transition}, th{font-family}, line-height,
   vertical-align, ul li{margin}) would otherwise move.
   ========================================================================== */

/* -- 1. Card photos: bounded height whatever the source aspect ratio ---------
   The default `image_ratio` (4:3) wraps the photo in `.roark-property-image__ratio-box`
   (see above). Cards saved with "Auto" have a bare `<a><img>` instead, where a
   2365x3543 portrait photo (and a theme's `img{height:auto}` + the HTML
   width/height attributes) would size the card by the photo. Auto mode now
   gets a fixed crop box too: grid = 4:3; list/map = the photo fills the row
   height (absolute img, so it can never push the row taller) and is a 4:3 box
   when the card stacks. Ratio-box DOM is `container > box > a`, so every
   `.elementor-widget-container > a` selector below only matches Auto mode. */
.roark-demo-grid-card__image .elementor-widget-container > a {
    flex: 0 0 auto;
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
}

.roark-demo-grid-card__image .elementor-widget-container > a > img.roark-property-image {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    min-height: 0;
    object-fit: cover;
}

.roark-demo-list-card__image .elementor-widget-container > a {
    position: relative;
    display: block;
    flex: 1 1 auto;
    min-height: 200px;
    overflow: hidden;
}

.roark-demo-list-card__image .elementor-widget-container > a > img.roark-property-image {
    position: absolute;
    inset: 0;
    display: block;
    width: 100% !important;
    height: 100% !important;
    max-width: none;
    min-height: 0 !important;
    object-fit: cover;
}

.roark-listing-map-view__list .roark-demo-map-card__image .elementor-widget-container > a {
    position: relative;
    display: block;
    flex: 1 1 auto;
    min-height: 200px;
    overflow: hidden;
}

.roark-listing-map-view__list .roark-demo-map-card__image .elementor-widget-container > a > img.roark-property-image {
    position: absolute;
    inset: 0;
    display: block;
    width: 100% !important;
    height: 100% !important;
    max-width: none;
    min-height: 0 !important;
    object-fit: cover;
}

/* Stacked cards (image on top): 4:3 box instead of "fill the row". */
@media (max-width: 767px) {
    .roark-demo-list-card__image .elementor-widget-container > a {
        flex: 0 0 auto;
        min-height: 0;
        aspect-ratio: 4 / 3;
    }
}

@container (max-width: 559px) {
    .roark-listing-map-view__list .roark-demo-map-card__image .elementor-widget-container > a {
        flex: 0 0 auto;
        min-height: 0;
        aspect-ratio: 4 / 3;
    }
}

/* Whatever the layout: a card photo is never taller than its crop box allows. */
.roark-demo-grid-card__image img.roark-property-image,
.roark-demo-list-card__image img.roark-property-image,
.roark-demo-map-card__image img.roark-property-image {
    max-width: none;
    object-fit: cover;
}

/* -- 2. Icon + value chips: vertical centring, theme-proof -------------------
   Themes set `line-height`/`vertical-align` on span/svg; with
   `align-items: baseline` the value then sat ~5px below the icon. */
.roark-expose-field {
    align-items: center;
}

.roark-expose-field .roark-field-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    vertical-align: middle;
    /* Elementor's `.elementor-icon { font-size: 50px }` applies when the card
       template sets no icon size (or its CSS isn't on the page) — keep a sane
       default; the widget's own Icon Size control (higher specificity) wins. */
    font-size: var(--roark-field-icon-size, 18px);
}

.roark-expose-field .roark-field-icon svg,
.roark-expose-field .roark-field-icon i {
    display: block;
    vertical-align: middle;
}

.roark-expose-field .roark-expose-field-value,
.roark-expose-field .roark-expose-field-label {
    line-height: 1.2;
    vertical-align: middle;
}

.roark-demo-grid-card__fact .roark-expose-field,
.roark-demo-list-card__fact .roark-expose-field,
.roark-demo-map-card__fact .roark-expose-field {
    align-items: center;
}

.roark-expose-field-grid-icon {
    display: inline-flex;
    align-items: center;
    line-height: 1;
}

.roark-expose-field-grid-icon svg {
    display: block;
}

/* -- 3. Exposé: sidebar stacks below the main column up to 1024px ------------
   The 70/30 split leaves a ~250px (or, with theme gutters, ~90px) sidebar at
   tablet widths; the CTA/agent card/QForm buttons need room. */
@media (max-width: 1024px) {
    .elementor-container:has(> .roark-expose-main-right) {
        flex-wrap: wrap;
    }

    .elementor-column.roark-expose-main-left,
    .elementor-column.roark-expose-main-right {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100%;
    }
}

.roark-expose-main-right,
.roark-expose-agent,
.roark-expose-agent__item,
.roark-expose-agent a {
    overflow-wrap: anywhere;
    word-break: normal;
    min-width: 0;
}

/* -- 4. Exposé tables: Roark typography, not the theme's th/td styling ------
   Kept at low specificity on purpose so the widgets' Elementor Typography
   controls (`.elementor-element-xyz .roark-…`, 0,2,0) still win. */
.roark-eckdaten__parking-table th,
.roark-eckdaten__parking-table td,
.roark-price-section-table th,
.roark-price-section-table td,
.roark-energieausweis--table th,
.roark-energieausweis--table td,
.roark-eckdaten--table th,
.roark-eckdaten--table td {
    font-family: inherit;
    font-style: normal;
    letter-spacing: normal;
    text-transform: none;
    line-height: 1.4;
    color: inherit;
}

/* Zebra striping / cell backgrounds from the theme (`table > tbody > tr:nth-child(2n) > td`,
   0,1,4): doubled class to out-rank it. */
.roark-eckdaten__parking-table.roark-eckdaten__parking-table > tbody > tr > td,
.roark-eckdaten__parking-table.roark-eckdaten__parking-table > thead > tr > th,
.roark-price-section-table.roark-price-section-table > tbody > tr > td,
.roark-price-section-table.roark-price-section-table > tbody > tr > th,
.roark-energieausweis--table .roark-energieausweis__content.roark-energieausweis__content td,
.roark-eckdaten--table .roark-eckdaten__content.roark-eckdaten__content td {
    background-color: transparent;
    border-left: 0;
    border-right: 0;
    border-top: 0;
}

.roark-price-section-table th,
.roark-price-section-table td {
    font-size: inherit;
    font-weight: inherit;
}

.roark-eckdaten__parking-table thead th {
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.roark-eckdaten__parking-table,
.roark-price-section-table,
.roark-eckdaten--table .roark-eckdaten__content {
    border: 0;
    background: transparent;
}

.roark-eckdaten__parking-table tr,
.roark-price-section-table tr {
    background: transparent;
}

/* -- 5. Leaflet under theme CSS ---------------------------------------------
   Themes style bare `img` (max-width:100%, transition:all, border, shadow,
   radius) and `a`/`button`; that squashes tiles, animates them sliding and
   themes the zoom buttons. */
.roark-listing-map img,
.roark-listing-map .leaflet-container img,
.leaflet-container img,
.roark-map-popup-wrapper img.leaflet-tile {
    max-width: none !important;
    max-height: none !important;
    transition: none !important;
    box-shadow: none !important;
    border: 0 !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin: 0;
}

.leaflet-container .leaflet-control-zoom a,
.leaflet-container .leaflet-bar a,
.leaflet-container .leaflet-control-attribution a {
    text-transform: none;
    letter-spacing: normal;
    text-decoration: none;
    box-shadow: none;
    margin: 0;
}

.leaflet-container .leaflet-bar a {
    width: 30px;
    height: 30px;
    line-height: 30px;
    padding: 0;
    border-radius: 0;
    background-color: #fff;
    color: #000;
    font-family: 'Lucida Console', Monaco, monospace;
}

/* -- 6. General leakage ------------------------------------------------------ */
.roark-listing-shell h1, .roark-listing-shell h2, .roark-listing-shell h3,
.roark-listing-shell h4, .roark-listing-shell h5, .roark-listing-shell h6,
.roark-expose-agent h1, .roark-expose-agent h2, .roark-expose-agent h3, .roark-expose-agent h4 {
    text-transform: none;
    letter-spacing: normal;
    font-style: normal;
}

.roark-listing a,
.roark-demo-grid-card a,
.roark-demo-list-card a,
.roark-demo-map-card a {
    box-shadow: none;
}

/* A floating "scroll to top" button of the theme (ThemeREX etc.) must not
   cover our sticky mobile bars: lift the common ones while a bar is shown. */
@media (max-width: 767px) {
    body:has(.roark-mobile-listing-bar:not(.is-offscreen)) .trx_addons_scroll_to_top,
    body:has(.roark-expose-mobile-bar:not([hidden])) .trx_addons_scroll_to_top,
    body:has(.roark-mobile-listing-bar:not(.is-offscreen)) #scroll-to-top,
    body:has(.roark-expose-mobile-bar:not([hidden])) #scroll-to-top,
    body:has(.roark-mobile-listing-bar:not(.is-offscreen)) .scroll-to-top,
    body:has(.roark-expose-mobile-bar:not([hidden])) .scroll-to-top,
    body:has(.roark-mobile-listing-bar:not(.is-offscreen)) .back-to-top,
    body:has(.roark-expose-mobile-bar:not([hidden])) .back-to-top {
        bottom: calc(var(--roark-mobile-bar-h, 76px) + 12px + env(safe-area-inset-bottom)) !important;
    }
}

/* =============================================
   FILTER BAR — single row on desktop (customer report: with a capped
   container the tail — reset / sort / view tabs / Suchen — wrapped onto a
   second row). Pills are compacted first; if the row still doesn't fit,
   the tail wraps as a tidy right-aligned second row — nothing is clipped.
   ============================================= */
@media (min-width: 768px) {
    /* A theme's `button { display: ... }` must not reveal the mobile toggle. */
    .roark-filter-bar .roark-filter-mobile-toggle.roark-filter-mobile-toggle {
        display: none;
    }
}

@media (min-width: 1100px) {
    /* Never squeeze items into unreadable slivers: compact pills first, and
       when the row still doesn't fit, the tail wraps to a right-aligned
       second row (flex-wrap stays on). */
    .roark-filter-bar .roark-filter-location-pill {
        flex: 0 1 250px;
        min-width: 220px;
    }

    .roark-filter-bar .roark-filter-location-pill .roark-geo-autocomplete {
        flex: 1 1 90px;
        min-width: 80px;
    }

    /* Some themes (ThemeREX `.select_container`, nice-select style wrappers) wrap
       every <select> in a width:100% box — that blew the radius and sort selects up
       to ~250px and pushed Search onto a second row. Size the wrappers to content. */
    .roark-filter-bar .select_container,
    .roark-filter-bar .select-wrapper {
        width: auto !important;
        min-width: 0 !important;
        flex: 0 0 auto !important;
    }

    .roark-filter-bar .roark-filter-location-pill .roark-geo-radius {
        width: 120px !important;
        min-width: 120px !important;
    }

    .roark-filter-bar .roark-filter-sort-select {
        width: 120px !important;
    }

    .roark-filter-bar .roark-filter-pill-wrap {
        flex: 0 0 auto;
    }

    /* Pills are filter labels, not buttons: no button letter-spacing — that alone
       pushed the row past a 1220px theme container. */
    .roark-filter-bar .roark-filter-pill-wrap .roark-filter-pill-btn {
        padding-left: 7px;
        padding-right: 7px;
        letter-spacing: 0;
    }

    .roark-filter-bar .roark-filter-submit-btn.roark-filter-submit-btn {
        padding-left: 16px;
        padding-right: 16px;
    }

    .roark-filter-bar .roark-filter-bar__tail {
        flex: 0 0 auto;
        margin-left: auto;
    }

    .roark-filter-form .roark-filter-sort-select.roark-filter-sort-select {
        max-width: 130px;
    }
}
