/* ============================================================
   monit_incendio.css - Estilos para Monitoreo de Incendios
   ============================================================
   Extraído de monitoreo_incendios.html
   ============================================================ */

.dropdown-menu {
    left: -20px !important;
    top: 100% !important;
}

.dropdown-menu .dropdown-item {
    background-color: white !important;
    color: black !important;
}

.dropdown-menu .dropdown-item:hover {
    background-color: black !important;
    color: white !important;
}

/* Institutional Header */
.institutional-header {
    background: linear-gradient(135deg, #d97706 0%, #7c2d12 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-family: 'Cinzel', serif;
    font-size: 2.2rem !important;
    text-align: left;
    padding: 20px 35px;
    text-transform: uppercase;
    letter-spacing: 4px;
    position: relative;
    margin-bottom: 0px;
    border-left: 6px solid #f59e0b;
    background-color: #fff;
    width: 100%;
}

@media (max-width: 768px) {
    .institutional-header {
        font-size: 1.6rem !important;
        letter-spacing: 2px;
        padding: 15px !important;
        margin-top: 0 !important;
        border-left: none !important;
        border-top: 6px solid #f59e0b !important;
        display: block !important;
        text-align: center !important;
        background-clip: text;
        -webkit-background-clip: text;
        color: transparent;
    }
}

/* Custom Styles for Fire Monitoring Viewer */
:root {
    --fire-primary: #f59e0b;
    --fire-dark: #b45309;
    --fire-glow: rgba(245, 158, 11, 0.35);
    --bg-light: #f8f9fa;
    --border-radius: 12px;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.fire-card {
    background: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    border: none;
    margin-bottom: 2rem;
}

.source-tabs-container {
    display: inline-flex;
    background: #fff7ed;
    padding: 5px;
    border-radius: 14px;
    box-shadow: inset 0 2px 6px rgba(245, 158, 11, 0.12);
    gap: 6px;
    border: 1px solid #fed7aa;
}

.source-tab {
    border: none;
    background: transparent;
    padding: 9px 24px;
    border-radius: 10px;
    font-weight: 700;
    color: #9a3412;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
    white-space: nowrap;
}

.source-tab.active {
    background: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%);
    color: #fff;
    box-shadow: 0 4px 14px var(--fire-glow);
}

.source-tab:hover:not(.active) {
    background: rgba(245, 158, 11, 0.12);
    color: #c2410c;
}

.fire-main-area {
    position: relative;
    display: flex;
    flex-direction: column;
    background: #fff;
}

.side-panel-toggle-btn {
    position: absolute;
    z-index: 35;
    background: rgba(18, 24, 38, 0.97);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.4);
    border-left: none;
    border-radius: 0 10px 10px 0;
    width: 22px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 4px 0 14px rgba(0,0,0,0.35);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.8rem;
    outline: none !important;
}
.side-panel-toggle-btn:hover {
    background: #ea580c;
    color: #ffffff;
    border-color: #ea580c;
    width: 26px;
}

.fire-side-panel {
    width: 100%;
    background: rgba(18, 24, 38, 0.97);
    padding: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    border-right: none;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(245,158,11,0.3) transparent;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (min-width: 992px) {
    .fire-main-area {
        flex-direction: row;
        height: calc(100vh - 100px);
        min-height: 750px;
        background: #fff7ed;
    }
    .fire-side-panel {
        width: 320px;
        flex-shrink: 0;
    }
    .side-panel-toggle-btn {
        top: 50%;
        left: 320px;
        transform: translateY(-50%);
    }
    .side-panel-toggle-btn:hover {
        transform: translateY(-50%) !important;
    }
    .fire-side-panel.collapsed {
        width: 0px !important;
        min-width: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        opacity: 0;
        pointer-events: none;
        overflow: hidden;
    }
    .fire-side-panel.collapsed + .side-panel-toggle-btn {
        left: 0px;
    }
}

@media (max-width: 991px) {
    .side-panel-toggle-btn {
        top: 10px;
        right: 15px;
        left: auto;
        transform: none;
        width: auto;
        height: 32px;
        padding: 0 12px;
        border: 1px solid rgba(245, 158, 11, 0.4);
        border-radius: 16px;
        font-size: 0.78rem;
        font-weight: 700;
        background: rgba(18, 24, 38, 0.97);
        color: #f59e0b;
        box-shadow: 0 4px 12px rgba(0,0,0,0.3);
        transition: all 0.3s ease;
    }
    .side-panel-toggle-btn::after {
        content: " Opciones";
        margin-left: 4px;
    }
    .side-panel-toggle-btn.btn-visible {
        background: #dc2626;
        border-color: #dc2626;
        color: #fff;
    }
    .side-panel-toggle-btn.btn-visible::after {
        content: " Ocultar";
        margin-left: 4px;
    }
    .side-panel-toggle-btn.btn-visible:hover {
        background: #b91c1c;
    }
    .side-panel-toggle-btn:hover {
        background: #ea580c;
        color: #fff;
        width: auto;
        transform: none !important;
    }
    .fire-side-panel {
        max-height: 1200px;
    }
    .fire-side-panel.collapsed {
        max-height: 0 !important;
        padding: 0 !important;
        opacity: 0;
        overflow: hidden;
    }
    .fire-image-section {
        min-height: 420px;
        height: 62vh;
    }
    /* Hint de teclado no aplica en celular */
    .fs-hint-overlay {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .playback-bar {
        padding: 6px 8px;
        gap: 4px 5px;
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: flex-start;
    }
    /* Fila 1: slider ancho completo */
    .playback-bar .pb-slider {
        order: 1;
        width: 100%;
        flex: 0 0 100%;
        margin-bottom: 3px;
        height: 8px;
    }
    /* Fila 2: botones de reproducción alineados */
    .playback-bar .btn-pb-prev { order: 2; width: 32px; height: 32px; font-size: 0.85rem; flex-shrink: 0; }
    .playback-bar .btn-pb-play { order: 3; width: 38px; height: 38px; font-size: 1rem;    flex-shrink: 0; }
    .playback-bar .btn-pb-next { order: 4; width: 32px; height: 32px; font-size: 0.85rem; flex-shrink: 0; }
    /* Info frame: ocupa espacio disponible entre botones y velocidad */
    .playback-bar div[style*="flex-direction:column"] {
        order: 5;
        flex: 1 1 auto;
        min-width: 0;
        margin: 0 4px !important;
    }
    /* Velocidad: icono + slider compacto */
    .playback-bar label       { order: 6; flex-shrink: 0; }
    .playback-bar .pb-speed   { order: 7; width: 44px; flex-shrink: 0; }
    /* Grupo zoom: orden explícito para no desplazar botones de play */
    .playback-bar .pb-zoom-group {
        order: 8;
        flex-shrink: 0;
        border-left: 1px solid rgba(0,0,0,0.12);
        padding-left: 5px;
        margin-left: 2px;
    }
    .pb-zoom-group .zoom-btn {
        width: 30px;
        height: 30px;
        font-size: 0.85rem;
    }
    /* Botón pantalla completa: solo ícono */
    .playback-bar .btn-fullscreen {
        order: 9;
        padding: 0 9px;
        border-radius: 8px;
        height: 34px;
        width: auto;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        margin-left: 2px;
        overflow: hidden;
        white-space: nowrap;
    }
    .playback-bar .btn-fullscreen i {
        font-size: 0.95rem;
    }
    /* Ocultar texto del botón pantalla completa en móvil */
    .playback-bar .btn-fs-label {
        display: none;
    }
}

.panel-group {
    background: rgba(255,255,255,0.04);
    padding: 0.65rem 0.8rem;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.07);
}

.panel-title {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 800;
    color: #f59e0b;
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(245,158,11,0.3);
    padding-bottom: 6px;
}
.panel-title i { margin-right: 8px; color: #f59e0b; }

/* Botones de Fuente de Datos (estilo v2) */
.source-btn-dark {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: #e2e8f0;
    padding: 9px 14px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.88rem;
    font-weight: 600;
    width: 100%;
    text-align: left;
    display: flex;
    align-items: center;
    margin-bottom: 6px;
}
.source-btn-dark i { margin-right: 9px; color: #f59e0b; font-size: 0.95rem; }
.source-btn-dark:hover { background: rgba(255,255,255,0.1); }
.source-btn-dark.active {
    background: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 15px rgba(245,158,11,0.35);
}
.source-btn-dark.active i { color: #fff; }

/* Botones de Canales Focos de Calor (estilo rojo/fuego diferenciado) */
.channel-btn-fire {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #fca5a5;
    padding: 8px 12px;
    border-radius: 9px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.84rem;
    font-weight: 600;
    width: 100%;
    text-align: left;
    display: flex;
    align-items: center;
    margin-bottom: 6px;
}
.channel-btn-fire i { margin-right: 9px; color: #ef4444; font-size: 0.9rem; }
.channel-btn-fire:hover {
    background: rgba(239, 68, 68, 0.16);
    color: #ffffff;
    border-color: rgba(239, 68, 68, 0.4);
}
.channel-btn-fire.active {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    border-color: #f87171;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(220, 38, 38, 0.4);
}
.channel-btn-fire.active i { color: #fff; }

.channel-btn {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1.5px solid #fed7aa;
    background: #fff7ed;
    color: #9a3412;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.85rem;
    font-weight: 600;
    width: 100%;
    text-align: left;
}
.channel-btn i {
    margin-right: 8px;
    font-size: 1rem;
}
.channel-btn:hover {
    background: #ffedd5;
    border-color: #f59e0b;
}
.channel-btn.active {
    background: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 3px 10px var(--fire-glow);
}

.frame-counter {
    font-size: 1.6rem;
    font-weight: 800;
    color: #d97706;
    margin: 0.15rem 0;
    line-height: 1.1;
}

.plazo-badge {
    background: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%);
    color: #fff;
    padding: 4px 12px;
    border-radius: 7px;
    font-weight: 700;
    display: inline-block;
    margin-top: 4px;
    font-size: 0.8rem;
    box-shadow: 0 3px 8px var(--fire-glow);
}

.playback-controls {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.btn-playback {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: none;
    background: #ffedd5;
    color: #9a3412;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.btn-prev, .btn-next {
    background: #ea580c;
    color: #fff;
}

.btn-play {
    background: #ef4444;
    width: 46px;
    height: 46px;
    font-size: 1.15rem;
    color: white;
    padding-left: 2px;
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.3);
}

.btn-play.is-playing {
    background: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25), 0 5px 14px rgba(16, 185, 129, 0.35);
}

.btn-playback:hover {
    transform: translateY(-2px) scale(1.05);
    filter: brightness(1.05);
}

.speed-slider {
    width: 100%;
    height: 5px;
    border-radius: 5px;
    background: #fed7aa;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    margin: 6px 0;
    accent-color: #ea580c;
}

.fire-image-section {
    flex: 1;
    position: relative;
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    overflow: hidden;
    padding: 0;
}

.fire-image-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    overflow: hidden;
    position: relative;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none; /* permite pinch-zoom y pan sin interferencia del browser */
}

.zoom-controls-overlay {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 25;
    display: none; /* Movido a la barra inferior */
    align-items: center;
    gap: 6px;
    background: rgba(18, 24, 38, 0.85);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(245, 158, 11, 0.35);
    border-radius: 8px;
    padding: 4px 8px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.35);
}

.zoom-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s ease;
}

.zoom-btn:hover {
    background: #f59e0b;
    color: #000;
    border-color: #f59e0b;
}

.zoom-reset-btn {
    background: rgba(245, 158, 11, 0.2);
    border: 1px solid rgba(245, 158, 11, 0.4);
    color: #f59e0b;
    padding: 4px 9px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    display: none;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
}

.zoom-reset-btn:hover {
    background: #f59e0b;
    color: #000;
}

.zoom-badge {
    font-size: 0.72rem;
    font-weight: 700;
    color: #fbbf24;
    padding: 0 4px;
    white-space: nowrap;
    display: none;
}

#ombg-custom-viewer img.is-zoomed {
    max-width: none !important;
    max-height: none !important;
    transform: scale(2.2);
    cursor: grab;
    transition: transform 0.2s ease;
}

/* Barra de Reproducción Inferior (estilo ejemplo1) */
.playback-bar {
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.playback-bar .btn-pb {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
}
.playback-bar .btn-pb-prev,
.playback-bar .btn-pb-next {
    background: #ea580c;
    color: #fff;
}
.playback-bar .btn-pb-play {
    background: #ef4444;
    color: #fff;
    width: 42px;
    height: 42px;
    font-size: 1.1rem;
    box-shadow: 0 3px 10px rgba(239,68,68,0.35);
}
.playback-bar .btn-pb-play.is-playing {
    background: #10b981;
    box-shadow: 0 3px 10px rgba(16,185,129,0.35);
}
.playback-bar .btn-pb:hover {
    transform: scale(1.07);
    filter: brightness(1.1);
}

.playback-bar .plazo-info {
    font-size: 0.8rem;
    font-weight: 700;
    color: #9a3412;
    white-space: nowrap;
}

.playback-bar .frame-info {
    font-size: 0.75rem;
    color: #6b7280;
    white-space: nowrap;
}

.playback-bar .pb-slider {
    flex: 1;
    min-width: 100px;
    height: 6px;
    border-radius: 5px;
    background: #fed7aa;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    accent-color: #ea580c;
}

.playback-bar .pb-speed {
    width: 90px;
    height: 5px;
    border-radius: 5px;
    background: #fed7aa;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    accent-color: #f59e0b;
}

.playback-bar .btn-fullscreen {
    background: #1e293b;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 7px 13px;
    font-size: 0.78rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.playback-bar .btn-fullscreen:hover { background: #f59e0b; color: #000; }

/* Fullscreen: barra oscura de reproducción */
#fullscreenTarget:fullscreen .playback-bar,
#fullscreenTarget:-webkit-full-screen .playback-bar,
#fullscreenTarget:-moz-full-screen .playback-bar {
    background: rgba(15, 23, 42, 0.96);
    border-top: 1px solid rgba(245, 158, 11, 0.25);
}
#fullscreenTarget:fullscreen .playback-bar .btn-pb-prev,
#fullscreenTarget:fullscreen .playback-bar .btn-pb-next,
#fullscreenTarget:-webkit-full-screen .playback-bar .btn-pb-prev,
#fullscreenTarget:-webkit-full-screen .playback-bar .btn-pb-next {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}
#fullscreenTarget:fullscreen #frameCounter,
#fullscreenTarget:-webkit-full-screen #frameCounter {
    color: #f59e0b;
}
#fullscreenTarget:fullscreen #plazoLabel,
#fullscreenTarget:-webkit-full-screen #plazoLabel {
    color: #94a3b8;
}

/* Grupo de zoom en la barra inferior */
.pb-zoom-group {
    display: flex;
    align-items: center;
    gap: 4px;
    border-left: 1px solid rgba(0,0,0,0.1);
    padding-left: 8px;
    margin-left: 4px;
}
#fullscreenTarget:fullscreen .pb-zoom-group,
#fullscreenTarget:-webkit-full-screen .pb-zoom-group {
    border-left-color: rgba(255,255,255,0.15);
}
.pb-zoom-group .zoom-btn {
    background: rgba(30,41,59,0.7);
    border: 1px solid rgba(255,255,255,0.1);
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s;
}
.pb-zoom-group .zoom-btn:hover { background: #f59e0b; color: #000; border-color: #f59e0b; }
.pb-zoom-group .zoom-badge {
    font-size: 0.7rem;
    font-weight: 700;
    color: #f59e0b;
    background: rgba(245,158,11,0.12);
    border: 1px solid rgba(245,158,11,0.3);
    border-radius: 5px;
    padding: 1px 6px;
    white-space: nowrap;
}
.pb-zoom-group .zoom-reset-btn {
    background: rgba(245,158,11,0.15);
    border: 1px solid rgba(245,158,11,0.35);
    color: #f59e0b;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    cursor: pointer;
    display: none;
    align-items: center;
    gap: 3px;
    white-space: nowrap;
    transition: all 0.2s;
}
.pb-zoom-group .zoom-reset-btn:hover { background: #f59e0b; color: #000; }

/* Hint de fullscreen */
.fs-hint-overlay {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 30;
    background: rgba(15,23,42,0.88);
    color: #e2e8f0;
    border: 1px solid rgba(245,158,11,0.3);
    border-radius: 8px;
    padding: 7px 16px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}
.fs-hint-overlay kbd {
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 4px;
    padding: 1px 5px;
    font-size: 0.72rem;
    font-family: monospace;
}
.fs-hint-overlay.visible { opacity: 1; }

.fire-image-section img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: center center;
    cursor: zoom-in;
    display: block;
    margin: 0;
    /* SIN transition:transform — interfiere con pinch-zoom táctil */
    image-rendering: -webkit-optimize-contrast;
}

.fire-slider-overlay {
    width: 100%;
    padding: 15px 25px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85), transparent);
    position: absolute;
    bottom: 0;
    left: 0;
    z-index: 10;
}

.custom-range {
    width: 100%;
    height: 6px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.25);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.custom-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #f59e0b;
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.history-panel {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid #fed7aa;
    padding: 0.6rem 0.75rem;
}

.history-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    margin-top: 4px;
}

.history-day-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 7px 10px;
    border-radius: 8px;
    border: 1.5px solid #fed7aa;
    background: #fff7ed;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    width: 100%;
}

.history-day-btn:hover {
    background: #ffedd5;
    border-color: #f59e0b;
}

.history-day-btn.active {
    background: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 3px 10px var(--fire-glow);
}

.history-day-btn .hday-date {
    font-size: 0.82rem;
    font-weight: 700;
    color: inherit;
}

/* Fullscreen viewer modal */
#ombg-custom-viewer {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.97);
    z-index: 999999;
    flex-direction: column;
    overflow: hidden;
}

#ombg-custom-viewer img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    cursor: default;
    user-select: none;
    -webkit-user-select: none;
}

#ombg-custom-viewer .img-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
}


.wrf-loader-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    display: none;
    color: white;
}

/* Leyenda de NASA FIRMS */
.nasa-legend {
    background: rgba(18, 24, 38, 0.95) !important;
    color: #e2e8f0 !important;
    padding: 10px 12px !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 14px rgba(0,0,0,0.35) !important;
    font-size: 11px !important;
    border: 1px solid rgba(255,255,255,0.15) !important;
    font-family: 'Poppins', sans-serif !important;
}
.nasa-legend h4 {
    margin: 0 0 5px 0 !important;
    font-size: 11.5px !important;
    font-weight: 700 !important;
    color: #f59e0b !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}
.nasa-legend-items {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.nasa-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}
.nasa-legend-color {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

/* Optimización para dispositivos móviles */
@media (max-width: 768px) {
    .nasa-legend {
        padding: 6px 10px !important;
        font-size: 10px !important;
        margin: 8px !important;
        border-radius: 6px !important;
        box-shadow: 0 2px 10px rgba(0,0,0,0.4) !important;
        width: calc(100% - 16px) !important;
        max-width: 340px !important;
    }
    .nasa-legend h4 {
        font-size: 10px !important;
        margin-bottom: 4px !important;
        text-align: center;
    }
    .nasa-legend-items {
        flex-direction: row !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 4px 10px !important;
    }
    .nasa-legend-item {
        gap: 4px !important;
    }
    .nasa-legend-color {
        width: 8px;
        height: 8px;
    }
}


