/* Weather — página experimental de visualización de viento global. Reusa
   header/loader/hint de globe.css. Solo añadimos lo específico del canvas
   y la leyenda de velocidad. */

#weather-container {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100%;
    height: 100vh;
    z-index: 2;
}
#weather-container canvas {
    outline: none;
    display: block;
}

.weather-legend {
    position: fixed;
    bottom: 1.2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 50;
    background: rgba(15, 22, 55, 0.62);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(76, 201, 255, 0.32);
    border-radius: 12px;
    padding: 0.75rem 1.1rem 0.65rem;
    color: #fff;
    font-family: 'Inter', sans-serif;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
    min-width: 280px;
}
.legend-title {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--accent);
    margin-bottom: 0.45rem;
    text-align: center;
}
.legend-bar {
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(to right,
        rgb(60, 90, 200) 0%,
        rgb(70, 200, 220) 25%,
        rgb(110, 230, 130) 50%,
        rgb(245, 220, 90) 75%,
        rgb(245, 130, 90) 100%);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.legend-scale {
    display: flex;
    justify-content: space-between;
    font-size: 0.68rem;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 0.35rem;
    letter-spacing: 0.04em;
}
.legend-meta {
    font-size: 0.68rem;
    color: rgba(255, 255, 255, 0.55);
    text-align: center;
    margin-top: 0.45rem;
    letter-spacing: 0.04em;
}

/* Markers HTML proyectados sobre el canvas (sismos M6+, label ISS,
   wildfires de NASA EONET). Position absoluta dentro de
   #weather-container; weather.js actualiza left/top cada frame
   proyectando el Vector3 con camera.project(). */
.quake-marker, .iss-marker, .wildfire-marker, .plane-marker, .satellite-marker {
    position: absolute;
    pointer-events: auto;
    user-select: none;
    z-index: 10;
}

/* Satélites visibles del catálogo Celestrak. Icono fa-satellite con
   tonalidad cyan-verdosa para diferenciarlos de aviones (azul-blanco). */
.satellite-marker {
    color: #b0fbe2;
    font-size: 9px;
    transform: translate(-50%, -50%);
    text-shadow: 0 0 5px rgba(140, 240, 200, 0.85),
                 0 0 10px rgba(80, 200, 170, 0.45);
    transition: color 0.15s ease, transform 0.15s ease;
    line-height: 1;
}
.satellite-marker:hover {
    color: #ffffff;
    transform: translate(-50%, -50%) scale(1.5);
    z-index: 20;
}

/* Tooltip flotante con info del vuelo (callsign + ruta dep→arr). */
.flight-tooltip {
    position: fixed;
    z-index: 200;
    background: rgba(15, 22, 55, 0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(76, 201, 255, 0.42);
    border-radius: 12px;
    padding: 0.85rem 1.05rem 0.75rem;
    color: white;
    font-family: 'Inter', sans-serif;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6),
                0 0 24px rgba(76, 201, 255, 0.18);
    min-width: 240px;
    pointer-events: auto;
}
.flight-tooltip .ft-close {
    position: absolute;
    top: 4px;
    right: 8px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.65);
    font-size: 1.2rem;
    cursor: pointer;
    line-height: 1;
    padding: 0.1rem 0.35rem;
    transition: color 0.15s ease;
}
.flight-tooltip .ft-close:hover {
    color: white;
}
.flight-tooltip .ft-callsign {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 0.65rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.flight-tooltip .ft-route {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}
.flight-tooltip .ft-leg {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
    flex: 1;
}
.flight-tooltip .ft-leg strong {
    font-size: 1.05rem;
    color: white;
    font-weight: 700;
    letter-spacing: 0.04em;
}
.flight-tooltip .ft-leg span {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.65);
    margin-top: 0.2rem;
}
.flight-tooltip .ft-arrow {
    color: var(--accent);
    font-size: 1rem;
    flex-shrink: 0;
}

/* Avioncito sobre cada arco internacional. La rotación se aplica desde JS
   (screen-space), así que aquí solo definimos el estilo base. */
.plane-marker {
    color: #f0fbff;
    font-size: 10px;
    text-shadow: 0 0 6px rgba(150, 200, 255, 0.85),
                 0 0 12px rgba(120, 180, 255, 0.45);
    transition: color 0.15s ease, opacity 0.2s ease;
    pointer-events: auto;
    cursor: default;
    line-height: 1;
}
.plane-marker:hover {
    color: #ffe8a0;
    text-shadow: 0 0 8px rgba(255, 220, 130, 1);
}

/* Icono de flama para wildfires (NASA EONET) — Font Awesome fa-fire
   con color cálido + glow, escala suave al hover. */
.wildfire-marker {
    color: #ff6638;
    font-size: 11px;
    transform: translate(-50%, -50%);
    text-shadow: 0 0 6px rgba(255, 100, 50, 0.85),
                 0 0 12px rgba(255, 60, 30, 0.55);
    transition: transform 0.18s ease, color 0.18s ease;
    line-height: 1;
}
.wildfire-marker:hover {
    color: #ffb060;
    transform: translate(-50%, -50%) scale(1.6);
    z-index: 20;
}

/* La regla .quake-marker base vive en globe.css (incluido por la tpl).
   No la duplicamos. */

.iss-marker {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    background: rgba(15, 22, 55, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.45);
    color: white;
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    box-shadow: 0 0 14px rgba(255, 255, 255, 0.25), 0 2px 6px rgba(0, 0, 0, 0.45);
    transform: translate(-50%, -50%);
    transition: opacity 0.2s ease;
}
.iss-marker i {
    font-size: 0.78rem;
    color: #cfe8ff;
    text-shadow: 0 0 6px rgba(180, 220, 255, 0.7);
}

@media (max-width: 768px) {
    .weather-legend { min-width: 220px; padding: 0.55rem 0.85rem 0.5rem; }
    .iss-marker { font-size: 0.62rem; padding: 0.2rem 0.5rem; }
}
