/* ══════════════════════════════════════════════════════════════════════
   template-map-component.css
   Uses existing design tokens only — no new colors introduced.
═══════════════════════════════════════════════════════════════════════ */

.journey-map-section {
    padding: 5rem 0;
    background: var(--bg-secondary, #F9F7F2);
}

.journey-map-sub {
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 0.95rem;
    margin-top: 0.5rem;
}

/* ── Map frame ─────────────────────────────────────────────────────── */
.journey-map-frame {
    position: relative;
    width: 100%;
    height: 460px;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--border-primary);
    box-shadow: var(--shadow-md);
    background: var(--bg-primary, #fff);
}

@media (min-width: 992px) {
    .journey-map-frame { height: 560px; }
}

.journey-map-canvas {
    width: 100%;
    height: 100%;
    z-index: 1;
}

.journey-map-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    background: var(--bg-primary, #fff);
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 0.9rem;
    z-index: 2;
    transition: opacity 0.3s ease;
}

.journey-map-loading.is-hidden {
    opacity: 0;
    pointer-events: none;
}

/* ── Leaflet marker / popup theming ───────────────────────────────── */
.journey-map-canvas .leaflet-popup-content-wrapper {
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
    font-family: var(--font-body);
}

.journey-map-canvas .leaflet-popup-content {
    margin: 0.65rem 0.9rem;
    font-size: 0.85rem;
    color: var(--text-primary);
}

.journey-map-popup-title {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--text-primary);
    display: block;
    margin-bottom: 0.15rem;
}

.journey-map-popup-days {
    color: var(--color-gold);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.journey-map-marker {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--gradient-gold, var(--color-gold));
    color: var(--color-white, #fff);
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.8rem;
    box-shadow: var(--shadow-gold, var(--shadow-sm));
    border: 2px solid var(--color-white, #fff);
}

.journey-map-marker--airport {
    background: var(--color-dark-80, #2b2b2b);
    font-size: 0.95rem;
}

/* ── Stop list / legend ───────────────────────────────────────────── */
.journey-map-legend {
    height: 100%;
    background: var(--bg-primary, #fff);
    border: 1px solid var(--border-primary);
    border-radius: 14px;
    padding: 1.5rem 1.5rem 1.25rem;
    box-shadow: var(--shadow-sm);
}

.journey-map-legend-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.journey-map-stops {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 420px;
    overflow-y: auto;
}

.journey-map-stop {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.55rem 0;
    border-bottom: 1px dashed var(--border-secondary, var(--border-primary));
}

.journey-map-stop:last-child {
    border-bottom: none;
}

.journey-map-stop-badge {
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-gold-light, rgba(var(--color-gold-rgb, 191,155,74), 0.12));
    color: var(--color-gold);
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.75rem;
}

.journey-map-stop--airport .journey-map-stop-badge {
    background: var(--color-dark-80, #2b2b2b);
    color: var(--color-white, #fff);
}

.journey-map-stop-body {
    flex: 1 1 auto;
    min-width: 0;
}

.journey-map-stop-name {
    font-family: var(--font-body);
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.92rem;
    line-height: 1.3;
}

.journey-map-stop-days {
    color: var(--text-muted);
    font-size: 0.78rem;
}

.journey-map-note {
    margin: 1rem 0 0;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-primary);
    color: var(--text-muted);
    font-size: 0.78rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* ── Responsive ────────────────────────────────────────────────────── */
@media (max-width: 991.98px) {
    .journey-map-legend {
        margin-top: 0;
    }
    .journey-map-stops {
        max-height: 260px;
    }
}
