*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

html,
body{
    width:100%;
    height:100%;
    overflow:hidden;

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    background:#0F172A;
}

#sidebar{

    position:absolute;

    top:0;
    left:0;

    width:300px;
    height:100%;

    background:#48627A;

    z-index:2000;

    overflow-y:auto;

    box-shadow:
        2px 0px 10px rgba(0,0,0,0.4);
}

#logo-area{

    text-align:center;

    padding:20px;
}

#logo{

    width:120px;

    max-width:100%;
}

#logo-area h2{

    margin-top:10px;

    color:white;

    font-size:24px;
}

#logo-area span{

    color:#dbe5ec;

    font-size:12px;
}

#sidebar h3{

    color:white;

    padding:15px;

    font-size:15px;

    letter-spacing:1px;
}

.menu-item{

    padding:12px 20px;

    color:white;

    cursor:pointer;

    transition:0.2s;
}

.menu-item:hover{

    background:#25C7A8;

    color:#0F172A;
}

hr{

    border:none;

    border-top:
        1px solid rgba(255,255,255,0.2);

    margin:10px;
}

#topbar{

    position:absolute;

    left:300px;
    top:0;

    right:0;

    height:60px;

    background:#425B73;

    z-index:1500;

    display:flex;

    align-items:center;

    justify-content:space-between;

    padding-left:20px;
    padding-right:20px;

    color:white;

    font-weight:bold;

    box-shadow:
        0px 2px 8px rgba(0,0,0,0.4);
}

#map{

    position:absolute;

    top:60px;
    left:300px;

    right:0;
    bottom:50px;
}

#timeline{

    position:absolute;

    left:300px;
    right:0;

    bottom:0;

    height:50px;

    background:#425B73;

    z-index:1500;

    display:flex;

    align-items:center;

    justify-content:center;

    color:white;

    font-size:14px;
}

.leaflet-container{

    background:#000;
}


/* ============================================================
   PLAYER INDEPENDENTE GOES-19
   ============================================================ */

#goes-player{
    position:absolute;
    left:auto;
    right:20px;
    top:55px;
    z-index:1600;
    min-width:470px;
    padding:8px 10px;
    border-radius:7px;
    background:rgba(36, 53, 70, 0.92);
    color:white;
    box-shadow:0 2px 10px rgba(0,0,0,0.45);
    backdrop-filter:blur(3px);
}

#goes-player.hidden{
    display:none;
}

.goes-player-title{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:20px;
    margin-bottom:7px;
    font-size:12px;
    font-weight:bold;
}

.goes-player-controls{
    display:flex;
    align-items:center;
    gap:6px;
}

.goes-player-controls button{
    height:28px;
    padding:0 10px;
    border:1px solid rgba(255,255,255,0.28);
    border-radius:4px;
    background:#425B73;
    color:white;
    cursor:pointer;
    font-weight:bold;
}

.goes-player-controls button:hover{
    background:#25C7A8;
    color:#0F172A;
}

#goes-frame-counter{
    min-width:55px;
    margin-left:4px;
    text-align:center;
    font-size:11px;
}

@media (max-width: 900px){
    #goes-player{
        left:310px;
        right:10px;
        min-width:0;
    }

    .goes-player-title{
        gap:8px;
    }

    .goes-player-controls{
        flex-wrap:wrap;
    }
}


/* ============================================================
   DETECTA V3.3
   CIDADES — LABELS DINÂMICOS DO MAPA
   ============================================================ */

.cidade-label-container {

    background: transparent !important;

    border: none !important;

    box-shadow: none !important;

    pointer-events: none !important;

}


.cidade-label {

    display: inline-block;

    color: #ffffff;

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    font-size: 11px;

    font-weight: 600;

    line-height: 1;

    white-space: nowrap;

    pointer-events: none;

    transform:
        translate(-50%, -50%);

    text-shadow:
        -1px -1px 2px #000000,
         1px -1px 2px #000000,
        -1px  1px 2px #000000,
         1px  1px 2px #000000,
         0px  0px 4px #000000;

}


.cidade-capital {

    font-size: 13px;

    font-weight: 700;

}


.cidade-municipio {

    font-size: 11px;

    font-weight: 600;

}


/* ============================================================
   DETECTA - ALERTA DE CHUVA POR SATELITE
   ============================================================ */

.alerta-satelite-menu {
    position: relative;
}

.alerta-satelite-indicador {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 7px;
    border-radius: 50%;
    background: rgba(255,255,255,0.35);
    vertical-align: middle;
}

.alerta-satelite-menu.alerta-ativo {
    background: rgba(255, 70, 30, 0.18) !important;
    border-left: 3px solid #ff4d20 !important;
    font-weight: 700;
}

.alerta-satelite-menu.alerta-ativo
.alerta-satelite-indicador {
    background: #ff4d20;
    box-shadow:
        0 0 0 3px rgba(255,77,32,0.18);
}

.alerta-satelite-status {
    min-width: 175px;
    background: rgba(15,25,35,0.92);
    color: #fff;
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.25);
    box-shadow: 0 2px 8px rgba(0,0,0,0.40);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 11px;
}

.alerta-status-titulo {
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 4px;
}

.alerta-status-ok {
    color: #d8f5df;
}

.alerta-status-alerta {
    color: #ffe59a;
    font-weight: 700;
}

.alerta-status-erro {
    color: #ff9f9f;
}

.alerta-satelite-popup {
    min-width: 180px;
    line-height: 1.55;
}

.alerta-popup-titulo {
    font-weight: 700;
    font-size: 13px;
    margin-bottom: 5px;
}


/* MOBILE */

@media (max-width: 700px) {

    .alerta-satelite-status {
        min-width: 145px;
        max-width: 175px;
        padding: 6px 8px;
        font-size: 10px;
    }

    .alerta-status-titulo {
        font-size: 11px;
    }

}



/* ==========================================================
   DETECTA - TIMELINE PRODUTOS - MOBILE
   Corrige Play cortado fora da viewport
   ========================================================== */

@media (max-width: 768px) {

    #timeline {
        box-sizing: border-box !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        max-width: 100vw !important;
        overflow: hidden !important;
    }

    #timeline-controls {
        box-sizing: border-box !important;
        width: 100% !important;
        max-width: 100% !important;

        display: grid !important;

        grid-template-columns:
            auto
            auto
            minmax(70px, 1fr)
            auto !important;

        align-items: center !important;

        column-gap: 6px !important;
        row-gap: 4px !important;

        padding-left: 8px !important;
        padding-right: 8px !important;

        margin: 0 !important;

        transform: none !important;
        left: auto !important;
        right: auto !important;
    }

    #btn-play {
        position: static !important;

        display: block !important;

        margin: 0 !important;

        transform: none !important;

        min-width: 42px !important;
        max-width: 42px !important;

        padding: 6px 4px !important;

        font-size: 0 !important;

        overflow: hidden !important;
        white-space: nowrap !important;

        grid-column: 1 !important;
        grid-row: 1 !important;
    }

    #btn-play::first-letter {
        font-size: 18px;
    }

    #timeline-step {
        position: static !important;

        margin: 0 !important;
        transform: none !important;

        white-space: nowrap !important;

        grid-column: 2 !important;
        grid-row: 1 !important;
    }

    #timeline-slider {
        position: static !important;

        width: 100% !important;
        min-width: 0 !important;

        margin: 0 !important;
        transform: none !important;

        grid-column: 3 !important;
        grid-row: 1 !important;
    }

    #timeline-data {
        position: static !important;

        margin: 0 !important;
        transform: none !important;

        white-space: nowrap !important;

        font-size: 14px !important;

        grid-column: 4 !important;
        grid-row: 1 !important;
    }

    #timeline-produto {
        position: static !important;

        margin: 0 !important;
        transform: none !important;

        text-align: center !important;
        white-space: nowrap !important;

        grid-column: 1 / -1 !important;
        grid-row: 2 !important;

        font-size: 14px !important;
    }

}


/* Celulares estreitos */

@media (max-width: 480px) {

    #timeline-controls {
        grid-template-columns:
            40px
            auto
            minmax(55px, 1fr)
            auto !important;

        column-gap: 4px !important;

        padding-left: 6px !important;
        padding-right: 6px !important;
    }

    #btn-play {
        min-width: 40px !important;
        max-width: 40px !important;
    }

    #timeline-data {
        font-size: 13px !important;
    }

    #timeline-produto {
        font-size: 13px !important;
    }

}
