.vario-partner-finder {
    margin: 2rem auto 1.5rem;
}


/* ---------------------------------------------------------
   Filter
--------------------------------------------------------- */

.vpf-filter-card {
    display: grid;
    grid-template-columns:
        1.2fr
        1.35fr
        1fr
        1fr;

    background: var(--bg-white);

    border: var(--card-border);
    border-radius: 18px;

    box-shadow: var(--card-shadow);

    overflow: hidden;
}

.vpf-field {
    min-width: 0;

    padding: 18px 22px;
}

.vpf-field + .vpf-field {
    border-left: 1px solid var(--border-line);
}

.vpf-field label,
.vpf-field legend {
    display: block;

    margin: 0 0 8px;
    padding: 0;

    color: var(--text-body);

    font-size: 0.76rem;
    font-weight: 800;

    letter-spacing: 0.06em;
    text-transform: uppercase;
}


/* ---------------------------------------------------------
   Standort / PLZ / Ort
--------------------------------------------------------- */

.vpf-location-control {
    display: flex;
    align-items: center;

    gap: 10px;

    min-height: 46px;

    padding-left: 13px;

    background: var(--bg-white);

    border: var(--card-border);
    border-radius: 11px;
}

.vpf-location-control > i {
    color: var(--color-greeny-deep);
}

.vpf-location-control input {
    flex: 1;

    min-width: 0;

    padding: 10px 13px 10px 0;

    background: transparent;

    border: 0;
    outline: 0;

    color: var(--text-body);
}

.vpf-location-control input::placeholder {
    color: var(--text-disabled);
}


/* ---------------------------------------------------------
   Umkreis
--------------------------------------------------------- */

.vpf-segmented {
    display: flex;

    gap: 2px;

    min-width: 0;

    padding: 4px;

    background: var(--color-greeny-tint);

    border-radius: 11px;
}

.vpf-segmented button {
    flex: 1;

    min-width: 0;

    padding: 9px 6px;

    background: transparent;

    border: 0;
    border-radius: 8px;

    color: var(--color-greeny-dark);

    font-size: 0.9rem;
    font-weight: 600;

    cursor: pointer;

    white-space: nowrap;

    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        box-shadow 0.2s ease;
}

.vpf-segmented button:hover {
    background: var(--bg-white);
}

.vpf-segmented button.is-active {
    background: var(--bg-white);

    color: var(--color-greeny-dark);

    box-shadow: var(--bs-box-shadow-sm);
}


/* ---------------------------------------------------------
   Selects
--------------------------------------------------------- */

.vpf-field select {
    width: 100%;
    height: 46px;

    padding: 0 12px;

    background: var(--bg-white);

    border: var(--card-border);
    border-radius: 11px;

    color: var(--text-body);
}


/* ---------------------------------------------------------
   Toolbar
--------------------------------------------------------- */

.vpf-toolbar {
    display: flex;
    align-items: center;

    gap: 16px;

    margin: 18px 2px 10px;
}

.vpf-toolbar strong {
    color: var(--text-headline);

    font-size: 0.82rem;

    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.vpf-reset {
    margin-left: auto;

    padding: 0;

    background: transparent;

    border: 0;

    color: var(--color-greeny-dark);

    font-weight: 700;

    cursor: pointer;

    transition: color 0.2s ease;
}

.vpf-reset:hover {
    color: var(--color-greeny-dark);
}

.vpf-status {
    min-height: 1.3em;

    margin: 0 2px 12px;

    color: var(--text-secondary);

    font-size: 0.9rem;
}

.vpf-status.is-error {
    color: var(--color-berry);
}


/* ---------------------------------------------------------
   Layout
--------------------------------------------------------- */

.vpf-layout {
    display: grid;

    grid-template-columns:
        minmax(300px, 35%)
        1fr;

    gap: 28px;

    align-items: start;
}


/* ---------------------------------------------------------
   Ergebnisliste
--------------------------------------------------------- */

.vpf-results {
    height: 620px;

    overflow-y: auto;
    overflow-x: hidden;

    padding:
        4px
        14px
        34px
        4px;

    border-radius: 16px;

    scrollbar-gutter: stable;

    scrollbar-color:
        var(--bg-card)
        transparent;

    -webkit-mask-image:
        linear-gradient(
            to bottom,
            #000 0,
            #000 calc(100% - 45px),
            transparent 100%
        );

    mask-image:
        linear-gradient(
            to bottom,
            #000 0,
            #000 calc(100% - 45px),
            transparent 100%
        );
}

.vpf-results::-webkit-scrollbar {
    width: 7px;
}

.vpf-results::-webkit-scrollbar-track {
    background: transparent;
}

.vpf-results::-webkit-scrollbar-thumb {
    background: var(--bg-card);

    border-radius: 20px;
}


/* ---------------------------------------------------------
   Partner Card
--------------------------------------------------------- */

.vpf-card {
    display: flex;

    gap: 14px;

    margin-bottom: 10px;

    padding: 18px;

    background: var(--bg-white);

    border: var(--card-border);
    border-radius: 14px;

    box-shadow: 0 0 11px #0000000f;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.vpf-card:last-child {
    margin-bottom: 0;
}

.vpf-card.is-map-active {
    border-color: var(--color-greeny);

    box-shadow: var(--card-shadow-hover);
}


/* ---------------------------------------------------------
   Logo
--------------------------------------------------------- */

.vpf-card-logo {
    display: grid;

    place-items: center;

    width: 58px;
    height: 58px;

    flex: 0 0 58px;

    padding: 7px;

    background: var(--bg-white);

    border: var(--card-border);
    border-radius: 10px;
}

.vpf-card-logo img {
    max-width: 100%;
    max-height: 100%;

    object-fit: contain;
}


/* ---------------------------------------------------------
   Card Inhalt
--------------------------------------------------------- */

.vpf-card-body {
    flex: 1;

    min-width: 0;
}

.vpf-card h3 {
    margin: 0 0 5px;

    font-size: 1rem;
}

.vpf-card h3 a {
    color: var(--text-headline);

    text-decoration: none;

    transition: color 0.2s ease;
}

.vpf-card-location {
    margin: 0 0 15px;

    color: var(--text-secondary);

    font-size: 0.84rem;
}

.vpf-card-description {
    margin: 0 0 11px;

    color: var(--text-body);

    font-size: 0.89rem;
    line-height: 1.55;
}


/* ---------------------------------------------------------
   Mehrere Standorte in Partner-Card
--------------------------------------------------------- */

.vpf-card-locations {
    display: flex;
    flex-direction: column;
    align-items: flex-start;

    gap: 4px;

    margin: 0.5rem 0 1rem;

    font-size: 0.84rem;
    line-height: 1.4;
}

.vpf-card-locations-label {
    color: var(--text-secondary);
}

.vpf-card-locations-list {
    display: flex;
    align-items: center;
    flex-wrap: wrap;

    gap: 4px;
}

button.vpf-card-location-link.vpf-card-location-item {
    display: inline-flex;
    align-items: center;

    gap: 0.25rem;

    margin: 0;

    padding: 0.25rem 0.5rem;

    background: #8c29521a;

    border: 0;
    border-radius: 4px;

    color: var(--color-berry);

    font: inherit;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.2;

    text-decoration: none;

    white-space: nowrap;

    cursor: pointer;

    transition:
        background-color 0.15s ease,
        color 0.15s ease;
}

button.vpf-card-location-link.vpf-card-location-item:hover {
    background: var(--color-berry);

    color: #fff;

    text-decoration: none;
}


/* ---------------------------------------------------------
   Card Footer
--------------------------------------------------------- */

.vpf-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 10px;

    font-size: 0.82rem;
}

.vpf-distance {
    color: var(--text-secondary);
}

.vpf-card-footer > a {
    display: inline-block;

    color: var(--color-berry);

    font-size: 0.95rem;
    font-weight: 500;

    text-decoration: none;
}

.vpf-card-footer > a::after {
    content: "\2192";

    display: inline-block;

    margin-left: 4px;

    transition: transform 0.2s ease;
}

.vpf-card-footer > a:hover {
    color: var(--color-berry);
}

.vpf-card-footer > a:hover::after {
    transform: translateX(4px);
}


/* ---------------------------------------------------------
   Karte
--------------------------------------------------------- */

.vpf-map-wrap {
    position: sticky;

    top: 100px;
}

.vpf-map {
    position: relative;

    width: 100%;
    height: 620px;

    overflow: hidden;

    background: var(--bg-light);
    background-image: var(--vpf-map-image);
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;

    border: var(--card-border);
    border-radius: 18px;
}


/* ---------------------------------------------------------
   Marker-Layer
--------------------------------------------------------- */

.vpf-map-marker-layer {
    position: absolute;

    inset: 0;

    z-index: 5;

    overflow: visible;

    pointer-events: none;

    isolation: isolate;
}


/* ---------------------------------------------------------
   Partner Standort-Pin
--------------------------------------------------------- */

.vpf-map-marker {
    position: absolute;

    width: 34px;
    height: 42px;

    margin: 0;
    padding: 0;

    background: transparent;

    border: 0;

    transform: translate(-50%, -100%);

    cursor: pointer;

    pointer-events: auto;

    z-index: 10;
}

.vpf-map-marker:hover,
.vpf-map-marker:focus,
.vpf-map-marker:focus-within,
.vpf-map-marker.is-active {
    z-index: 200;
}

.vpf-map-marker-flag {
    position: absolute;

    left: 50%;
    bottom: 0;

    width: 30px;
    height: 30px;

    background: var(--color-greeny-dark);

    border: 3px solid var(--bg-white);
    border-radius: 50% 50% 50% 0;

    box-shadow: var(--card-shadow);

    transform:
        translateX(-50%)
        rotate(-45deg);

    transform-origin: center;

    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease,
        background-color 0.15s ease;
}

.vpf-map-marker-flag::before {
    content: "";

    position: absolute;

    top: 50%;
    left: 50%;

    width: 9px;
    height: 9px;

    background: var(--color-greeny-pale);

    border-radius: 50%;

    transform:
        translate(-50%, -50%);
}


/* ---------------------------------------------------------
   Marker Hover / aktive Card
--------------------------------------------------------- */

.vpf-map-marker:hover .vpf-map-marker-flag,
.vpf-map-marker:focus .vpf-map-marker-flag,
.vpf-map-marker:focus-within .vpf-map-marker-flag,
.vpf-map-marker.is-active .vpf-map-marker-flag {
    background: var(--color-greeny-dark);

    transform:
        translateX(-50%)
        rotate(-45deg)
        scale(1.08);

    box-shadow: var(--card-shadow-hover);
}


/* ---------------------------------------------------------
   Tooltip
--------------------------------------------------------- */

.vpf-map-marker-tooltip {
    position: absolute;

    left: 50%;
    bottom: calc(100% - 5px);

    width: max-content;

    min-width: 150px;
    max-width: 220px;

    padding: 0;

    background: var(--bg-white);

    border: var(--card-border);
    border-radius: 10px;

    box-shadow: var(--card-shadow-hover);

    opacity: 0;
    visibility: hidden;

    transform:
        translateX(-50%)
        translateY(4px);

    transition:
        opacity 0.15s ease,
        transform 0.15s ease,
        visibility 0.15s ease;

    pointer-events: auto;

    z-index: 210;
}

.vpf-map-marker:hover .vpf-map-marker-tooltip,
.vpf-map-marker:focus-visible .vpf-map-marker-tooltip,
.vpf-map-marker:focus-within .vpf-map-marker-tooltip,
.vpf-map-marker.is-active .vpf-map-marker-tooltip {
    opacity: 1;
    visibility: visible;

    transform:
        translateX(-50%)
        translateY(0);
}


/* ---------------------------------------------------------
   Tooltip Link
--------------------------------------------------------- */

.vpf-map-marker-tooltip-link {
    display: flex;
    flex-direction: column;

    gap: 2px;

    padding: 10px 12px;

    color: var(--text-body);

    text-decoration: none;

    border-radius: inherit;
}

.vpf-map-marker-tooltip-link strong {
    display: block;

    color: var(--text-headline);

    font-size: 13px;
    line-height: 1.3;
}

.vpf-map-marker-tooltip-link span {
    display: block;

    margin-top: 2px;

    color: var(--text-secondary);

    font-size: 12px;
    line-height: 1.3;
}

.vpf-map-marker-tooltip-link:hover strong {
    color: var(--text-body);
}


/* ---------------------------------------------------------
   Suchstandort aus PLZ / Ort
--------------------------------------------------------- */

.vpf-map-search-marker {
    position: absolute;

    width: 20px;
    height: 20px;

    background: var(--color-greeny);

    border: 3px solid var(--bg-white);
    border-radius: 50%;

    box-shadow: var(--card-shadow);

    transform:
        translate(-50%, -50%);

    pointer-events: none;

    z-index: 20;
}

.vpf-map-search-marker::after {
    content: "";

    position: absolute;

    inset: 4px;

    background: var(--color-greeny-pale);

    border-radius: 50%;
}


/* ---------------------------------------------------------
   Empty State
--------------------------------------------------------- */

.vpf-empty {
    padding: 35px;

    background: var(--bg-light);

    border: 1px dashed var(--border-line);
    border-radius: 14px;

    color: var(--text-body);
}

.vpf-empty strong {
    color: var(--text-headline);
}


/* ---------------------------------------------------------
   Mobile Tabs
--------------------------------------------------------- */

.vpf-mobile-tabs {
    display: none;
}


/* ---------------------------------------------------------
   Tablet
--------------------------------------------------------- */

@media (max-width: 1157px) {

    .vpf-filter-card {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .vpf-field + .vpf-field {
        border-left: 0;
    }

    .vpf-field:nth-child(2n) {
        border-left:
            1px solid
            var(--border-line);
    }

    .vpf-field:nth-child(n + 3) {
        border-top:
            1px solid
            var(--border-line);
    }
}


/* ---------------------------------------------------------
   Mobile
--------------------------------------------------------- */

@media (max-width: 700px) {

    .vpf-filter-card {
        grid-template-columns: 1fr;
    }

    .vpf-field:nth-child(2n) {
        border-left: 0;
    }

    .vpf-field:nth-child(n + 3) {
        border-top: 0;
    }

    .vpf-field + .vpf-field {
        border-left: 0;

        border-top:
            1px solid
            var(--border-line);
    }

    .vpf-layout {
        grid-template-columns: 1fr;
    }

    .vpf-results,
    .vpf-map {
        height: 520px;
    }

    .vpf-map-wrap {
        position: static;
    }

    .vpf-toolbar {
        flex-wrap: wrap;
    }

    .vpf-reset {
        display: inline-flex;

        margin-left: auto;
    }

    .vpf-mobile-tabs {
        display: flex;

        width: 100%;

        margin-top: 3px;

        padding: 3px;

        background: var(--bg-base);

        border-radius: 9px;
    }

    .vpf-mobile-tabs button {
        flex: 1;

        padding: 7px 12px;

        background: transparent;

        border: 0;
        border-radius: 7px;

        color: var(--text-body);

        font-weight: 700;

        cursor: pointer;

        transition:
            background-color 0.2s ease,
            color 0.2s ease,
            box-shadow 0.2s ease;
    }

    .vpf-mobile-tabs button.is-active {
        background: var(--bg-white);

        color: var(--color-greeny-deep);

        box-shadow: var(--bs-box-shadow-sm);
    }

    .vpf-layout[data-view="list"] .vpf-map-wrap {
        display: none;
    }

    .vpf-layout[data-view="map"] .vpf-results {
        display: none;
    }
}


/* ---------------------------------------------------------
   Small Mobile
--------------------------------------------------------- */

@media (max-width: 560px) {

    .vpf-field {
        padding: 16px;
    }

    .vpf-segmented {
        overflow-x: auto;
    }

    .vpf-segmented button {
        min-width: 64px;
    }

    .vpf-card {
        padding: 15px;
    }

    .vpf-card-logo {
        display: none;
    }

    .vpf-results,
    .vpf-map {
        height: 450px;
    }

    .vpf-map-marker {
        width: 30px;
        height: 38px;
    }

    .vpf-map-marker-flag {
        width: 27px;
        height: 27px;
    }

    .vpf-map-marker-tooltip {
        min-width: 130px;
        max-width: 180px;
    }
}



/* ---------------------------------------------------------
   Umkreis deaktiviert ohne Standort
--------------------------------------------------------- */

.vpf-segmented {
    position: relative;
}

.vpf-segmented button:disabled {
    opacity: 0.35;

    cursor: not-allowed;
}

.vpf-segmented button:disabled:hover {
    background: transparent;
}


/*
 * Hinweis, solange kein Standort gesucht wurde.
 */
.vpf-segmented.is-disabled::after {
    content: "Bitte zuerst PLZ oder Ort eingeben.";

    position: absolute;

    left: 50%;
    bottom: calc(100% + 8px);

    z-index: 20;

    width: max-content;
    max-width: 230px;

    padding: 7px 10px;

    background: var(--text-headline);

    border-radius: 7px;

    color: var(--bg-white);

    font-size: 0.76rem;
    font-weight: 500;
    line-height: 1.3;

    opacity: 0;
    visibility: hidden;

    transform:
        translateX(-50%)
        translateY(4px);

    transition:
        opacity 0.15s ease,
        visibility 0.15s ease,
        transform 0.15s ease;

    pointer-events: none;
}

.vpf-segmented.is-disabled:hover::after {
    opacity: 1;
    visibility: visible;

    transform:
        translateX(-50%)
        translateY(0);
}