/* ==========================================================================
   IW0RQH - RADIO ASTRONOMY STATION (RAS) STYLESHEET
   Percorso: ras.iw0rqh.it/css/ras-local.css
   ========================================================================== */

.ras-stack {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    box-sizing: border-box;
}

/* --------------------------------------------------------------------------
   BARRA SPECIFICHE STAZIONE RICEVENTE (STILE TELEMETRIA ACCURATO)
   -------------------------------------------------------------------------- */
.ras-station-specs-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #000000;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    padding: 12px 24px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
    flex-wrap: wrap;
    gap: 15px;
}

.spec-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-width: 110px;
}

.spec-label {
    font-size: 0.70rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 4px;
}

.spec-val {
    font-family: 'JetBrains Mono', 'Fira Code', 'Roboto Mono', monospace;
    font-size: 0.95rem;
    font-weight: 700;
}

.text-white { color: #ffffff !important; }
.text-loss  { color: #ef4444 !important; } /* Rosso per perdite (-1.2 dB) */
.text-gain  { color: #eab308 !important; } /* Giallo per guadagno reale (1.8 dBi) */

@media (max-width: 768px) {
    .ras-station-specs-bar {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 14px;
    }
}

/* --------------------------------------------------------------------------
   HERO BANNER
   -------------------------------------------------------------------------- */
.ras-hero {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.85));
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-radius: 8px;
    padding: 20px 24px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

.ras-hero-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #f8fafc;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.ras-hero-title i {
    font-size: 1.25rem;
}

.ras-hero-desc {
    color: #94a3b8;
    font-size: 0.88rem;
    line-height: 1.6;
    margin: 0;
}

/* --------------------------------------------------------------------------
   SCHEDE RADAR COMPARATIVE
   -------------------------------------------------------------------------- */
.ras-grid-stations {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 20px;
}

.ras-station-card {
    padding: 0 !important;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #0b1120;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.ras-station-card:hover {
    border-color: rgba(56, 189, 248, 0.45);
    transform: translateY(-2px);
}

.ras-station-header {
    padding: 14px 20px;
    background: rgba(10, 14, 23, 0.85);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ras-station-title {
    font-size: 1.02rem;
    font-weight: 700;
    color: #f1f5f9;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ras-station-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex-grow: 1;
}

.ras-badge-active {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.35);
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.ras-badge-active i { font-size: 7px; }

.ras-badge-standby {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.35);
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.ras-badge-standby i { font-size: 9px; }

.ras-metrics-mini {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

@media (max-width: 480px) {
    .ras-metrics-mini {
        grid-template-columns: 1fr;
    }
}

.ras-metric-box {
    background: rgba(10, 14, 23, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    padding: 10px 14px;
}

.ras-metric-box .lbl {
    font-size: 0.68rem;
    color: #64748b;
    display: block;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.4px;
}

.ras-metric-box .val {
    font-size: 0.90rem;
    font-weight: 700;
    color: #e2e8f0;
    margin-top: 3px;
    display: block;
}

.ras-station-note {
    font-size: 0.84rem;
    color: #94a3b8;
    margin: 0;
    line-height: 1.5;
}

.ras-station-footer {
    padding: 12px 20px;
    background: rgba(10, 14, 23, 0.7);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    justify-content: flex-end;
}

.btn-ras-open {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    background: #0284c7;
    color: #ffffff;
    border: none;
}

.btn-ras-open:hover {
    background: #0369a1;
    color: #ffffff;
}

.btn-ras-disabled {
    background: #1e293b;
    color: #64748b;
    cursor: not-allowed;
}

/* Box informativo dell'ultimo evento */
.ras-event-box {
    background: rgba(10, 14, 23, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ras-event-box-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.80rem;
    font-weight: 700;
    color: #e2e8f0;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 6px;
}

.ras-event-box-title .time-badge {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.76rem;
}

.event-details {
    display: grid;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 8px !important;
}

@media (max-width: 600px) {
    .event-details {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

.event-details .ras-metric-box {
    padding: 6px 10px !important;
}

.event-details .ras-metric-box .lbl {
    font-size: 0.62rem !important;
}

.event-details .ras-metric-box .val {
    font-size: 0.80rem !important;
}

/* Barra Contesto Astronomico e Sciame (Centrata e senza bordo sinistro) */
.ras-shower-context-bar {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.75)) !important;
    border: 1px solid rgba(251, 191, 36, 0.25) !important;
    border-left: 1px solid rgba(251, 191, 36, 0.25) !important; /* Rimosso il bordo spesso a sinistra */
    padding: 16px 20px !important;
    border-radius: 6px;
    text-align: center;
}

.shower-context-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
}

.shower-text-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 100%;
    text-align: center;
}

.shower-title-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.shower-tag {
    font-size: 0.65rem;
    font-weight: 700;
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.12);
    border: 1px solid rgba(251, 191, 36, 0.3);
    padding: 2px 7px;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

.shower-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: #f8fafc;
}

.shower-dates-row {
    font-size: 0.82rem;
    color: #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.shower-dates-row strong {
    color: #ffffff;
}

.shower-dates-row .separator {
    color: #475569;
}

.shower-note-text {
    font-size: 0.85rem;
    color: #94a3b8;
    line-height: 1.5;
    text-align: center;
    max-width: 950px;
    margin: 4px auto 0 auto;
}

/* --------------------------------------------------------------------------
   CARD NOTA TECNICA & AI AUDIT
   -------------------------------------------------------------------------- */
.ras-note-card {
    padding: 18px 22px !important;
    background: #0b1120;
}

.ras-note-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}

.ras-note-header .title {
    font-size: 0.92rem;
    font-weight: 700;
    color: #e2e8f0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ras-note-header .tag {
    font-size: 0.70rem;
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.1);
    padding: 3px 8px;
    border-radius: 4px;
    border: 1px solid rgba(56, 189, 248, 0.25);
    font-weight: 600;
}

.ras-note-text {
    margin: 0;
    font-size: 0.84rem;
    line-height: 1.6;
    color: #94a3b8;
}

/* Colori di accento */
.text-accent  { color: #38bdf8 !important; }
.text-warning { color: #fbbf24 !important; }
.text-success { color: #22c55e !important; }
.text-danger  { color: #ef4444 !important; }