/* ============================================================
   GLOBAL
============================================================ */

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: "Segoe UI", Arial, sans-serif;
    background: #1e1e1e;
    color: #fff;
}

* {
    box-sizing: border-box;
}

/* Contenedor principal del visor */
#container {
    width: 100%;
    height: 100%;
    position: relative;
}

/* Scrollbars uniformes */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-thumb {
    background: rgba(120,120,120,0.4);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(160,160,160,0.6);
}


.leaflet-coords,
.leaflet-bounds,
.leaflet-crs,
.leaflet-click-debug {
    background: rgba(255,255,255,0.85);
    border-radius: 4px;
    padding: 4px 8px;
    font-family: "Segoe UI", sans-serif;
    border: 1px solid #777;
}


/* CSS LEYENDAS */

/* ================================
   LEYENDAS — ESTILO PANEL LATERAL
   ================================ */

.legend-item {
    background: #2b2b2b;                 /* Fondo igual que tarjetas del panel */
    border: 1px solid #3b3b3b;           /* Borde sutil como los items de capa */
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;

    box-shadow: 0 1px 3px rgba(0,0,0,0.35);
}

.legend-title {
    font-weight: 600;
    font-size: 13px;
    color: #e6e6e6;                       /* Mismo blanco suave del panel */
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    opacity: 0.95;
}

.legend-rule {
    display: flex;
    align-items: center;
    gap: 10px;

    padding: 4px 0;
}

.legend-color {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    border: 1px solid rgba(255,255,255,0.15);  /* borde elegante */
}

.legend-label {
    color: #d8d8d8;                       /* Texto gris claro */
    font-size: 13px;
    letter-spacing: 0.2px;
}


/* Añade separación visual con el bloque del título "Leyendas activas" */
.legend-section {
    margin-top: 10px;
}

.legend-section .sidebar-section-title {
    margin-bottom: 10px;
    color: #c9eaff;                       /* azulito del panel */
}


/*  SPINNER RATÓN? */

/* Spinner en popup durante la carga */
.spinner {
    width: 14px;
    height: 14px;
    border: 2px solid #ccc;
    border-top-color: #333;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Cursor de espera mientras se carga */
body.loading {
    cursor: progress !important;
}

/* También para cualquier elemento interactivo */
body.loading * {
    cursor: progress !important;
}
