:root {
    --finder-green: #329900;
    --finder-green-dark: #267300;
    --finder-green-soft: #edf7e7;
    --finder-blue: #0b63c5;
    --finder-ink: #14210f;
    --finder-muted: #5f6b5a;
    --finder-border: #d9e2d3;
    --finder-surface: #ffffff;
    --finder-bg: #f3f7f0;
    --finder-danger: #b42318;
    --finder-danger-soft: #fff1f0;
    --finder-shadow: 0 22px 60px rgba(20, 33, 15, 0.08);
    --finder-radius: 16px;
}

[hidden] {
    display: none !important;
}

.finder-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at 8% 0%, rgba(50, 153, 0, 0.10), transparent 34rem),
        radial-gradient(circle at 100% 22%, rgba(11, 99, 197, 0.07), transparent 30rem),
        var(--finder-bg);
    color: var(--finder-ink);
    line-height: 1.5;
}

.finder-page a {
    text-decoration: none;
}

.finder-header {
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--finder-border);
}

.finder-header__inner {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin: 0 auto;
    max-width: 1180px;
    min-height: 76px;
    padding: 0.65rem 1.25rem;
}

.finder-brand {
    align-items: center;
    color: var(--finder-ink);
    display: inline-flex;
    gap: 0.65rem;
    min-width: 0;
}

.finder-brand__logo {
    display: block;
    height: 38px;
    object-fit: contain;
    width: auto;
}

.finder-brand__logo--small {
    height: 42px;
}

.finder-brand__text {
    border-left: 1px solid var(--finder-border);
    display: flex;
    flex-direction: column;
    line-height: 1.1;
    padding-left: 0.7rem;
}

.finder-brand__text strong {
    color: var(--finder-green);
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.finder-brand__text small {
    color: var(--finder-muted);
    font-size: 0.67rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.finder-login-link {
    border: 1px solid var(--finder-border);
    border-radius: 999px;
    color: var(--finder-ink);
    flex-shrink: 0;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.55rem 1rem;
    transition: border-color 160ms ease, color 160ms ease, background-color 160ms ease;
}

.finder-login-link:hover,
.finder-login-link:focus-visible {
    background: var(--finder-green-soft);
    border-color: var(--finder-green);
    color: var(--finder-green-dark);
}

.finder-main {
    margin: 0 auto;
    max-width: 1180px;
    padding: 0 1.25rem 3rem;
}

.finder-hero {
    margin: 0 auto;
    max-width: 820px;
    padding: 3rem 0 1.6rem;
    text-align: center;
}

.finder-eyebrow {
    color: var(--finder-green-dark);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.finder-hero h1 {
    font-size: clamp(2rem, 5vw, 3.15rem);
    font-weight: 700;
    letter-spacing: -0.035em;
    line-height: 1.08;
    margin-top: 0.45rem;
}

.finder-hero__lead {
    color: var(--finder-muted);
    font-size: 1rem;
    margin: 0.9rem auto 0;
    max-width: 680px;
}

.finder-panel {
    background: var(--finder-surface);
    border: 1px solid var(--finder-border);
    border-radius: 24px;
    box-shadow: var(--finder-shadow);
    margin: 0 auto;
    max-width: 100%;
    padding: 1.7rem;
}

.finder-panel__heading {
    align-items: baseline;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.8rem;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.finder-panel__heading h2 {
    font-size: 1.15rem;
    font-weight: 700;
}

.finder-panel__heading p {
    color: var(--finder-muted);
    font-size: 0.78rem;
}

.finder-form-grid {
    display: grid;
    gap: 1.25rem 1.4rem;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.2fr);
}

.finder-field {
    min-width: 0;
}

.finder-field > label,
.finder-field > legend {
    color: var(--finder-ink);
    display: block;
    font-size: 0.84rem;
    font-weight: 600;
    margin-bottom: 0.45rem;
}

.finder-field > legend {
    float: left;
    width: 100%;
}

.finder-field > legend + * {
    clear: both;
}

.finder-required {
    color: var(--finder-danger);
}

.finder-input,
.finder-select {
    background: var(--finder-surface);
    border: 1px solid var(--finder-border);
    border-radius: 12px;
    color: var(--finder-ink);
    font-family: inherit;
    font-size: 0.92rem;
    height: 50px;
    outline: none;
    padding: 0 0.9rem;
    transition: border-color 160ms ease, box-shadow 160ms ease;
    width: 100%;
}

.finder-input::placeholder {
    color: #8a9585;
}

.finder-input:focus,
.finder-select:focus {
    border-color: var(--finder-green);
    box-shadow: 0 0 0 3px rgba(50, 153, 0, 0.14);
}

.finder-location-row {
    align-items: stretch;
    display: flex;
    gap: 0.55rem;
}

.finder-location-row .finder-input {
    flex: 1 1 auto;
    min-width: 0;
}

.finder-location-button {
    align-items: center;
    background: transparent;
    border: 0;
    color: var(--finder-green-dark);
    cursor: pointer;
    display: inline-flex;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    gap: 0.4rem;
    margin-top: 0.6rem;
    padding: 0;
    text-align: left;
}

.finder-location-button:hover,
.finder-location-button:focus-visible {
    text-decoration: underline;
}

.finder-location-button:disabled {
    cursor: wait;
    opacity: 0.65;
}

.finder-location-button__icon {
    align-items: center;
    display: inline-flex;
}

.finder-hint {
    color: var(--finder-muted);
    font-size: 0.76rem;
    margin-top: 0.4rem;
}

.finder-error {
    background: var(--finder-danger-soft);
    border-left: 3px solid var(--finder-danger);
    border-radius: 7px;
    color: var(--finder-danger);
    font-size: 0.79rem;
    margin-top: 0.45rem;
    padding: 0.45rem 0.6rem;
}

.finder-selected {
    background: var(--finder-green-soft);
    border: 1px solid #cfe8c0;
    border-radius: 9px;
    color: #245f00;
    font-size: 0.79rem;
    margin-top: 0.55rem;
    overflow-wrap: anywhere;
    padding: 0.5rem 0.65rem;
}

.finder-suggestions {
    background: var(--finder-surface);
    border: 1px solid var(--finder-border);
    border-radius: 12px;
    box-shadow: 0 14px 30px rgba(20, 33, 15, 0.10);
    list-style: none;
    margin-top: 0.55rem;
    max-height: 240px;
    overflow-y: auto;
}

.finder-suggestion {
    background: transparent;
    border: 0;
    border-bottom: 1px solid #edf1ea;
    color: var(--finder-ink);
    cursor: pointer;
    display: block;
    font-family: inherit;
    font-size: 0.82rem;
    line-height: 1.4;
    padding: 0.7rem 0.8rem;
    text-align: left;
    width: 100%;
}

.finder-suggestions li:last-child .finder-suggestion {
    border-bottom: 0;
}

.finder-suggestion:hover,
.finder-suggestion:focus-visible {
    background: var(--finder-green-soft);
    outline: none;
}

.finder-radius {
    border: 0;
    grid-column: 1 / -1;
    margin: 0;
    min-width: 0;
    padding: 0;
}

.finder-radius__options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.finder-chip {
    cursor: pointer;
    display: inline-flex;
    position: relative;
}

.finder-chip input {
    height: 1px;
    opacity: 0;
    position: absolute;
    width: 1px;
}

.finder-chip span {
    background: var(--finder-surface);
    border: 1px solid var(--finder-border);
    border-radius: 999px;
    color: var(--finder-ink);
    font-size: 0.82rem;
    font-weight: 600;
    min-width: 66px;
    padding: 0.52rem 0.9rem;
    text-align: center;
    transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.finder-chip:hover span {
    border-color: var(--finder-green);
}

.finder-chip input:checked + span {
    background: var(--finder-green);
    border-color: var(--finder-green);
    box-shadow: 0 6px 14px rgba(50, 153, 0, 0.22);
    color: #fff;
}

.finder-chip input:focus-visible + span {
    outline: 3px solid rgba(50, 153, 0, 0.28);
    outline-offset: 2px;
}

.finder-alert {
    background: var(--finder-danger-soft);
    border: 1px solid #f2c5c1;
    border-radius: 10px;
    color: var(--finder-danger);
    font-size: 0.84rem;
    margin-top: 1rem;
    padding: 0.7rem 0.85rem;
}

.finder-button {
    align-items: center;
    border: 1px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    display: inline-flex;
    font-family: inherit;
    font-size: 0.86rem;
    font-weight: 600;
    gap: 0.45rem;
    justify-content: center;
    line-height: 1.2;
    padding: 0.7rem 1.1rem;
    transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.finder-button:disabled {
    cursor: wait;
    opacity: 0.7;
}

.finder-button--primary {
    background: var(--finder-green);
    color: #fff;
}

.finder-button--primary:hover,
.finder-button--primary:focus-visible {
    background: var(--finder-green-dark);
    box-shadow: 0 8px 18px rgba(50, 153, 0, 0.24);
}

.finder-button--secondary {
    background: var(--finder-surface);
    border-color: var(--finder-border);
    color: var(--finder-ink);
    flex-shrink: 0;
}

.finder-location-row .finder-button--secondary {
    height: 50px;
}

.finder-button--secondary:hover,
.finder-button--secondary:focus-visible {
    background: var(--finder-green-soft);
    border-color: var(--finder-green);
    color: var(--finder-green-dark);
}

.finder-button--ghost {
    background: transparent;
    border-color: var(--finder-border);
    color: var(--finder-ink);
}

.finder-button--ghost:hover,
.finder-button--ghost:focus-visible {
    background: var(--finder-green-soft);
    border-color: var(--finder-green);
    color: var(--finder-green-dark);
}

.finder-button--small {
    border-radius: 9px;
    font-size: 0.78rem;
    padding: 0.52rem 0.8rem;
}

.finder-submit {
    font-size: 0.95rem;
    height: 52px;
    margin-top: 1.25rem;
    width: 100%;
}

.finder-button__spinner {
    animation: finder-spin 700ms linear infinite;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    border-top-color: #fff;
    display: none;
    height: 15px;
    width: 15px;
}

.finder-submit.is-loading .finder-button__spinner {
    display: inline-block;
}

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

.finder-results {
    margin-top: 2.6rem;
}

.finder-results__header {
    align-items: flex-end;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.finder-results__header h2 {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-top: 0.15rem;
}

.finder-results__count {
    color: var(--finder-muted);
    font-size: 0.9rem;
    margin-top: 0.3rem;
}

.finder-results__grid {
    align-items: start;
    display: grid;
    gap: 1.25rem;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
}

.finder-list-column {
    min-width: 0;
}

.finder-list {
    display: grid;
    gap: 0.85rem;
    list-style: none;
}

.finder-card {
    background: var(--finder-surface);
    border: 1px solid var(--finder-border);
    border-radius: var(--finder-radius);
    box-shadow: 0 10px 26px rgba(20, 33, 15, 0.05);
    padding: 1rem 1.1rem;
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.finder-card--active {
    border-color: var(--finder-green);
    box-shadow: 0 0 0 3px rgba(50, 153, 0, 0.14), 0 12px 28px rgba(20, 33, 15, 0.08);
    transform: translateY(-1px);
}

.finder-card__top {
    align-items: flex-start;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
}

.finder-card__name {
    font-size: 0.98rem;
    font-weight: 700;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.finder-card__distance {
    background: var(--finder-green-soft);
    border-radius: 999px;
    color: var(--finder-green-dark);
    flex-shrink: 0;
    font-size: 0.73rem;
    font-weight: 700;
    padding: 0.3rem 0.55rem;
    white-space: nowrap;
}

.finder-card__address {
    color: var(--finder-muted);
    font-size: 0.82rem;
    line-height: 1.5;
    margin-top: 0.45rem;
    overflow-wrap: anywhere;
}

.finder-card__meta {
    color: var(--finder-muted);
    font-size: 0.79rem;
    line-height: 1.5;
    margin-top: 0.35rem;
    overflow-wrap: anywhere;
}

.finder-card__meta strong {
    color: var(--finder-ink);
    font-weight: 600;
}

.finder-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.8rem;
}

.finder-empty {
    background: var(--finder-surface);
    border: 1px dashed #c7d4c0;
    border-radius: var(--finder-radius);
    padding: 2.4rem 1.4rem;
    text-align: center;
}

.finder-empty__icon {
    align-items: center;
    background: var(--finder-green-soft);
    border-radius: 50%;
    color: var(--finder-green-dark);
    display: inline-flex;
    height: 62px;
    justify-content: center;
    width: 62px;
}

.finder-empty h3 {
    font-size: 1.02rem;
    font-weight: 700;
    margin-top: 0.8rem;
}

.finder-empty p {
    color: var(--finder-muted);
    font-size: 0.84rem;
    margin: 0.45rem auto 0;
    max-width: 34rem;
}

.finder-empty__hint {
    font-size: 0.78rem !important;
}

.finder-map-column {
    min-width: 0;
    position: sticky;
    top: 1rem;
}

.finder-map {
    background: #e8eee4;
    border: 1px solid var(--finder-border);
    border-radius: 20px;
    height: 600px;
    overflow: hidden;
    width: 100%;
    z-index: 0;
}

.finder-map__legend {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1rem;
    margin-bottom: 0.55rem;
}

.finder-map__legend span {
    align-items: center;
    color: var(--finder-muted);
    display: inline-flex;
    font-size: 0.75rem;
    gap: 0.35rem;
}

.finder-legend-dot {
    border: 2px solid #fff;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
    display: inline-block;
    height: 11px;
    width: 11px;
}

.finder-legend-dot--origin {
    background: var(--finder-blue);
}

.finder-legend-dot--facility {
    background: var(--finder-green);
}

.finder-map__hint {
    color: var(--finder-muted);
    font-size: 0.68rem;
    margin-top: 0.4rem;
}

.finder-footer {
    border-top: 1px solid var(--finder-border);
    color: var(--finder-muted);
    display: flex;
    flex-wrap: wrap;
    font-size: 0.73rem;
    gap: 0.35rem 1.5rem;
    justify-content: space-between;
    margin: 1rem auto 0;
    max-width: 1180px;
    padding: 1.4rem 1.25rem 2.5rem;
}

.finder-footer strong {
    color: var(--finder-ink);
}

/* Select2: match the finder's 50px controls and green focus ring.
   base.css forces .select2-selection to 40px with !important, so the height
   override here must also be important; padding resets the legacy 4px top
   offset. */
.select2-container {
    width: 100% !important;
}

.select2-container--default .select2-selection--single {
    background: var(--finder-surface);
    border: 1px solid var(--finder-border);
    border-radius: 12px;
    height: 50px !important;
    padding: 0;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: var(--finder-ink);
    font-size: 0.92rem;
    line-height: 48px;
    padding-left: 0.9rem;
    padding-right: 2.2rem;
}

.select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: #8a9585;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 48px;
    right: 0.6rem;
}

.select2-container--default .select2-selection--single .select2-selection__clear {
    color: var(--finder-muted);
    font-size: 1.1rem;
    margin-right: 1.55rem;
}

.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--single {
    border-color: var(--finder-green);
    box-shadow: 0 0 0 3px rgba(50, 153, 0, 0.14);
}

.select2-dropdown {
    border: 1px solid var(--finder-border);
    border-radius: 12px;
    box-shadow: 0 16px 36px rgba(20, 33, 15, 0.14);
    overflow: hidden;
    z-index: 1051;
}

.select2-container--default .select2-results__option {
    font-size: 0.85rem;
    line-height: 1.4;
    padding: 0.6rem 0.8rem;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background: var(--finder-green);
    color: #fff;
}

.select2-search--dropdown {
    padding: 0.5rem;
}

.select2-search--dropdown .select2-search__field {
    border: 1px solid var(--finder-border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.85rem;
    height: 50px;
    padding: 0.5rem 0.6rem;
}

/* Leaflet: pins and popups. */
.leaflet-container {
    font-family: inherit;
}

.finder-pin-wrapper {
    background: transparent;
    border: 0;
}

.finder-pin {
    background: var(--finder-green);
    border: 3px solid #fff;
    border-radius: 50% 50% 50% 0;
    box-shadow: 0 6px 14px rgba(20, 33, 15, 0.32);
    display: block;
    height: 30px;
    position: relative;
    transform: rotate(-45deg);
    transition: background-color 160ms ease, transform 160ms ease;
    width: 30px;
}

.finder-pin__dot {
    background: #fff;
    border-radius: 50%;
    height: 8px;
    left: 50%;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
}

.finder-pin--origin {
    background: var(--finder-blue);
}

.finder-pin-wrapper--active .finder-pin {
    background: #e47600;
    transform: rotate(-45deg) scale(1.18);
}

.leaflet-popup-content-wrapper {
    border-radius: 14px;
    box-shadow: 0 18px 40px rgba(20, 33, 15, 0.22);
}

.leaflet-popup-content {
    margin: 0.9rem 1rem;
    min-width: 210px;
}

.finder-popup__title {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.finder-popup__distance {
    color: var(--finder-green-dark);
    font-size: 0.75rem;
    font-weight: 700;
    margin-top: 0.15rem;
}

.finder-popup__line {
    color: var(--finder-muted);
    font-size: 0.76rem;
    line-height: 1.45;
    margin-top: 0.35rem;
    overflow-wrap: anywhere;
}

.finder-popup__line strong {
    color: var(--finder-ink);
    font-weight: 600;
}

.finder-popup__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.7rem;
}

/* Leaflet's `.leaflet-container a` color would otherwise win over the
   primary button's white text inside map popups. */
.leaflet-container .finder-button--primary {
    color: #fff;
}

@media (max-width: 900px) {
    .finder-form-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .finder-radius {
        grid-column: auto;
    }

    .finder-results__grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .finder-map-column {
        position: static;
    }

    .finder-map {
        height: 440px;
    }
}

@media (max-width: 600px) {
    .finder-header__inner {
        min-height: 68px;
        padding: 0.55rem 1rem;
    }

    .finder-brand__logo {
        height: 32px;
    }

    .finder-brand__logo--small {
        display: none;
    }

    .finder-brand__text small {
        letter-spacing: 0.08em;
    }

    .finder-login-link {
        font-size: 0.72rem;
        padding: 0.45rem 0.75rem;
    }

    .finder-main {
        padding: 0 1rem 2.5rem;
    }

    .finder-hero {
        padding: 2.1rem 0 1.2rem;
    }

    .finder-hero__lead {
        font-size: 0.9rem;
    }

    .finder-panel {
        border-radius: 18px;
        padding: 1.1rem;
    }

    .finder-location-row {
        flex-direction: column;
    }

    .finder-location-row .finder-button--secondary {
        height: 44px;
    }

    .finder-results__header {
        align-items: flex-start;
        flex-direction: column;
    }

    .finder-map {
        height: 360px;
    }

    .finder-footer {
        flex-direction: column;
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .finder-page *,
    .finder-page *::before,
    .finder-page *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
