/* =========================================================
   OML METEO - COMPONENTS CSS
   Componenti grafici comuni
   ========================================================= */


/* ---------------------------------------------------------
   BOX GENERALI
   --------------------------------------------------------- */

.box {
    margin: 0 0 9px;
    padding: 0;
    background: #fff;
    /*border: 1px solid #6d91aa; */
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.14);
}

.box-title {
    margin: 0;
    padding: 5px 8px;
    background: linear-gradient(#0b304d 15%,#02203a);
    /*background: linear-gradient(#b4d8f8 30%,#73baee);*/
    color: #adff2f;
    border-bottom: 2px solid #ddd;
    font-size: 13px;
    font-weight: bold;
    line-height: 1.2;
    text-shadow: 1px 1px 1px #000;
}

.box-content {
    padding: 7px;
}

.box-compact .box-content {
    padding: 6px;
}

.allerta .box-title {
    background: linear-gradient(#ffff00 15%,#ffd43b);
    color:#333;
    text-shadow: 1px 1px 1px #ff0;
}

.sidebar .box-title {
    background: linear-gradient(#cf3 15%,#9c0);
    color:#0b304d;
    text-shadow: 1px 1px 1px #fff;
}  
.sidebar .box-content {
    background-image: repeating-linear-gradient(
        0deg,
        #05056c,
        #05056c 1px,
        #2b3990 1px,
        #2b3990
    );
    background-size: 2px 2px;
    box-shadow:
        0 0 9px 2.25px rgba(0, 0, 0, 0.5),
        inset 0 50px 60px 0 rgba(0, 0, 0, 0.5),
        inset 0 0 21px 0 rgba(255, 255, 255, 0.13);
    color: #ffffff;
    text-shadow: 1px 1px 1px #000;
}

.box-footer {
    margin-top: 9px;
    padding-top: 7px;
    border-top: 1px solid #c4d9e7;
    text-align: right;
}

.box-footer a {
    color: #176b96;
    font-size: 11px;
    font-weight: bold;
    text-decoration: none;
}

.box-footer a:hover {
    color: #ADFF2F;
    background-color: #023A38;
    border-radius: 6px; padding: 5px;
}


/* ---------------------------------------------------------
   TITOLI
   --------------------------------------------------------- */

.section-title {
    margin: 0 0 7px;
    padding: 4px 7px;
    background: #e8f3fa;
    color: #02203a;
    border-left: 4px solid #4fc3f7;
    font-size: 14px;
    font-weight: bold;
    line-height: 1.2;
}

.section-subtitle {
    margin: 0 0 5px;
    color: #16415f;
    font-size: 13px;
    font-weight: bold;
}


/* ---------------------------------------------------------
   TESTO
   --------------------------------------------------------- */

.box-content p {
    margin-bottom: 7px;
}

.box-content p:last-child {
    margin-bottom: 0;
}

.sidebar .box-content p {
    color: #ddd;
}

.info {
    margin: 0 0 8px;
    padding: 6px 8px;
    background: #eef7fd;
    border: 1px solid #b8d7ea;
    color: #24475c;
}

.warning {
    margin: 0 0 8px;
    padding: 6px 8px;
    background: #fff8df;
    border: 1px solid #dfc76b;
    color: #5f5117;
}

.error {
    margin: 0 0 8px;
    padding: 6px 8px;
    background: #fff0f0;
    border: 1px solid #d79a9a;
    color: #702626;
}


/* ---------------------------------------------------------
   TABELLE CLASSICHE
   --------------------------------------------------------- */

.table-wrapper { /* -- contenitore tabella con padding */
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 25px;
    min-height: 300px;
    position: relative;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    overflow-x: auto;
}

.table-cornice { /* -- contenitore tabella classica */
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 10px;
}

table {
    width: 100%;
    background: #ffffff;
    color: #333;
    border-collapse: collapse;
    text-align: center;
    font-size: 0.95rem;
    font-family: "Exo 2", sans-serif;
}

th {
    border-bottom: 2px solid #e2e8f0;
    color: #475569;;
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    padding: 12px 15px;
}

td {
    padding: 12px 15px;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: middle;
}

th:first-child, td:first-child {
    text-align: left;
}

tbody tr:nth-child(even) {
    background-color: #f8fafc;
}

tbody tr:hover {
    background-color: #f1f5f9;
}

/* ---------------------------------------------------------
   TABELLE COMPATTE
   --------------------------------------------------------- */

.table-compact th,
.table-compact td {
    padding: 3px 5px;
}

.table-compact th {
    border-top: 2px solid #4fc3f7;
}


/* ---------------------------------------------------------
   DATI METEO
   --------------------------------------------------------- */

.meteo-value {
    font-weight: bold;
    white-space: nowrap;
}

.meteo-unit {
    margin-left: 2px;
    font-size: 0.85em;
    opacity: 0.75;
}

.meteo-label {
    color: #31566e;
}

.meteo-time {
    display: block;
    margin-top: 2px;
    color: #687d8b;
    font-size: 10px;
    white-space: nowrap;
}

.sidebar .meteo-time {
    color: #b8c8e8;
}

/* ---------------------------------------------------------
   BADGE
   --------------------------------------------------------- */

.badge {
    display: inline-block;
    padding: 2px 6px;
    background: #dcecf6;
    border: 1px solid #a9c6d8;
    color: #173b52;
    font-size: 10px;
    font-weight: bold;
    line-height: 1.2;
}

.badge-live {
    background: #02203a;
    border-color: #02203a;
    color: #adff2f;
}


/* ---------------------------------------------------------
   PULSANTI
   --------------------------------------------------------- */

.button {
    display: inline-block;
    padding: 4px 8px;
    background: #02203a;
    border: 1px solid #011728;
    color: #ffffff;
    font-size: 12px;
    font-weight: bold;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
}

.button:hover {
    background: #16415f;
    color: #ffffff;
    text-decoration: none;
}

.button-secondary {
    background: #dcecf6;
    border-color: #9ebccc;
    color: #173b52;
}

.button-secondary:hover {
    background: #c5e0ef;
    color: #173b52;
}


/* ---------------------------------------------------------
   LISTE LINK
   --------------------------------------------------------- */

.link-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.link-list li {
    margin: 0;
    padding: 0 0 0px 10px;
    background: url(/images/icone/freccia_list.gif) 0px 6px no-repeat;
    border-bottom: 1px solid #d5e2ea;
}

.link-list li:last-child {
    border-bottom: 0;
}

.link-list a {
    display: block;
    padding: 4px 5px;
    color: #075a8d;
}

.link-list a:hover {
    background: #eef7fd;
    color: #02203a;
    text-decoration: none;
}

.sidebar .link-list li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.sidebar .link-list a {
    color: #ffffff;
}

.sidebar .link-list a:hover {
    background: rgba(0, 0, 0, 0.35);
    color: #cf3;
}

/* ---------------------------------------------------------
   SEPARATORI
   --------------------------------------------------------- */

.separator {
    height: 1px;
    margin: 8px 0;
    background: #c5d4df;
    border: 0;
}

.separator-nav {
  font-weight: bold;
  color: #EBB616;
  text-decoration: none;

}


/* ---------------------------------------------------------
   GRIGLIE DATI
   --------------------------------------------------------- */

.data-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
}

.data-item {
    padding: 5px 6px;
    background: #f4f8fb;
    border: 1px solid #c5d4df;
}

.sidebar .data-item {
    background: rgba(0, 0, 35, 0.45);
    border: 1px solid rgba(79, 195, 247, 0.35);
    color: #ffffff;
}

.data-item-label {
    display: block;
    margin-bottom: 2px;
    color: #587181;
    font-size: 10px;
    line-height: 1.2;
}

.sidebar .data-item-label {
    color: #b9dfff;
}

.data-item-value {
    display: block;
    color: #02203a;
    font-size: 15px;
    font-weight: bold;
    line-height: 1.1;
}

.sidebar .data-item-value {
    color: #ffffff;
}


/* ---------------------------------------------------------
   IMMAGINI
   --------------------------------------------------------- */

.image-box {
    margin: 0;
    padding: 0;
    min-width: 0;
}

.image-box img {
    display: block;
    width: 100%;
    height: auto;
}

.image-caption {
    padding: 3px 5px;
    background: #eef4f8;
    border: 1px solid #c5d4df;
    border-top: 0;
    color: #587181;
    font-size: 10px;
    line-height: 1.2;
}


/* ---------------------------------------------------------
   STATO DATI
   --------------------------------------------------------- */

.update-info {
    color: #687d8b;
    font-size: 10px;
}

.status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.status-dot {
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    border-radius: 50%;
    background: #777777;
}

.status-online .status-dot {
    background: #5aa52c;
}

.status-offline .status-dot {
    background: #b33a3a;
}


/* ---------------------------------------------------------
   UTILITY
   --------------------------------------------------------- */

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-left {
    text-align: left;
}

.nowrap {
    white-space: nowrap;
}

.muted {
    color: #687d8b;
}

.small {
    font-size: 11px;
}

.float-right {
    float: right;
}

.exclamation {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 15px 0 25px 0;
    padding: 1px 16px;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 12px;
    color: #64748b;
} 

details, .nota {
    background-color: rgba(255,255,255,0.2);
    padding: 6px 10px;
    border-radius: 6px;
    border-left: 4px solid #ffd21f;
    margin: 10px 0 16px;
}

details p, .nota p {
    margin-top: 12px;
    margin-bottom: 0;
    line-height: 1.5;
    font-family: 'Exo 2', sans-serif;
    font-size: 12px !important; 
}

label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: #64748b;
    tracking: 0.5px;
    white-space: nowrap;
}

input, select {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    color: #334155;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    outline: none; min-width: 250px;
    font-family: inherit;
}


/* ---------------------------------------------------------
   RESPONSIVE
   --------------------------------------------------------- */

@media (max-width: 760px) {
    
    td, th {
        padding: 6px;
    }

    .box {
        margin-bottom: 7px;
    }

    .box-title {
        padding: 5px 7px;
        font-size: 13px;
    }

    .box-content {
        padding: 6px;
    }

    .data-grid {
        gap: 5px;
    }
    
    .tab-group {
        gap:1px;
    }
    .tabs, .tab {
        padding:2px;
    }    
    .update-btn {
        padding:2px;
    } 
}


@media (max-width: 520px) {

    .box-content {
        padding: 5px;
    }
    
    th,
    td {
        font-size: 10px;
        padding: 4px 4px;
    }

    .data-grid {
        gap: 4px;
    }

    .button {
        padding: 4px 7px;
    }
}