/* ============================================================
 * ee-elevation-progress.css
 * Styles for the elevation data loading progress bar and
 * source quality badges (DGM1/Google/Mapbox).
 * ============================================================ */

/* ── Progress Bar Container ──────────────────────────────────── */
.ee-elevation-progress {
    position: relative;
    width: 100%;
    height: 22px;
    background: rgba(0, 0, 0, 0.08);
    border-radius: 4px;
    margin: 6px 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 8px;
    font-size: 11px;
    transition: opacity 0.4s ease, max-height 0.4s ease;
    max-height: 30px;
}

.ee-elevation-progress--done {
    opacity: 0;
    max-height: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

/* ── Progress Bar Fill ───────────────────────────────────────── */
.ee-elevation-progress-bar {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: rgba(34, 197, 94, 0.25);
    border-radius: 4px;
    transition: width 0.3s ease;
    z-index: 0;
}

/* ── Progress Text ───────────────────────────────────────────── */
.ee-elevation-progress-text {
    position: relative;
    z-index: 1;
    color: #374151;
    font-weight: 500;
    white-space: nowrap;
}

/* ── Source Badges ────────────────────────────────────────────── */
.ee-elevation-source-badge {
    display: inline-flex;
    align-items: center;
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.02em;
    white-space: nowrap;
    position: relative;
    z-index: 1;
}

/* DGM1: high accuracy -- green */
.ee-source-dgm1 {
    background: rgba(34, 197, 94, 0.15);
    color: #15803d;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

/* Google: moderate accuracy -- orange/amber */
.ee-source-google {
    background: rgba(245, 158, 11, 0.15);
    color: #b45309;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

/* Mapbox DEM: rough estimate -- red */
.ee-source-mapbox {
    background: rgba(239, 68, 68, 0.15);
    color: #b91c1c;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Mixed sources */
.ee-source-mixed {
    background: rgba(99, 102, 241, 0.15);
    color: #4338ca;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

/* Cached data */
.ee-source-cached {
    background: rgba(156, 163, 175, 0.15);
    color: #6b7280;
    border: 1px solid rgba(156, 163, 175, 0.3);
}

/* Loading state */
.ee-source-loading {
    background: rgba(156, 163, 175, 0.1);
    color: #9ca3af;
    border: 1px solid rgba(156, 163, 175, 0.2);
}

/* ── Cache Info Text ─────────────────────────────────────────── */
.ee-elevation-cache-info {
    font-size: 10px;
    color: #9ca3af;
    margin-left: 4px;
}

/* ── Source Badge in Legend Stats ─────────────────────────────── */
#eeElevationSourceBadge {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
}

/* ── Dark mode / Dark map theme ──────────────────────────────── */
.mapboxgl-map .ee-elevation-progress,
.dark-theme .ee-elevation-progress {
    background: rgba(255, 255, 255, 0.1);
}

.mapboxgl-map .ee-elevation-progress-text,
.dark-theme .ee-elevation-progress-text {
    color: #e5e7eb;
}
