/* =============================================
   Store Locator — Frontend Styles
   ============================================= */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

#sl-wrap {
    display: flex;
    height: 600px;
    font-family: 'Inter', sans-serif;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
    margin: 20px 0;
}

/* === SIDEBAR === */
#sl-sidebar {
    width: 320px;
    min-width: 280px;
    background: #fff;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #e8eaed;
    z-index: 10;
}

#sl-filter-bar {
    padding: 14px;
    background: #f8f9fa;
    border-bottom: 1px solid #e8eaed;
    flex-shrink: 0;
}

.sl-search-box {
    position: relative;
    margin-bottom: 15px; /* Tăng khoảng cách */
}

.sl-search-box input {
    width: 100%;
    padding: 10px 14px; /* Tăng padding */
    border: 1px solid #dfe1e5;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    box-sizing: border-box; /* Đảm bảo không bị phình to */
    height: 42px; /* Set cứng height tránh bị đè */
    transition: border-color 0.2s;
}
.sl-search-box input:focus { border-color: #1a73e8; }

.sl-selects select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #dfe1e5;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    background: #fff;
    margin-bottom: 12px;
    outline: none;
    cursor: pointer;
    box-sizing: border-box; /* Flatsome support */
    height: 42px; /* Đồng bộ chiều cao */
    appearance: auto; /* Bắt buộc hiển thị mũi tên dropdown */
    -webkit-appearance: auto;
}
.sl-selects select:last-child { margin-bottom: 0; }
.sl-selects select:disabled { background: #f1f3f4; color: #9aa0a6; cursor: default; }

#sl-result-info {
    font-size: 12px;
    color: #5f6368;
    padding: 8px 14px;
    border-bottom: 1px solid #e8eaed;
    flex-shrink: 0;
}

/* === STORE LIST === */
#sl-store-list {
    list-style: none;
    margin: 0;
    padding: 0;
    overflow-y: auto;
    flex-grow: 1;
}
#sl-store-list::-webkit-scrollbar { width: 5px; }
#sl-store-list::-webkit-scrollbar-track { background: #f1f1f1; }
#sl-store-list::-webkit-scrollbar-thumb { background: #ccc; border-radius: 4px; }

.sl-store-item {
    padding: 14px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background 0.15s;
}
.sl-store-item:hover {
    background: #f0f7ff;
}
.sl-store-item.active {
    background: #e8f0fe;
    border-left: 3px solid #1a73e8;
}
.sl-store-item .sl-store-name {
    font-size: 14px;
    font-weight: 600;
    color: #1d2327;
    margin: 0 0 5px 0;
    display: flex;
    align-items: center;
    gap: 6px;
}
.sl-store-item .sl-store-name::before {
    content: '📍';
    font-size: 13px;
}
.sl-store-item .sl-store-addr {
    font-size: 12px;
    color: #5f6368;
    margin: 0 0 6px 0;
    line-height: 1.5;
}
.sl-store-item .sl-store-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.sl-store-item .sl-phone-link {
    font-size: 12px;
    color: #1a73e8;
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 3px;
}
.sl-store-item .sl-phone-link:hover { text-decoration: underline; }
.sl-store-item .sl-hours {
    font-size: 11px;
    color: #34a853;
    font-weight: 500;
    background: #e6f4ea;
    padding: 2px 7px;
    border-radius: 10px;
}
.sl-directions-btn {
    margin-top: 8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #1a73e8;
    text-decoration: none;
    font-weight: 500;
    border: 1px solid #1a73e8;
    border-radius: 6px;
    padding: 4px 10px;
    transition: all 0.2s;
}
.sl-directions-btn:hover {
    background: #1a73e8;
    color: #fff;
}

.sl-loading, .sl-empty {
    text-align: center;
    padding: 30px;
    color: #9aa0a6;
    font-size: 13px;
    font-style: italic;
}

/* === MAP === */
#sl-map {
    flex: 1;
    min-width: 0;
}

/* === Leaflet Popup Custom === */
.sl-popup { min-width: 180px; }
.sl-popup-title { font-weight: 700; font-size: 14px; margin-bottom: 5px; color: #1d2327; }
.sl-popup-addr { font-size: 12px; color: #5f6368; margin-bottom: 6px; }
.sl-popup a { color: #1a73e8; font-size: 12px; }

/* === RESPONSIVE === */
@media (max-width: 640px) {
    #sl-wrap { flex-direction: column; height: auto; }
    #sl-sidebar { width: 100%; border-right: none; border-bottom: 1px solid #e8eaed; max-height: 350px; }
    #sl-map { height: 300px; }
}
