/* ==== RADAR VMI - CONFIGURAZIONE LAYOUT ==== */
.radar-station-container {
    max-width: 1200px;
    margin: 0 auto;
    padding:0 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    background: repeating-linear-gradient( 0deg, #07175a, #07175a 2px, #0b267d 3px );
    background-size: auto;
    background-size: 2px 2px;
    border: 3px solid #273cff;
    border-radius: 6px;
    box-shadow: 0px 0px 9px 2.25px rgba(0, 0, 0, 0.5), inset 0px 50px 60px 0px rgba(0, 0, 0, 0.5), inset 0px 0px 21px 0px rgba(255, 255, 255, 0.13);
}

/* INTERFACCIA HEADER LIVE */
.header-main-title p {
    margin: 0;
    color: #ddd;
    font-size: 0.95rem;
}

/* PANNELLO DI CONTROLLO COMPATTO (STILE VETRO SATINATO) */
.radar-control-panel {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 12px 20px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
}

.radar-tabs-group {
    display: flex;
    gap: 10px;
}

.radar-btn {
    border: 1px solid #cbd5e1;
    background-color: #ffffff;
    padding: 8px 20px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Exo 2', sans-serif;
    transition: all 0.25s ease;
}

.radar-btn i {
    font-size: 1rem;
}

.radar-btn:hover {
    background-color: #f8fafc;
    color: #05056c;
    border-color: #94a3b8;
}

.radar-btn.active {
    background-color: #05056c;
    color: #ffd21f;
    border-color: #05056c;
    box-shadow: 0 2px 4px rgba(5, 5, 108, 0.2);
}

.btn-fullscreen {
    background-color: #f1f5f9;
}
.btn-fullscreen:hover {
    background-color: #e2e8f0;
    color: #1e293b;
}

/* VISORE COMPATTO DELLO SCHERMO RADAR */
.radar-viewport {
    position: relative;
    width: 100%;
    max-width: 750px; /* Dimensione simmetrica ottimale */
    margin: 0 auto;
    background-color: #1e293b;
    border: 4px solid #05056c;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.radar-viewport img {
    width: 100%;
    height: auto;
    display: block;
}

/* Angoli estetici da radar militare in sovrapposizione */
.viewport-overlay-ui .ui-corner {
    position: absolute;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 210, 31, 0.4);
    z-index: 10;
    pointer-events: none;
}
.ui-corner.top-left { top: 15px; left: 15px; border-right: none; border-bottom: none; }
.ui-corner.top-right { top: 15px; right: 15px; border-left: none; border-bottom: none; }
.ui-corner.bottom-left { bottom: 15px; left: 15px; border-right: none; border-top: none; }
.ui-corner.bottom-right { bottom: 15px; right: 15px; border-left: none; border-top: none; }

/* Gestione Fullscreen Nativo del browser */
.radar-viewport:fullscreen {
    max-width: 100vw !important;
    max-height: 100vh !important;
    border: none;
    border-radius: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #000000;
}
.radar-viewport:fullscreen img {
    width: auto;
    height: 100vh;
    max-width: 100vw;
    object-fit: contain;
}

/* SCHEDA LEGENDA TECNICA COMPATTA */
.radar-legend-card {
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.radar-legend-card h3 {
    margin: 0 0 4px 0;
    font-size: 1.2rem;
    color: #05056c;
    font-weight: 600;
}

.radar-legend-card h3 i {
    color: #ffd21f;
    margin-right: 6px;
}

.legend-subtitle {
    font-size: 0.88rem;
    color: #64748b;
    margin-bottom: 20px;
}

/* Griglia orizzontale fluidificata per i dBZ */
.legend-scale-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #cbd5e1;
    margin-bottom: 20px;
}

.scale-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 5px;
    text-align: center;
}

.scale-step span {
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.scale-step <small> {
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 2px;
    opacity: 0.9;
}

.legend-footer-info {
    border-top: 1px dashed #e2e8f0;
    padding-top: 15px;
}

.legend-footer-info p {
    margin: 0;
    font-size: 0.82rem;
    color: #64748b;
    line-height: 1.4;
}
.legend-footer-info p i {
    color: #05056c;
    margin-right: 4px;
}

/* MEDIA QUERIES RESPONSIVE MOBILE */
@media (max-width: 768px) {
    .radar-station-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        padding: 15px;
    }
    
    .radar-control-panel {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
        padding: 15px;
    }
    
    .radar-tabs-group {
        flex-direction: column;
    }
    
    .radar-btn {
        width: 100%;
        justify-content: center;
        padding: 10px;
    }
    
    .legend-scale-bar {
        grid-template-columns: repeat(2, 1fr); /* Diventa a 2 colonne stabili sul telefono */
    }
}