/* SNAP Store Locator Page */
.locator-wrapper {
    display: flex;
    height: calc(100vh - 120px);
    overflow: hidden;
    background: #f5f6f8;
}

/* LEFT COLUMN */
.locator-left {
    width: 420px;
    min-width: 420px;
    background: #ffffff;
    border-right: 1px solid #e4e4e4;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.locator-left-inner {
    padding: 28px 24px;
    border-bottom: 1px solid #eee;
}

/* RESULTS HEADER */
.results-header {
    padding: 14px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e6e6e6;
    background: #fafafa;
    position: sticky;
    top: 0;
    z-index: 2;
}

/* RESULTS LIST */
.results-section {
    padding: 22px;
    overflow-y: auto;
    flex: 1;
}

/* Result Cards */
.retailer-card {
    border-radius: 14px;
    border: 1px solid #e3e3e3;
    padding: 16px 18px;
    margin-bottom: 16px;
    background: #fff;
    transition: all 0.18s ease;
}

.retailer-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.retailer-title {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.retailer-distance {
    font-size: 0.82rem;
    color: #666;
}

/* Grid view */
/* Enable 2-column grid layout */
.grid-view {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

/* Cards inside the grid */
.grid-view .retailer-card {
    width: 100%;
    margin: 0; /* grid handles spacing */
    padding: 12px 14px;
    border-radius: 10px;
}

/* RIGHT MAP */
.locator-map {
    flex: 1;
    position: relative;
    background: #ddd;
}

#map {
    height: 100%;
    width: 100%;
    border-left: 1px solid #e2e2e2;
}

/* Dropdown styles */
.btn-dropdown {
    border-radius: 8px;
    border: 1px solid #cbd1d6;
    background: #fff;
    padding-left: 6px;
}

/* Highlight selected result card */
.active-card {
    border: 2px solid #1e90ff;
    box-shadow: 0 0 10px rgba(30, 144, 255, 0.35);
    transform: scale(1.015);
}

/* Card clicking logic */
.retailer-card { cursor: pointer; }
.retailer-card * { pointer-events: none; }
.retailer-card .details-link { pointer-events: auto; }

/* Link styling */
.popup-details-link,
.details-link {
    color: #0066cc;
    font-weight: 600;
    text-decoration: underline;
}

.details-link:hover,
.popup-details-link:hover {
    color: #004b99;
}

/* Loading Spinner */
.locator-loading {
    text-align: center;
    padding: 30px 10px;
    font-size: 0.95rem;
    color: #666;
}

.spinner {
    width: 28px;
    height: 28px;
    border: 3px solid #ddd;
    border-top-color: #007bff;
    border-radius: 50%;
    margin: 0 auto 12px;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Disable button when loading */
.btn-loading {
    opacity: 0.7;
    pointer-events: none;
}
