/* ── ALP Location Finder ─────────────────────────────────────────────────── */

#alf-locator {
    display: flex;
    width: 100%;
    height: 600px;
    overflow: hidden;
}

/* ── Sidebar ─────────────────────────────────────────────────────────────── */

#alf-sidebar {
    width: 380px;
    min-width: 380px;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-right: 1px solid #e5e7eb;
}

#alf-search {
    padding: 24px 20px 16px;
    border-bottom: 1px solid #e5e7eb;
}

#alf-search h2 {
    margin: 0 0 14px 0;
}

#alf-search-form {
    display: flex;
    gap: 0;
    position: relative;
}

#alf-search-input {
    flex: 1;
    padding: 11px 14px;
    border: 1.5px solid #d1d5db;
    border-radius: 8px 0 0 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.15s;
    background: #f9fafb;
}

#alf-search-input:focus {
    border-color: #125E8F;
    background: #fff;
}

#alf-search-btn {
    padding: 0 14px;
    background: #125E8F;
    color: #fff;
    border: none;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: background 0.15s;
}

#alf-search-btn:hover {
    background: #0e4d75;
}

#alf-search-options {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

#alf-geolocate-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 12px;
    font-size: 12.5px;
    font-weight: 500;
    color: #125E8F;
    background: #e8f2f8;
    border: 1px solid #c5dde9;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
    width:50%;
}

#alf-geolocate-btn:hover {
    background: #d4e8f3;
    border-color: #125E8F;
}

#alf-radius {
    padding: 7px 10px;
    font-size: 12.5px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    color: #374151;
    cursor: pointer;
    width:50%;
}

#alf-search-status {
    margin-top: 8px;
    font-size: 12.5px;
    color: #6b7280;
    min-height: 18px;
}

#alf-search-status.error {
    color: #dc2626;
}

/* ── Results list ────────────────────────────────────────────────────────── */

#alf-results {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

#alf-results-list {
    padding: 8px 0;
}

.alf-card {
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background 0.12s;
    position: relative;
}

.alf-card:hover {
    background: #f7fafc;
}

.alf-card.active {
    background: #e8f2f8;
    border-left: 3px solid #125E8F;
    padding-left: 17px;
}

.alf-card-name {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 4px 0;
    line-height: 1.3;
}

.alf-card-address {
    font-size: 13px;
    color: #6b7280;
    margin: 0 0 3px 0;
    line-height: 1.4;
}

.alf-card-phone {
    font-size: 13px;
    color: #125E8F;
    margin: 0;
    font-weight: 500;
}

.alf-card-phone a {
    color: inherit;
    text-decoration: none;
}

.alf-card-phone a:hover {
    text-decoration: underline;
}

.alf-card-distance {
    position: absolute;
    top: 16px;
    right: 20px;
    font-size: 12px;
    font-weight: 600;
    color: #125E8F;
    background: #e8f2f8;
    padding: 3px 8px;
    border-radius: 10px;
}

.alf-card-directions {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 6px;
    font-size: 12px;
    color: #125E8F;
    text-decoration: none;
    font-weight: 500;
}

.alf-card-directions:hover {
    text-decoration: underline;
}

.alf-no-results {
    padding: 40px 20px;
    text-align: center;
    color: #9ca3af;
    font-size: 14px;
}

.alf-results-count {
    padding: 10px 20px;
    font-size: 12px;
    color: #9ca3af;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid #f0f0f0;
}

/* ── Map ─────────────────────────────────────────────────────────────────── */

#alf-map {
    flex: 1;
    min-height: 100%;
}

/* ── InfoWindow ──────────────────────────────────────────────────────────── */

.alf-info {
    padding: 4px 2px;
    min-width: 200px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.alf-info-name {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 6px 0;
}

.alf-info-address {
    font-size: 13px;
    color: #6b7280;
    margin: 0 0 4px 0;
    line-height: 1.4;
}

.alf-info-phone {
    font-size: 13px;
    margin: 0 0 8px 0;
}

.alf-info-phone a {
    color: #125E8F;
    text-decoration: none;
    font-weight: 500;
}

.alf-info-directions {
    display: inline-block;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    background: #125E8F;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.15s;
}

.alf-info-directions:hover {
    background: #0e4d75;
    color: #fff;
}

/* ── Map toggle button (mobile only) ─────────────────────────────────────── */

#alf-map-toggle {
    display: none;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */

@media (max-width: 860px) {
    #alf-locator {
        flex-direction: column;
        height: auto;
        border-radius: 8px;
    }

    #alf-sidebar {
        width: 100%;
        min-width: 100%;
        border-right: none;
    }

    /* Map hidden by default on mobile — reset flex properties so height:0 actually works */
    #alf-map {
        flex: none;
        min-height: 0;
        height: 0;
        overflow: hidden;
        width: 100%;
        transition: height 0.3s ease;
    }

    #alf-map.alf-map-visible {
        height: 400px;
    }

    #alf-results {
        max-height: 400px;
    }

    /* Toggle button visible on mobile */
    #alf-map-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        width: 100%;
        padding: 13px;
        background: #125E8F;
        color: #fff;
        font-size: 14px;
        font-weight: 600;
        border: none;
        cursor: pointer;
        transition: background 0.15s;
        letter-spacing: 0.01em;
    }

    #alf-map-toggle:hover {
        background: #0e4d75;
    }

    #alf-map-toggle svg {
        flex-shrink: 0;
    }
}
