/* ============================================================
   Store Locator – Public Styles
   Clean, modern, responsive
   ============================================================ */

*,*::before,*::after{box-sizing:border-box;}

.sl-wrap {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-size: 14px;
    color: #1f2937;
    --accent: #2563eb;
    --accent-light: #eff6ff;
    --border: #e5e7eb;
    --radius: 10px;
    --shadow: 0 2px 12px rgba(0,0,0,.09);
}

/* ── Search Bar ── */
.sl-search-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 16px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius) var(--radius) 0 0;
    box-shadow: var(--shadow);
}
.sl-search-input-wrap {
    position: relative;
    flex: 1 1 260px;
}
.sl-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    pointer-events: none;
}
.sl-search-input {
    width: 100%;
    padding: 10px 12px 10px 38px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    transition: border-color .2s;
    outline: none;
}
.sl-search-input:focus { border-color: var(--accent); }

.sl-select {
    padding: 10px 12px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
    cursor: pointer;
    outline: none;
    transition: border-color .2s;
}
.sl-select:focus { border-color: var(--accent); }

.sl-btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: background .2s, transform .1s;
}
.sl-btn:active { transform: scale(.97); }
.sl-btn-primary { background: var(--accent); color: #fff; }
.sl-btn-primary:hover { background: #1d4ed8; }
.sl-btn-secondary {
    background: #f3f4f6;
    color: #374151;
    border: 1.5px solid var(--border);
    font-size: 18px;
    line-height: 1;
    padding: 9px 14px;
}
.sl-btn-secondary:hover { background: #e5e7eb; }

/* ── Main Layout ── */
.sl-main {
    display: flex;
    height: var(--map-height, 520px);
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 var(--radius) var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

/* ── List Panel ── */
.sl-list-panel {
    width: 340px;
    min-width: 260px;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border);
    background: #fafafa;
    overflow: hidden;
}
.sl-list-header {
    padding: 12px 16px;
    background: #fff;
    border-bottom: 1px solid var(--border);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #6b7280;
    min-height: 42px;
    display: flex;
    align-items: center;
}
.sl-results-list {
    overflow-y: auto;
    flex: 1;
}

/* ── Store Card ── */
.sl-store-card {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    background: #fff;
    transition: background .15s;
    position: relative;
}
.sl-store-card:hover,
.sl-store-card.active {
    background: var(--accent-light);
}
.sl-store-card.active { border-left: 3px solid var(--accent); }
.sl-store-card-title {
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 4px;
    color: #111827;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}
.sl-store-card-address {
    font-size: 12px;
    color: #6b7280;
    line-height: 1.4;
}
.sl-store-card-meta {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    flex-wrap: wrap;
}
.sl-badge {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 20px;
    background: var(--accent-light);
    color: var(--accent);
    font-weight: 600;
    border: 1px solid #bfdbfe;
}
.sl-distance-badge {
    font-size: 12px;
    color: #6b7280;
    font-weight: 600;
    white-space: nowrap;
}

/* ── Map Panel ── */
.sl-map-panel { flex: 1; position: relative; overflow: hidden; }
.sl-map { width: 100%; height: 100%; }

/* ── Loading ── */
.sl-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: #6b7280;
}
.sl-spinner {
    width: 32px; height: 32px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: sl-spin 0.7s linear infinite;
    margin-bottom: 12px;
}
@keyframes sl-spin { to { transform: rotate(360deg); } }

/* ── Empty State ── */
.sl-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 20px;
    text-align: center;
    color: #6b7280;
}
.sl-empty-icon { font-size: 40px; margin-bottom: 12px; }
.sl-empty p { margin: 4px 0; font-size: 13px; }

/* ── Info Window ── */
.sl-info-window {
    max-width: 240px;
    font-family: inherit;
}
.sl-info-window h3 {
    font-size: 14px;
    font-weight: 700;
    margin: 0 0 6px;
    color: #111827;
}
.sl-info-window p {
    font-size: 12px;
    color: #6b7280;
    margin: 2px 0;
    line-height: 1.5;
}
.sl-info-window a {
    color: var(--accent);
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
}
.sl-info-window a:hover { text-decoration: underline; }
.sl-info-actions {
    margin-top: 8px;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.sl-info-btn {
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 6px;
    background: var(--accent);
    color: #fff;
    border: none;
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
}
.sl-info-btn.outline {
    background: transparent;
    color: var(--accent);
    border: 1.5px solid var(--accent);
}

/* ── Modal ── */
.sl-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.sl-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.5);
    backdrop-filter: blur(3px);
}
.sl-modal-content {
    position: relative;
    background: #fff;
    border-radius: 16px;
    max-width: 560px;
    width: 94vw;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,.25);
    padding: 28px;
    z-index: 1;
    animation: sl-modal-in .22s ease;
}
@keyframes sl-modal-in {
    from { opacity:0; transform: scale(.95) translateY(12px); }
    to   { opacity:1; transform: scale(1)  translateY(0); }
}
.sl-modal-close {
    position: absolute;
    top: 14px; right: 16px;
    background: #f3f4f6;
    border: none;
    font-size: 22px;
    line-height: 1;
    width: 32px; height: 32px;
    border-radius: 50%;
    cursor: pointer;
    color: #374151;
    display: flex; align-items: center; justify-content: center;
    transition: background .15s;
}
.sl-modal-close:hover { background: #e5e7eb; }

/* Modal Body */
.sl-modal-store-name {
    font-size: 20px;
    font-weight: 800;
    margin: 0 0 4px;
}
.sl-modal-cats { margin-bottom: 12px; display: flex; gap: 6px; flex-wrap: wrap; }
.sl-modal-thumbnail {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 16px;
    display: block;
}
.sl-modal-excerpt { color: #4b5563; line-height: 1.6; margin-bottom: 16px; font-size: 13px; }
.sl-modal-section { margin-bottom: 14px; }
.sl-modal-section h4 {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #9ca3af;
    margin: 0 0 6px;
}
.sl-modal-section p { margin: 2px 0; font-size: 14px; color: #374151; }
.sl-modal-section a { color: var(--accent); text-decoration: none; }
.sl-modal-section a:hover { text-decoration: underline; }

/* Hours Table in Modal */
.sl-hours-display { width: 100%; border-collapse: collapse; font-size: 13px; }
.sl-hours-display td { padding: 3px 8px 3px 0; color: #374151; }
.sl-hours-display td:first-child { font-weight: 600; width: 100px; }
.sl-hours-display .sl-closed-day { color: #ef4444; }

.sl-modal-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.sl-modal-btn {
    flex: 1;
    text-align: center;
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 13px;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: background .15s;
}
.sl-modal-btn-primary   { background: var(--accent); color: #fff; }
.sl-modal-btn-primary:hover   { background: #1d4ed8; }
.sl-modal-btn-secondary { background: #f3f4f6; color: #374151; border: 1.5px solid var(--border); }
.sl-modal-btn-secondary:hover { background: #e5e7eb; }

/* ── Responsive ── */
@media (max-width: 680px) {
    .sl-main { flex-direction: column; height: auto; }
    .sl-list-panel { width: 100%; height: 280px; border-right: none; border-bottom: 1px solid var(--border); }
    .sl-map-panel { height: 320px; }
    .sl-search-bar { gap: 8px; }
    .sl-search-input-wrap { flex: 1 1 100%; }
}
