/* Wohnen-Fix Marktplatz-Suche – volle Breite, grüne Ränder, ohne Icons */

/* Ort-Autocomplete (Homepage + Suche) */
.wf-ort-field-wrap,
.wf-location-wrap {
    position: relative;
    flex: 1 1 180px;
    min-width: 140px;
}

.wf-ort-field-wrap .wf-search-field--ort {
    width: 100%;
    box-sizing: border-box;
}

.wf-location-suggest {
    position: absolute;
    z-index: 1300;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    margin: 0;
    padding: 6px 0;
    list-style: none;
    background: #fff;
    border: 1px solid #bbf7d0;
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
    max-height: 260px;
    overflow-y: auto;
}

.wf-location-suggest__item {
    padding: 10px 14px;
    font-size: 0.88rem;
    line-height: 1.35;
    color: #0f172a;
    cursor: pointer;
}

.wf-location-suggest__item:hover,
.wf-location-suggest__item.is-active {
    background: #ecfdf5;
    color: #14532d;
}

/* Google Places Dropdown über Sticky-Bars / Filter-Drawer */
.pac-container {
    z-index: 100000 !important;
    pointer-events: auto !important;
    font-family: inherit;
}

.pac-item {
    cursor: pointer;
    padding: 8px 12px;
}

/* Defekte Google-Pin-Sprites (API/Referrer) nicht im Ort-Feld anzeigen */
.pac-icon,
.pac-item > span:first-child {
    display: none !important;
}

.pac-item-query {
    padding-left: 4px !important;
}

.wf-ort-field-wrap .wf-search-field--ort {
    background-image: none !important;
}

:root {
    --wf-green: #1F8A63;
    --wf-green-rgb: 31, 138, 99;
    --wf-green-dark: #176F50;
    --wf-green-light: #ecfdf5;
    --wf-green-mid: #1F8A63;
    --wf-search-max: 100%;
}

.wf-suche-page {
    --primary-color: var(--wf-green);
    --wf-search-max: 100%;
}

body.wf-suche-page,
.wf-suche-page {
    --wf-green: #1F8A63;
    --wf-green-rgb: 31, 138, 99;
    --wf-green-dark: #176F50;
    --wf-green-mid: #1F8A63;
    --wf-green-light: #ecfdf5;
    --wf-search-max: 100%;
    font-family: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    letter-spacing: 0;
    color: #0f172a;
    background: #f1f5f9;
}

body.wf-suche-page .wf-suche-main,
.wf-suche-page .wf-suche-main {
    max-width: none;
    width: 100%;
    margin: 0;
    padding: 28px clamp(16px, 3vw, 40px) 48px;
    box-sizing: border-box;
}

.wf-suche-page .portal-dashboard-main {
    max-width: none;
}

.wf-market-hero {
    max-width: var(--wf-search-max);
    margin: 0 auto 20px;
    padding: 0;
}

.wf-market-hero h1 {
    margin: 0 0 8px;
    font-size: clamp(1.75rem, 3.2vw, 2.25rem);
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.025em;
    line-height: 1.15;
}

.wf-market-hero p {
    margin: 0;
    color: #64748b;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.55;
    max-width: 42rem;
}

#portalSearchForm {
    position: relative;
    max-width: var(--wf-search-max);
    margin: 0 auto 24px;
}

/* —— Suchkarte wie Location-Fix (eine Box, KI oben / Filter unten) —— */
.wf-search-panel {
    overflow: hidden;
    border-radius: 1.35rem;
    border: 1px solid rgba(47, 107, 87, 0.14);
    background: #fff;
    box-shadow: 0 18px 50px -24px rgba(47, 107, 87, 0.35);
    padding: 0;
    font-family: "DM Sans", system-ui, sans-serif;
}

.wf-search-panel--unified {
    background: #fff;
}

.wf-search-panel__top {
    padding: 1.35rem 1.35rem 1.15rem;
    border-bottom: 1px solid rgba(47, 107, 87, 0.08);
    background:
        radial-gradient(ellipse 90% 70% at 0% 0%, rgba(47, 107, 87, 0.08), transparent 55%),
        linear-gradient(180deg, #f3faf6 0%, #fff 72%);
}

.wf-search-panel__bottom {
    padding: 1.15rem 1.35rem 1.25rem;
    background: #fff;
}

.wf-search-unified-intro {
    display: none;
}

.wf-search-unified-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0 0 0.35rem;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #1F8A63;
}

.wf-search-unified-kicker__icon {
    font-size: 0.75rem;
    line-height: 1;
}

.wf-search-unified-title {
    display: none;
}

.wf-search-unified-lead {
    margin: 0 0 1rem;
    font-size: 0.9rem;
    font-weight: 400;
    line-height: 1.5;
    color: #64748b;
}

.wf-search-mode {
    display: none;
}

.wf-search-row {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 8px;
}

/* KI-Zeile: Input + Button nebeneinander (wie Location-Fix) */
#wfMarketSearchBar .wf-search-hero {
    display: flex !important;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0.6rem;
    width: 100%;
    margin: 0 0 0.85rem;
}

.wf-search-hero__shell,
.wf-search-hero__field,
.wf-search-hero__hint {
    display: contents;
}

.wf-search-panel--unified #wfSearchRowKlassisch,
.wf-search-panel[data-search-mode="unified"] #wfSearchRowKlassisch {
    display: grid !important;
}

#wfSearchRowKi[hidden],
#wfSearchRowKlassisch[hidden],
.wf-search-row--ai[hidden],
.wf-search-row--fields[hidden] {
    display: none !important;
}

.wf-search-panel--klassisch #wfSearchRowKi,
.wf-search-panel[data-search-mode="klassisch"] #wfSearchRowKi {
    display: none !important;
}

.wf-search-panel--ki #wfSearchRowKlassisch,
.wf-search-panel[data-search-mode="ki"] #wfSearchRowKlassisch {
    display: none !important;
}

.wf-search-panel--klassisch #wfSearchRowKlassisch,
.wf-search-panel[data-search-mode="klassisch"] #wfSearchRowKlassisch {
    display: flex !important;
}

.wf-search-examples {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0;
    padding-top: 0.15rem;
}

.wf-search-example {
    border: 1px solid #e2e8f0 !important;
    background: #fff !important;
    color: #64748b !important;
    border-radius: 999px !important;
    padding: 0.45rem 0.9rem !important;
    font-size: 0.75rem !important;
    font-weight: 500 !important;
    font-family: inherit !important;
    line-height: 1.3;
    cursor: pointer;
    box-shadow: none !important;
}

.wf-search-example:hover {
    border-color: rgba(61, 143, 114, 0.45) !important;
    color: #1F8A63 !important;
}

.wf-search-divider {
    display: none;
}

#wfMarketSearchBar .wf-search-row--fields {
    display: grid !important;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.25fr) minmax(0, 0.9fr) minmax(0, 0.85fr) minmax(8rem, 0.9fr);
    gap: 0.75rem;
    width: 100%;
    margin: 0 0 0.9rem;
    padding: 0;
    border: none;
    background: transparent;
    align-items: end;
}

.wf-search-row--fields > input[type="hidden"] {
    display: none;
}

.wf-search-cell {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    min-width: 0;
}

.wf-search-cell__label {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #64748b;
}

.wf-search-cell__label--spacer {
    visibility: hidden;
}

.wf-search-cell--submit {
    min-width: 8rem;
}

.wf-search-field {
    min-height: 2.75rem;
    padding: 0 0.85rem;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
    background: #fff;
    font-size: 0.875rem;
    font-weight: 500;
    color: #0f172a;
    font-family: inherit;
    box-shadow: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.wf-search-field:focus,
.wf-search-field:focus-visible {
    outline: none;
    border-color: #1F8A63;
    box-shadow: 0 0 0 3px rgba(47, 107, 87, 0.15);
}

.wf-search-field--ort {
    width: 100%;
    min-width: 0;
}

/* Ort-Wrapper darf in der Spalten-Zelle nicht vertikal auf 180px wachsen */
#wfMarketSearchBar .wf-search-cell .wf-ort-field-wrap {
    flex: 0 0 auto;
    display: block;
    width: 100%;
    min-width: 0;
}

.wf-search-field--select {
    display: flex;
    align-items: center;
    padding: 0;
    background: #fff !important;
    border-color: #e2e8f0 !important;
}

.wf-search-field--select select {
    width: 100%;
    min-height: 2.65rem;
    padding: 0 0.85rem;
    border: none;
    background: transparent !important;
    font: inherit;
    font-weight: 500;
    color: #0f172a;
    cursor: pointer;
    outline: none;
}

.wf-search-field--btn {
    cursor: pointer;
    white-space: nowrap;
    width: 100%;
    text-align: left;
    color: #334155;
    font-weight: 500;
    background: #fff;
}

.wf-search-field--btn:hover {
    border-color: #cbd5e1;
    color: #0f172a;
}

#wfMarketSearchBar .wf-search-field--ai {
    flex: 1 1 auto;
    width: auto !important;
    min-width: 0;
    min-height: 3.25rem;
    height: 3.25rem;
    margin: 0;
    padding: 0 1rem !important;
    border: 1px solid rgba(47, 107, 87, 0.28) !important;
    border-radius: 1rem !important;
    background: #fff !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04) !important;
    font-size: 0.9375rem;
    font-weight: 400;
    color: #0f172a;
}

.wf-search-field--ai::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

#wfMarketSearchBar .wf-search-field--ai:focus,
#wfMarketSearchBar .wf-search-field--ai:focus-visible {
    outline: none;
    border-color: #1F8A63 !important;
    box-shadow: 0 0 0 3px rgba(47, 107, 87, 0.15) !important;
}

#wfMarketSearchBar .wf-search-ai-btn {
    flex: 0 0 auto;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-width: 7.5rem;
    height: 3.25rem;
    margin: 0;
    padding: 0 1.2rem !important;
    border: none !important;
    border-radius: 1rem !important;
    background: #1F8A63 !important;
    color: #fff !important;
    font-size: 0.875rem !important;
    font-weight: 700 !important;
    font-family: inherit !important;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(47, 107, 87, 0.2) !important;
    white-space: nowrap;
    transition: background 0.15s;
}

.wf-search-ai-btn:hover {
    background: #176F50 !important;
    filter: none;
    transform: none;
}

.wf-search-ai-btn__icon {
    font-size: 0.8rem;
    line-height: 1;
}

.wf-search-submit {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    width: 100%;
    min-width: 0;
    height: 2.75rem;
    padding: 0 1.15rem;
    border: none !important;
    border-radius: 0.75rem !important;
    background: #1F8A63 !important;
    color: #fff !important;
    font-size: 0.875rem !important;
    font-weight: 700 !important;
    letter-spacing: 0;
    cursor: pointer;
    font-family: inherit;
    box-shadow: 0 4px 14px rgba(47, 107, 87, 0.18);
}

.wf-search-submit::before {
    content: "";
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E") center / contain no-repeat;
}

.wf-search-submit:hover {
    background: #176F50 !important;
    transform: none;
}

.wf-search-more-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem 0.85rem;
    margin-bottom: 0.65rem;
}

.wf-filter-toggle--link {
    display: inline-flex !important;
    align-items: center;
    gap: 0.35rem;
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
    color: #1F8A63 !important;
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: none !important;
    min-height: auto !important;
}

.wf-filter-toggle--link:hover {
    color: #176F50 !important;
    text-decoration: underline;
    border-color: transparent !important;
}

.wf-search-extra-pill {
    border: 1px solid #e2e8f0 !important;
    background: #fff !important;
    color: #64748b !important;
    border-radius: 999px !important;
    padding: 0.4rem 0.8rem !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    font-family: inherit !important;
    cursor: pointer;
    box-shadow: none !important;
}

.wf-search-extra-pill:hover {
    border-color: #cbd5e1 !important;
    color: #334155 !important;
}

.wf-search-save-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    margin-left: auto;
    height: auto;
    min-height: 0;
    padding: 0.35rem 0.5rem !important;
    border: none !important;
    border-radius: 0.5rem !important;
    background: transparent !important;
    color: #64748b !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    cursor: pointer;
    font-family: inherit;
    box-shadow: none !important;
}

.wf-search-save-btn::before {
    content: "";
    width: 0.9rem;
    height: 0.9rem;
    flex-shrink: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 21l-7-5-7 5V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.wf-search-save-btn:hover {
    color: #1F8A63 !important;
    background: #f3faf6 !important;
}

.wf-quick-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    width: 100%;
    margin-top: 0.15rem;
    justify-content: flex-start;
}

.wf-market-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 1.9rem;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    border: 1px solid #e2e8f0;
    background: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.wf-market-chip:hover {
    background: #f8fafc;
    color: #334155;
    border-color: #cbd5e1;
}

.wf-market-chip.is-active {
    border-color: #1F8A63;
    background: #ecfdf5;
    color: #176F50;
}

.wf-market-results-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    max-width: var(--wf-search-max);
    margin-left: auto;
    margin-right: auto;
}

.wf-market-results-head h2 {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 800;
    color: #0f172a;
}

.search-results-meta {
    max-width: var(--wf-search-max);
    margin-left: auto;
    margin-right: auto;
}

.search-results-meta--fallback {
    margin: 0.5rem auto 0.85rem;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    border: 1px solid #fde68a;
    background: #fffbeb;
    color: #92400e;
    font-size: 0.9rem;
    line-height: 1.45;
}

.wf-market-toolbar-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.wf-market-view-toggle {
    display: inline-flex;
    border: 1px solid var(--wf-green-mid);
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}

.wf-market-view-toggle button {
    padding: 8px 14px;
    border: none;
    background: transparent;
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
}

.wf-market-view-toggle button.is-active {
    background: var(--wf-green);
    color: #fff;
}

.wf-market-sort select {
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid var(--wf-green-mid);
    font-size: 0.85rem;
    font-weight: 600;
    background: #fff;
}

.wf-market-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 20px;
    align-items: start;
    max-width: var(--wf-search-max);
    margin: 0 auto;
}

.wf-market-map-teaser {
    position: sticky;
    top: 88px;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--wf-green-mid);
    background: linear-gradient(145deg, #e8f5f0 0%, #d1fae5 50%, #a7d4c4 100%);
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
}

.wf-market-map-teaser button {
    background: #fff;
    border: 1px solid var(--wf-green);
    border-radius: 999px;
    padding: 10px 18px;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--wf-green-dark);
    cursor: pointer;
}

.wf-market-map-view {
    display: none;
    min-height: 420px;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    background: linear-gradient(160deg, #ecfdf5, #f8fafc);
    padding: 24px;
    text-align: center;
    color: #475569;
}

.wf-market-layout.is-map .wf-market-map-view {
    display: block;
    grid-column: 1 / -1;
}

.wf-market-layout.is-map .wf-market-list-col,
.wf-market-layout.is-map .wf-market-map-teaser {
    display: none;
}

.wf-dropdown-popover {
    position: fixed;
    z-index: 1200;
    margin-top: 0;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid var(--wf-green-mid);
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.12);
    min-width: 200px;
    max-width: min(320px, calc(100vw - 16px));
}

.wf-dropdown-popover--filter {
    min-width: 240px;
    max-width: min(360px, calc(100vw - 16px));
}

.wf-popover-filter-title {
    margin: 0 0 10px;
    font-size: 0.85rem;
    font-weight: 800;
    color: #14532d;
}

.wf-popover-filter-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.wf-popover-filter-grid label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    color: #334155;
    margin: 0;
    text-transform: none;
    letter-spacing: 0;
}

.wf-popover-filter-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}

.wf-popover-filter-actions .portal-btn {
    flex: 1 1 auto;
    min-width: 0;
}

.wf-dropdown-popover[hidden] {
    display: none;
}

.wf-dropdown-popover label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 4px;
}

.wf-dropdown-popover input,
.wf-dropdown-popover select {
    width: 100%;
    margin-bottom: 10px;
    padding: 8px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
}

.wf-filter-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    margin-left: 4px;
    border-radius: 999px;
    background: var(--wf-green);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 800;
}

@media (max-width: 900px) {
    .wf-market-layout {
        grid-template-columns: 1fr;
    }
    .wf-market-map-teaser {
        position: static;
        min-height: 140px;
    }

    #wfMarketSearchBar .wf-search-row--fields {
        grid-template-columns: 1fr 1fr;
    }

    .wf-search-cell--submit {
        grid-column: 1 / -1;
    }
}

@media (max-width: 640px) {
    .wf-search-panel__top,
    .wf-search-panel__bottom {
        padding: 1.1rem 1rem 1rem;
    }

    #wfMarketSearchBar .wf-search-hero {
        flex-wrap: wrap;
    }

    #wfMarketSearchBar .wf-search-field--ai {
        flex: 1 1 100%;
    }

    #wfMarketSearchBar .wf-search-ai-btn {
        flex: 1 1 100%;
        width: 100%;
    }

    #wfMarketSearchBar .wf-search-row--fields {
        grid-template-columns: 1fr;
    }

    .wf-search-more-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .wf-search-save-btn {
        margin-left: 0;
    }

    .wf-market-hero h1 {
        font-size: 1.55rem;
    }
}

/* Kompakt-Panel: Klassik/KI wie Marketing-Homepage */
.wf-search-panel--compact {
    padding: 14px 16px 16px;
}

.wf-search-panel--compact .wf-search-panel__top,
.wf-search-panel--compact .wf-search-unified-kicker,
.wf-search-panel--compact .wf-search-unified-lead {
    display: none !important;
}

.wf-search-panel--compact .wf-search-panel__bottom {
    padding: 0;
    border: none;
    background: transparent;
}

.wf-search-mode-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    padding: 4px;
    margin-bottom: 12px;
    border-radius: 999px;
    background: #eef8f3;
}

.wf-search-mode-tabs [data-search-mode] {
    border: none;
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 700;
    color: #1b3f34;
    background: transparent;
    cursor: pointer;
    font-family: inherit;
}

.wf-search-mode-tabs [data-search-mode].is-active {
    background: #fff;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.wf-search-panel--compact #wfMarketSearchBar .wf-search-hero {
    margin-bottom: 0.65rem;
}

.wf-search-panel--compact .wf-search-field--ai {
    min-height: 2.75rem;
    height: 2.75rem;
}

.wf-search-panel--compact .wf-search-ai-btn {
    min-height: 2.75rem;
    height: 2.75rem;
}

.wf-suche-page .wf-market-hero {
    margin-bottom: 12px;
}

.wf-suche-page .wf-market-hero h1 {
    font-size: clamp(1.35rem, 2.5vw, 1.75rem);
}

.wf-suche-page .wf-market-hero p {
    font-size: 0.92rem;
}
