/* Store Locations page — branch mini maps + main map + status pills */

.branch-header-preview,
.branch-map-preview {
    background-color: #e2e8f0;
    background-image:
        linear-gradient(rgba(148, 163, 184, 0.35) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.35) 1px, transparent 1px);
    background-size: 22px 22px;
}

.branch-header-preview.is-map-ready {
    background-image: none;
    background-color: #cbd5e1;
}

.branch-header-preview.is-map-ready .branch-header-fallback-icon {
    display: none;
}

.branch-mini-map,
.branch-mini-map .leaflet-container {
    width: 100%;
    height: 100%;
}

.branch-header-preview .leaflet-control-container {
    display: none;
}

.store-hero-grid {
    background-image:
        linear-gradient(rgba(15, 23, 42, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 23, 42, 0.05) 1px, transparent 1px);
    background-size: 28px 28px;
}

.branch-card {
    animation: branchFadeIn 0.35s ease both;
}

@keyframes branchFadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .branch-card {
        animation: none;
    }
}

.branch-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.branch-card-actions {
    margin-top: auto;
    padding-top: 1rem;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.32rem 0.7rem;
    background: rgba(255, 255, 255, 0.94);
    color: #475569;
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.22);
    transition: background-color 0.2s ease, color 0.2s ease;
    white-space: nowrap;
}

.status-pill::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 9999px;
    background: #94a3b8;
    flex-shrink: 0;
}

.status-open {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 6px 18px rgba(34, 197, 94, 0.45);
}

.status-open::before {
    background: #ffffff;
    animation: pulseDot 1.6s ease-in-out infinite;
}

.status-closed {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 6px 18px rgba(239, 68, 68, 0.4);
}

.status-closed::before { background: #ffffff; }

.status-closing-soon {
    background: linear-gradient(135deg, #facc15, #f59e0b);
    color: #78350f;
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 6px 18px rgba(250, 204, 21, 0.45);
}

.status-closing-soon::before {
    background: #78350f;
    animation: pulseDot 1s ease-in-out infinite;
}

@keyframes pulseDot {
    0%, 100% { transform: scale(1); opacity: 1; }
    50%      { transform: scale(1.5); opacity: 0.6; }
}

@media (prefers-reduced-motion: reduce) {
    .status-open::before,
    .status-closing-soon::before {
        animation: none;
    }
}

.store-map-shell {
    height: clamp(280px, 45vh, 560px);
    min-height: clamp(280px, 45vh, 560px);
}

@media (min-width: 640px) {
    .store-map-shell {
        height: clamp(360px, 50vh, 560px);
        min-height: clamp(360px, 50vh, 560px);
    }
}

@media (min-width: 1024px) {
    .store-map-shell {
        height: 560px;
        min-height: 560px;
    }
}

#store-map,
#store-map .leaflet-container {
    width: 100%;
    height: 100%;
    background: #eceff3;
}

#store-map {
    min-height: 100%;
}

#store-map.map-ready + #store-map-placeholder,
#store-map-placeholder.hidden {
    display: none;
}

.leaflet-control-attribution {
    font-size: 10px;
    line-height: 1.4;
    max-width: calc(100% - 12px);
}

.leaflet-container a { color: #f59e0b; }

.leaflet-popup-content-wrapper {
    border-radius: 0;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.2);
}

.leaflet-popup-content {
    margin: 14px 18px;
    font-size: 0.85rem;
}

.store-cta-section {
    content-visibility: auto;
    contain-intrinsic-size: auto 420px;
}

@media (max-width: 640px) {
    .status-pill {
        font-size: 0.58rem;
        padding: 0.28rem 0.55rem;
    }

    .branch-header-preview,
    .branch-map-preview {
        height: 10rem;
    }
}
