/* ============================================ */
/*              Live Location                   */
/* ============================================ */

#live-location {
    padding: var(--sectionPadding);
    background: var(--backgroundColor);
}

#live-location .cs-container {
    width: 100%;
    max-width: 80rem;
    margin: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

#live-location .cs-content {
    text-align: center;
    max-width: 40rem;
}

/* ── State containers ─────────────────────────────────────── */

.loc-state {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
}

/* ── Loading ──────────────────────────────────────────────── */

.loc-spinner {
    width: 2.5rem;
    height: 2.5rem;
    border: 3px solid var(--primary);
    border-top-color: transparent;
    border-radius: 50%;
    animation: loc-spin 0.8s linear infinite;
}

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

/* ── Status badge ─────────────────────────────────────────── */

.loc-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4375rem 1.375rem;
    border-radius: 2rem;
    font-weight: 700;
    font-size: clamp(0.8125rem, 1.6vw, 0.9375rem);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.loc-badge--open {
    background: #d1fae5;
    color: #065f46;
}

.loc-badge--closed {
    background: #e5e7eb;
    color: #6b7280;
}

/* Pulsing green dot for OPEN badge */
.loc-dot {
    display: inline-block;
    width: 0.5625rem;
    height: 0.5625rem;
    background: #10b981;
    border-radius: 50%;
    animation: loc-pulse 1.6s ease-in-out infinite;
}

@keyframes loc-pulse {
    0%, 100% { opacity: 1;   transform: scale(1);   }
    50%       { opacity: 0.4; transform: scale(1.35); }
}

/* ── Open state ───────────────────────────────────────────── */

.loc-address {
    font-size: 1rem;
    font-weight: 600;
    color: var(--bodyTextColor);
    text-align: center;
}

#loc-map {
    width: 100%;
    max-width: 52rem;
    height: clamp(17rem, 45vw, 24rem);
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
    /* z-index keeps the map tile layer below any fixed header */
    z-index: 0;
}

/* ── Closed state ─────────────────────────────────────────── */

.loc-closed-text {
    font-size: 1rem;
    color: var(--bodyTextColor);
    text-align: center;
    max-width: 28rem;
    opacity: 0.75;
}

/* ── Desktop ──────────────────────────────────────────────── */

@media only screen and (min-width: 64rem) {
    #loc-map {
        height: 25rem;
    }
}
