:root {
    --ink: #e5e7eb;
    --sub: #9ca3af;
    --line: rgba(148,163,184,.18);
    --glass: rgba(2,6,23,.55);
    --glass2: rgba(15,23,42,.72);
    --shadow: 0 20px 70px rgba(0,0,0,.55);
    --radius: 24px;
    --brand1: #38bdf8;
    --brand2: #818cf8;
}

html, body {
    height: 100%;
}

body {
    margin: 0;
    font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
    background: radial-gradient(circle at 10% 5%, rgba(56,189,248,.18), transparent 45%), radial-gradient(circle at 90% 90%, rgba(129,140,248,.16), transparent 55%), #020617;
    color: var(--ink);
    overflow: hidden;
    font-size: 2vh;
}

/* FIX: make shell a flex container + allow children to size correctly */
.sl-shell {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 100vh;
    display: flex; /* FIX */
    overflow: hidden; /* FIX */
}

.sl-bg-orbs {
    position: absolute;
    inset: -20%;
    background: radial-gradient(circle at 20% 20%, rgba(56,189,248,.20), transparent 40%), radial-gradient(circle at 70% 30%, rgba(129,140,248,.18), transparent 45%), radial-gradient(circle at 55% 75%, rgba(34,211,238,.12), transparent 55%);
    filter: blur(30px);
    opacity: .9;
    pointer-events: none;
}

/* FIX: flex:1 + min-height:0 so grid can shrink and not clip bottom */
.sl-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 18px;
    height: 99%;
    width: 100%;
    padding: 18px;
    box-sizing: border-box; /* FIX */
    flex: 1; /* FIX */
    min-height: 0; /* FIX */
}

/* FIX: min-height:0 allows inner scroll areas to work */
.sl-panel {
    /* height: 100%;*/
    min-height: 0; /* FIX */
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(15,23,42,.78), rgba(2,6,23,.62));
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 1px;
    overflow: hidden;
}

.sl-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(2,6,23,.35);
    color: var(--sub);
    font-size: .9rem;
    width: fit-content;
}

.sl-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #fff, var(--brand1));
    box-shadow: 0 0 18px rgba(56,189,248,.55);
}

.sl-title {
    font-size: 3.1rem;
    line-height: 1.05;
    margin: 10px 0 6px;
    font-weight: 800;
    letter-spacing: -.03em;
    background: linear-gradient(90deg, var(--brand1), var(--brand2));
    -webkit-background-clip: content-box;
    background-clip: content-box;
    color: transparent;
}

.sl-subtitle {
    color: var(--sub);
    /* max-width: 520px;*/
    margin: 0;
}

/* FIX: card must flex so results can scroll and not clip */
.sl-card {
    margin-top: 10px;
    border: 1px solid var(--line);
    background: rgba(2,6,23,.35);
    border-radius: 18px;
    padding:18px; 
    flex: 1; /* FIX */
    min-height: 0; /* FIX */
    display: flex; /* FIX */
    flex-direction: column; /* FIX */
}

.sl-label {
    font-size: .9rem;
    color: var(--sub); 
    margin-bottom: 3px;
    display: block;
}

.sl-input-row {
    display: flex;
    gap: 12px;
    align-items: center;
}

.sl-input {
    /*flex: 1;*/  
    height: 54px;
    border-radius: 14px;
    border: 1px solid rgba(148,163,184,.22);
    background: rgba(2,6,23,.45);
    color: var(--ink);
    outline: none;
    padding: 0 16px;
}
    .sl-input:focus {
        border-color: rgba(56,189,248,.55);
        box-shadow: 0 0 0 4px rgba(56,189,248,.12);
    }

.sl-btn {
    height: 40px;
    padding: 0 18px;
    border: none;
    border-radius: 14px;
    font-weight: 700;
    color: #081018;
    background: linear-gradient(90deg, var(--brand1), var(--brand2));
    box-shadow: 0 1px 4px rgba(56,189,248,.18);
    /*display: inline-flex;*/
    align-items: center;
    justify-content: center;
    gap: 1px;
    cursor: pointer;
    transition: transform .12s ease, filter .12s ease;
}

    .sl-btn:hover {
        transform: translateY(-1px);
        filter: saturate(1.05);
    }

    .sl-btn:disabled {
        opacity: .7;
        cursor: not-allowed;
        transform: none;
    }

.sl-btn-map {
    height: 40px;
    width: 80px;
    padding: 0 1px;
    border: none;
    border-radius: 14px;
    font-weight: 700;
    color: #081018;
    background: linear-gradient(90deg, var(--brand1), var(--brand2));
    box-shadow: 0 16px 40px rgba(56,189,248,.18);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: transform .12s ease, filter .12s ease;
    visibility: hidden;
}

    .sl-btn-map:hover {
        transform: translateY(-1px);
        filter: saturate(1.05);
    }

    .sl-btn-map:disabled {
        opacity: .7;
        cursor: not-allowed;
        transform: none;
    }

.sl-status {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid rgba(56,189,248,.22);
    background: rgba(56,189,248,.08);
    color: var(--ink);
    font-size: .95rem;
}

.sl-error {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid rgba(244,63,94,.25);
    background: rgba(244,63,94,.10);
    color: #fecdd3;
    font-size: .95rem;
}

.sl-foot {
    margin-top: 14px;
    color: var(--sub);
    font-size: .9rem;
}

    .sl-foot code {
        color: #a5b4fc;
    }

.sl-mini {
    margin-top: auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.sl-mini-item {
    border: 1px solid var(--line);
    background: rgba(2,6,23,.30);
    border-radius: 16px;
    padding: 14px;
}

.sl-mini-k {
    color: var(--sub);
    font-size: .85rem;
}

.sl-mini-v {
    font-weight: 700;
    margin-top: 4px;
}

/* FIX: min-height:0 for map wrap so map can fill remaining space */
.sl-map-wrap {
    height: 100%;
    min-height: 0; /* FIX */
    min-width: 100px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(2,6,23,.32);
    box-shadow: var(--shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.sl-map-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(148,163,184,.12);
    background: linear-gradient(180deg, rgba(15,23,42,.65), rgba(2,6,23,.12));
}

.sl-map-title {
    font-weight: 800;
}

.sl-map-badge {
    font-size: .85rem;
    color: var(--sub);
    border: 1px solid var(--line);
    background: rgba(2,6,23,.25);
    padding: 6px 10px;
    border-radius: 999px;
}

/* FIX: map should fill its container (don’t force min-height) */
.sl-map-stage {
    flex: 1;
    min-height: 0; /* FIX */
    overflow: hidden; /* FIX */
}

.sl-map {
    width: 100%;
    height: 100% !important;
    min-height: 0;
}
.sl-store-dist {
    font-size: .85rem;
    color: rgba(229,231,235,.75);
    border: 1px solid rgba(148,163,184,.14);
    background: rgba(2,6,23,.25);
    padding: 4px 8px;
    border-radius: 999px;
    white-space: nowrap;
}
/* 2) one consistent control height */
.sl-control {
    height: 30px;
    border-radius: 16px;
    /*font-size: 1.3rem;*/
    font-size: 1.2rem;
}

/* Make input/select fill width and match style */
.sl-input.sl-control,
.sl-select.sl-control {
    /*width: 106px;*/
    padding: 0 14px;
    line-height: 32px;
}

/* Select needs special padding/line-height */
.sl-select.sl-control {
    line-height: normal;
    padding: 0 14px;
    width: 100px;
    /* width: 8rem;*/
}

/* Button full-height and centered text */
.sl-btn.sl-control {
    width: 100px;/*100%;  msw*/
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 16px;
    font-size: 1.1rem;
}


/* ===== Radius + Results List ===== */
.sl-select {
    /*width: auto;*/
    width: 400px;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid rgba(148,163,184,.18);
    background: rgba(2,6,23,.40);
    color: #e5e7eb;
}
    .sl-select:focus {
        border-color: rgba(56,189,248,.55);
        box-shadow: 0 0 0 4px rgba(56,189,248,.12);
}

.sl-row {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    justify-content: space-between;
}

.sl-row-left {
    flex: 1;
}

.sl-row-right {
    display: flex;
    justify-content: flex-end;
    min-width: 140px;
}

.sl-count {
    font-size: .85rem;
    color: rgba(229,231,235,.75);
    padding: 8px 10px;
    border: 1px solid rgba(148,163,184,.14);
    border-radius: 999px;
    background: rgba(2,6,23,.25);
}

/* FIX: remove max-height and let it flex-scroll inside sl-card */
.sl-results {
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1; /* FIX */
    min-height: 0; /* FIX */
    overflow: auto; /* FIX */
    padding-right: 4px;
}

.sl-store {
    border: 1px solid rgba(148,163,184,.16);
    background: rgba(2,6,23,.22);
    border-radius: 16px;
    padding: 12px 12px;
    cursor: pointer;
    transition: transform .12s ease, border-color .12s ease, background .12s ease;
}

    .sl-store:hover {
        transform: translateY(-1px);
        border-color: rgba(96,165,250,.55);
        background: rgba(59,130,246,.10);
    }

.sl-store-top {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    justify-content: space-between;
}

.sl-store-name {
    font-weight: 850;
    line-height: 1.2;
}



.sl-store-sub {
    margin-top: 6px;
    color: rgba(229,231,235,.82);
    font-size: .92rem;
}

.sl-store-sub2 {
    margin-top: 6px;
    color: rgba(229,231,235,.70);
    font-size: .86rem;
}




/* FIX: remove forced min-height that can clip bottom */
#leafletMap {
    width: 100%;
    height: 97%;
}

/* Tooltip theme */
.sl-leaflet-tooltip {
    background: rgba(2,6,23,.78) !important;
    color: #e5e7eb !important;
    border: 1px solid rgba(148,163,184,.22) !important;
    border-radius: 14px !important;
    padding: 10px 12px !important;
    box-shadow: 0 18px 60px rgba(0,0,0,.55) !important;
    backdrop-filter: blur(16px) !important;
}

.leaflet-tooltip-top:before {
    border-top-color: rgba(148,163,184,.22) !important;
}

/* 1) row layout */
.sl-inline-row {
    display: flex;
    gap: 14px;
    align-items: flex-end;
}

/* columns */
.sl-inline-col {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

/*.sl-inline-radius {
    flex: 0 0 160px;
}*/

.sl-inline-btn {
    flex: 0 0 150px;
}


/* spacer label */
.sl-label-spacer {
    visibility: hidden;
    height: 1em;
}


/* Website/Directions links */
.sl-store-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.sl-store-link {
    display: inline-block;
    font-weight: 800;
    text-decoration: none;
    color: #93c5fd;
}

    .sl-store-link:hover {
        text-decoration: underline;
    }

/* Searching overlay */
.sl-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.sl-overlay-card {
    width: min(420px, 92vw);
    border-radius: 18px;
    padding: 18px 18px;
    background: rgba(15,23,42,.92);
    border: 1px solid rgba(148,163,184,.18);
    box-shadow: 0 30px 80px rgba(0,0,0,.55);
    display: flex;
    gap: 14px;
    align-items: center;
}

.sl-overlay-title {
    font-weight: 800;
    font-size: 1.05rem;
    color: #e5e7eb;
}

.sl-overlay-sub {
    margin-top: 2px;
    font-size: .9rem;
    color: rgba(226,232,240,.78);
}

.sl-overlay-spinner {
    width: 20px;
    height: 20px;
    border-radius: 999px;
    border: 3px solid rgba(226,232,240,.25);
    border-top-color: rgba(96,165,250,1);
    animation: slspin .9s linear infinite;
}


@keyframes slspin {
    to {
        transform: rotate(360deg);
    }
}

.leaflet-control-attribution {
    background: rgba(2,6,23,.55);
    color: rgba(229,231,235,.55);
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 10px;
    border: 1px solid rgba(148,163,184,.15);
}

    .leaflet-control-attribution a {
        color: rgba(147,197,253,.65);
        text-decoration: none;
    }
/* ===== FCBD header image sizing FIX ===== */
/* ===== FCBD header image (wider, polished) ===== */
.sl-brand-img {
    /*width: 100%;*/
    width: 600px;
    max-width: 500px; /* <-- makes it nicely wide */
    height: auto;
    align-self: flex-start;
    object-fit: contain;
    border-radius: 19px;
    border: 1px solid rgba(148,163,184,.16);
    background: rgba(2,6,23,.18);
    box-shadow: 0 18px 55px rgba(0,0,0,.45);
}
/* ===== FCBD Banner (wide image, no cropping) ===== */
.sl-brand-banner {
    width: 100%;
    max-width: 100%;
    border-radius: 18px;
    border: 1px solid rgba(148,163,184,.16);
    background: rgba(2,6,23,.18);
    box-shadow: 0 18px 55px rgba(0,0,0,.45);
    overflow: hidden; /* clean rounded corners */
    padding: 10px; /* breathing room so text isn't slammed to edges */
}

/*.sl-brand-img {
    display: block;*/
    /*width: 100%;*/
    /*width: 460px;
    height: auto;*/
    /* keep the whole banner visible */
    /*object-fit: contain;*/
    /* IMPORTANT: cap the height so it doesn't take over the panel */
    /*max-height: 140px;
}*/

/* Responsive */
@media (max-width: 1300px) {
    body {
        overflow: auto;
    }

    .sl-grid {
        grid-template-columns: 1fr;
        height: auto;
    }

    .sl-map-wrap {
        height: 1vh;
    }

    .sl-btn-map {
        visibility: visible;
    }

    .sl-map-wrap {
        visibility: hidden;
    }

    .sl-foot {
        visibility: hidden;
    }

    .sl-input.sl-control {
        width: 220px;
        height: 60px;
        font-size: 2.5rem;
    }

    .sl-select.sl-control {
        width: 140px;
        height: 60px;
        font-size: 2rem;
    }

    .sl-btn.sl-control {
        width: 140px;
        height: 60px;
        font-size: 1.6rem;
    }

    .sl-label {
        font-size: 1.5rem;
    }

    .sl-status {
        font-size: 1.5rem;
    }

    .sl-brand-text {
        font-size: 1.1rem;
    }

    .sl-store-dist {
        font-size: 1.3rem;
    }

    .sl-store-name {
        font-size: 1.3rem;
    }

    .sl-store-sub {
        font-size: 1.3rem;
    }

    .sl-store-sub2 {
        font-size: 1.3rem;
    }

    .sl-store-link {
        font-size: 1.3rem;
    }

    .sl-shell {
        position: relative;
        width: 100%;
        height: 100%; /*vh;*/
        min-height: 100vh;
        display: flex; /* FIX */
        overflow: hidden; /* FIX */
    }
}
/* responsive stack */
@media (max-width: 520px) {

    .sl-inline-row {
        flex-direction: column;
        align-items: stretch;
    }

    .sl-inline-btn {
        flex: 1 1 auto;
    }

    .sl-label-spacer {
        display: none;
        width: 1px;
    }

    .sl-btn-map {
        visibility: visible;
    }

    .sl-label {
        font-size: 1rem;
    }

    .sl-store-dist {
        font-size: 1rem;
    }

    .sl-store-name {
        font-size: 1rem;
    }

    .sl-store-sub {
        font-size: 1rem;
    }

    .sl-store-sub2 {
        font-size: 1rem;
    }

    .sl-brand-text {
        font-size: 1rem;
    }

    .sl-input.sl-control {
        width: 80px;
        height: 40px;
        font-size: 1rem;
        /*color: #00ff00;*/
    }

    .sl-select.sl-control {
        width: 100px;
        height: 40px;
        font-size: 1rem;
    }

    .sl-btn.sl-control {
        width: 80px;
        height: 40px;
        font-size: 1rem;
        flex: 1 1 auto;
    }

    .sl-status {
        font-size: 1rem;
    }

    .sl-shell {
        position: relative;
        width: 100%;
        height: 100%; /*vh;*/
        min-height: 100vh;
        display: flex; /* FIX */
        overflow: hidden; /* FIX */
    }

    .sl-brand-img {
        /*width: 100%;*/
        width: 300px;
        max-width: 300px; /* <-- makes it nicely wide */
    }
}
/* 
@media (max-width: 500px) {
    .sl-brand-img {
        max-width: 460px;
    }
}


@media (max-width: 4000px) {
    .sl-brand-img {
        max-width: 460px;
    }
}*/
    
