/* ==========================================================================
   Anantriksh Store Locator — Public Map Styles
   ========================================================================== */

.asl-store-locator-wrap {
    font-family: inherit;
    --asl-primary: #e03131;
    --asl-primary-dark: #c92a2a;
    --asl-bg: #f8f9fa;
    --asl-border: #dee2e6;
    --asl-text: #212529;
    --asl-muted: #868e96;
    --asl-card-bg: #ffffff;
    --asl-radius: 8px;
    --asl-shadow: 0 2px 8px rgba(0,0,0,.12);
}

/* Controls Bar */
.asl-controls {
    background: var(--asl-card-bg);
    border: 1px solid var(--asl-border);
    border-radius: var(--asl-radius);
    padding: 14px 16px;
    margin-bottom: 12px;
    box-shadow: var(--asl-shadow);
}

.asl-search-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.asl-search-input-wrap {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 200px;
    background: var(--asl-bg);
    border: 1px solid var(--asl-border);
    border-radius: 6px;
    padding: 0 10px;
    gap: 6px;
    box-sizing: border-box !important;
    min-height: 42px;
}

.asl-search-icon { color: var(--asl-muted); font-size: 14px; }

.asl-search-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 9px 0;
    font-size: 14px;
    color: var(--asl-text);
    outline: none;
    box-sizing: border-box !important;
    height: auto !important;
    line-height: normal !important;
    min-height: 40px;
}

.asl-clear-btn {
    background: none;
    border: none;
    color: var(--asl-muted);
    cursor: pointer;
    font-size: 13px;
    padding: 4px;
    display: none;
}
.asl-clear-btn.visible { display: block; }
.asl-clear-btn:hover { color: var(--asl-text); }

.asl-category-select,
.asl-radius-select {
    background: var(--asl-bg);
    border: 1px solid var(--asl-border);
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 14px;
    color: var(--asl-text);
    cursor: pointer;
    outline: none;
    width: auto !important;
    max-width: 100%;
    margin: 0;
    box-sizing: border-box !important;
    height: auto !important;
    line-height: normal !important;
    min-height: 42px;
}
.asl-category-select { min-width: 180px; }
.asl-radius-select   { min-width: 90px; }

.asl-radius-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--asl-text);
}

.asl-near-me-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--asl-primary);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 9px 14px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
    margin: 0;
    width: auto !important;
    box-sizing: border-box !important;
    height: auto !important;
    line-height: normal !important;
    min-height: 42px;
}
.asl-near-me-btn:hover  { background: var(--asl-primary-dark); }
.asl-near-me-btn:active { transform: scale(0.98); }

.asl-reset-btn {
    background: none;
    border: 1px solid var(--asl-border);
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 14px;
    cursor: pointer;
    color: var(--asl-muted);
    transition: color 0.2s, border-color 0.2s;
    margin: 0;
    width: auto !important;
    box-sizing: border-box !important;
    height: auto !important;
    line-height: normal !important;
    min-height: 42px;
}
.asl-reset-btn:hover { color: var(--asl-text); border-color: #adb5bd; }

.asl-status-bar {
    margin-top: 8px;
    font-size: 13px;
    color: var(--asl-muted);
    min-height: 18px;
}
.asl-status-bar.error   { color: #c92a2a; }
.asl-status-bar.success { color: #2f9e44; }

/* Map Layout */
.asl-map-layout {
    display: flex;
    gap: 12px;
    height: var(--asl-map-height, 600px);
    border-radius: var(--asl-radius);
    overflow: hidden;
    border: 1px solid var(--asl-border);
    box-shadow: var(--asl-shadow);
}

.asl-map {
    flex: 1;
    min-height: 300px;
    z-index: 1;
}

/* Sidebar */
.asl-sidebar {
    width: 300px;
    min-width: 260px;
    background: var(--asl-card-bg);
    overflow-y: auto;
    border-left: 1px solid var(--asl-border);
}

.asl-store-list { padding: 8px; }

.asl-store-card {
    background: var(--asl-card-bg);
    border: 1px solid var(--asl-border);
    border-radius: 6px;
    padding: 12px 14px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: box-shadow 0.2s, border-color 0.2s;
}
.asl-store-card:hover,
.asl-store-card.active {
    border-color: var(--asl-primary);
    box-shadow: 0 2px 10px rgba(224,49,49,.15);
}

.asl-store-card-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--asl-text);
    margin: 0 0 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.asl-store-card-cat {
    font-size: 11px;
    color: var(--asl-primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.asl-store-card-addr {
    font-size: 12px;
    color: var(--asl-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Leaflet popup customization */
.asl-popup {
    min-width: 220px;
    max-width: 280px;
}
.asl-popup h3 {
    margin: 0 0 4px;
    font-size: 15px;
    color: #212529;
}
.asl-popup .asl-popup-cat {
    font-size: 11px;
    color: var(--asl-primary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: 8px;
}
.asl-popup .asl-popup-row {
    font-size: 13px;
    color: #495057;
    margin-bottom: 4px;
    display: flex;
    gap: 6px;
}
.asl-popup .asl-popup-row span:first-child { color: var(--asl-muted); min-width: 56px; }

/* Radius circle */
.asl-radius-circle { pointer-events: none; }

/* No results */
.asl-no-stores-msg {
    text-align: center;
    padding: 40px 20px;
    color: var(--asl-muted);
    font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
    .asl-map-layout { flex-direction: column; height: auto; }
    .asl-sidebar    { width: 100%; min-width: 0; border-left: none; border-top: 1px solid var(--asl-border); max-height: 300px; }
    .asl-map        { height: 350px; }
    .asl-search-row { flex-direction: column; align-items: stretch; }
    .asl-category-select, .asl-near-me-btn, .asl-reset-btn { width: 100%; }
    .asl-radius-wrap { justify-content: space-between; }
}
