/* 
 * Store Locator Main Styles
 */

.st-locator-container {
    display: flex;
    flex-direction: row;
    height: 700px;
    /* Fixed height for the widget */
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    background-color: #fff;
}

/* Sidebar Styles */
.st-sidebar {
    width: 350px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #e0e0e0;
    background-color: #fafafa;
}

.st-search-box {
    padding: 20px;
    background-color: #fff;
    border-bottom: 1px solid #e0e0e0;
}

.st-search-input-wrapper {
    display: flex;
    position: relative;
}

.st-search-box input {
    width: 100% !important;
    padding: 12px 16px !important;
    border: 1px solid #d1d5db !important;
    border-radius: 6px !important;
    font-size: 14px;
    box-sizing: border-box;
    transition: border-color 0.2s !important;
}

.st-search-box input:focus {
    outline: none;
    border-color: #6366f1 !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.st-search-btn {
    position: absolute;
    right: 4px;
    top: 4px;
    bottom: 4px;
    background-color: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    padding: 0 16px;
    font-size: 13px;
    font-weight: 500;
    color: #4b5563;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}

.st-search-btn:hover {
    background-color: #e5e7eb;
    color: #111827;
}

.st-store-list {
    flex-grow: 1;
    overflow-y: auto;
    padding: 0;
    margin: 0;
}

.st-loading {
    padding: 20px;
    text-align: center;
    color: #6b7280;
}

.st-no-results {
    padding: 20px;
    text-align: center;
    color: #ef4444;
}

/* Store Card Styles */
.st-store-card {
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    background-color: #fff;
    cursor: pointer;
    transition: background-color 0.2s, border-left 0.2s;
    border-left: 4px solid transparent;
}

.st-store-card:hover {
    background-color: #f9fafb;
}

.st-store-card.active {
    background-color: #eff6ff;
    border-left-color: #6366f1;
}

.st-store-name {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 8px 0;
}

.st-store-type {
    display: inline-block;
    padding: 4px 8px;
    background-color: #f3f4f6;
    color: #4b5563;
    border-radius: 12px;
    font-size: 12px;
    margin-bottom: 12px;
}

.st-store-detail {
    display: flex;
    align-items: flex-start;
    margin-bottom: 8px;
    font-size: 14px;
    color: #4b5563;
}

.st-store-detail svg {
    width: 16px;
    height: 16px;
    margin-right: 8px;
    margin-top: 2px;
    flex-shrink: 0;
    fill: currentColor;
}

.st-store-actions {
    margin-top: 16px;
    display: flex;
    gap: 10px;
}

.st-btn {
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    text-align: center;
    border: 1px solid transparent;
}

.st-btn-primary {
    background-color: #6366f1;
    color: white !important;
}

.st-btn-primary:hover {
    background-color: #4f46e5;
}

.st-btn-secondary {
    background-color: transparent;
    border-color: #d1d5db;
    color: #6366f1 !important;
}

.st-btn-secondary:hover {
    background-color: #f3f4f6;
}

/* Map Container */
.st-map-container {
    flex-grow: 1;
    height: 100%;
    position: relative;
    z-index: 1;
    /* Keep map below WordPress admin bar if present */
}

/* Leaflet Customizations */
.leaflet-popup-content-wrapper {
    border-radius: 8px;
    padding: 1px;
}

.leaflet-popup-content {
    margin: 8px 12px;
}

.st-popup-title {
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 8px;
    padding-top: 8px !important;
}

.st-popup-address {
    font-size: 12px;
    color: #666;
    padding-bottom: 8px !important;
}

/* Custom Marker Styling to match reference (indigo circle with number) */
.st-custom-marker-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
    filter: drop-shadow(0px 3px 3px rgba(0, 0, 0, 0.3));
}

.st-custom-marker-icon.active {
    transform: scale(1.2) translateY(-5px);
    z-index: 1000 !important;
}

.st-custom-marker-icon.active svg {
    fill: #4f46e5;
}

/* Responsive */
@media (max-width: 768px) {
    .st-locator-container {
        flex-direction: column-reverse;
        height: auto;
        min-height: 600px;
    }

    .st-sidebar {
        width: 100%;
        height: 350px;
        /* Fixed height on mobile so map is visible below */
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
    }

    .st-map-container {
        height: 260px;
    }
}