/* =========================================================
   moderno.css  -  reemplaza a full.css en index.php
   Solo contiene estilos que necesitan los módulos PHP/JS
   (tablas de estaciones, tooltips, íconos de clima, etc.).
   El diseño general (header, gauges, hero, mapa, comentarios)
   está en el <style> de index.php.
   ========================================================= */

html, body {
    margin: 0;
    padding: 0;
}

/* ---------- Íconos de clima (los pone js/script.js) ---------- */
.image-box {
    width: 30px;
    height: 30px;
    background-size: cover;
}
.navbar-custom .image-box { margin-left: auto; }
.image-box.night  { background-image: url('https://cdn.icon-icons.com/icons2/799/PNG/512/night-01_icon-icons.com_65776.png'); }
.image-box.sunny  { background-image: url('https://cdn.icon-icons.com/icons2/1370/PNG/512/if-weather-3-2682848_90785.png'); }
.image-box.cloudy { background-image: url('https://cdn.icon-icons.com/icons2/1370/PNG/512/if-weather-2-2682849_90781.png'); }

.navbar-toggler  { z-index: 1050; }
.navbar-collapse { z-index: 1040; }

.registro   { font-size: 10px; }
.small-text { font-size: 12px; }

.external-link { color: #fff; text-decoration: underline; }
.external-link:hover { color: #ddd; text-decoration: none; }

/* ---------- Animaciones usadas por los módulos ---------- */
@keyframes flash-red {
    0%   { color: red; font-weight: bold; }
    100% { color: rgb(255, 234, 2); font-weight: bold; }
}
.flash-red { animation: flash-red 1s infinite alternate; }

@keyframes blink-red {
    0%   { color: red; font-weight: bold; }
    100% { color: #fff; font-weight: bold; }  /* antes negro: no se veía sobre fondo oscuro */
}
.blink-red { animation: blink-red 1s infinite alternate; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to   { opacity: 1; transform: translateY(0); }
}
.msg { animation: fadeIn .5s ease; }

/* ---------- Tablas de estaciones (dire.php, lora.php, temp_proc.php) ---------- */
#lastHerd,
.datagrid {
    font-family: "Lucida Console", Monaco, monospace;
}

#lastHerd {
    margin: 0 auto;
    width: 100%;
    font-size: 12px;
    color: #e9f0f3;
    background: transparent;
    border: 0;
    white-space: nowrap;
    text-align: center;
}
#lastHerd table {
    margin: 0 auto;
    width: 100%;
    min-width: 560px;
    border-collapse: collapse;
}
#lastHerd th {
    background: #1f4a5e;
    color: #fff;
    border: 1px solid #2f5d73;
    padding: 6px 8px;
    text-shadow: none;
}
#lastHerd tr:nth-child(even) { background: #14303c; }
#lastHerd tr:nth-child(odd)  { background: #112530; }
#lastHerd td {
    color: #e9f0f3;
    border: 1px solid #27485a;
    padding: 5px 8px;
    overflow-x: hidden;
}

.datagrid.datagrid-statistics,
.datagrid.datagrid-statistics1 {
    margin: 0 auto;
    width: 100%;
    min-width: 520px;
    border-collapse: collapse;
    text-align: center;
    font-size: 12px;
}
.datagrid.datagrid-statistics th,
.datagrid.datagrid-statistics1 th {
    background-color: #b8402f;
    color: #fff;
    padding: 6px 8px;
    border: 1px solid #27485a;
    text-align: center;
}
.datagrid.datagrid-statistics th { cursor: pointer; }
.datagrid.datagrid-statistics td,
.datagrid.datagrid-statistics1 td {
    padding: 5px 8px;
    border: 1px solid #27485a;
    text-align: center;
    color: #e9f0f3;
}
.datagrid.datagrid-statistics tr:nth-child(even),
.datagrid.datagrid-statistics1 tr:nth-child(even) { background-color: #14303c; }
.datagrid.datagrid-statistics tr:nth-child(odd),
.datagrid.datagrid-statistics1 tr:nth-child(odd)  { background-color: #112530; }

.datagrid.datagrid-statistics thead tr th,
.datagrid.datagrid-statistics1 thead tr th { text-align: center; }
.datagrid.datagrid-statistics tbody tr td:first-child,
.datagrid.datagrid-statistics1 tbody tr td:first-child { text-align: left; }
.datagrid td.left-align,  .datagrid th.left-align  { text-align: left !important; }
.datagrid td.right-align, .datagrid th.right-align { text-align: right !important; }

.datagrid.datagrid-statistics a,
.datagrid.datagrid-statistics1 a {
    color: #f4ae3d;               /* antes tenía un ';' faltante y el color azul oscuro no se leía */
    text-decoration: none;
}

.stations-heard-by tbody td { text-align: left; }

/* Indicativos con degradé */
.contat, .contan {
    font-family: "Courier New", Courier, monospace;
    font-size: 16px;
    font-weight: bold;
}
.contat {
    background: linear-gradient(45deg, #ff9a7f, #ffc99b);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.contan {
    background: linear-gradient(45deg, #9f6bff, #5aa0ff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ---------- Tooltips ---------- */
a.tooltip, a.tooltip:link, a.tooltip:visited, a.tooltip:active {
    text-decoration: none;
    position: relative;
    color: #fff;
}
.tooltip { opacity: 1; }
.tooltip:hover { text-shadow: none; text-decoration: none; color: #fff; background: transparent; }

a.tooltip span { display: none; text-shadow: none; text-decoration: none; }
a.tooltip:hover span {
    display: block;
    position: absolute;
    left: 0;
    top: 22px;
    z-index: 20;
    color: #000;
    border: 1px solid #000;
    background: #f7f7f7;
    font: 12px Verdana, sans-serif;
    text-align: left;
    white-space: nowrap;
}
th:last-child a.tooltip:hover span { left: auto; right: 0; }
a.tooltip span b {
    display: block;
    margin: 0;
    padding: 0;
    color: #000;
    font-size: 12px;
    font-weight: bold;
    border: 0;
    border-bottom: 1px solid #000;
    background: #d0d0d0;
}

.dire { text-align: center; font-weight: bold; }
.audio-container { display: none; }

/* ---------- Botón play / banderita (módulo DRM) ---------- */
.custom-btn {
    background-color: #faf200;
    color: #000;
    border: none;
    border-radius: 25px;
}
.custom-btn:hover { font-weight: bold; }

.custom-background {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 150px;
    width: 400px;
    max-width: 92%;
    margin: 3% auto 0;
    border-radius: 10px;
    background: linear-gradient(180deg, #75AADB 33%, #fff 33%, #fff 66%, #75AADB 66%);
}
.section-1, .section-2, .section-3 {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 33%;
}
.section-3:hover { transform: scale(1.2); }

/* ---------- Efecto cumpleaños (por si lo reactivás) ---------- */
#birthday-rain {
    position: fixed; inset: 0;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}
.birthday-item {
    position: absolute;
    top: -50px;
    font-size: 24px;
    opacity: .9;
    animation: fall linear;
}
@keyframes fall {
    0%   { transform: translateY(-50px) rotate(0deg); opacity: 1; }
    100% { transform: translateY(100vh) rotate(360deg); opacity: 0; }
}
#birthday-effect {
    position: fixed; inset: 0;
    z-index: 9999;
    background: rgba(255, 248, 220, .5);
    display: flex; flex-direction: column;
    justify-content: center; align-items: center;
    animation: fadeOut 1s ease-out 4s forwards;
}
.birthday-message { font-size: 3rem; font-weight: bold; color: #d1005d; animation: pop 1s ease; }
@keyframes pop {
    0%   { transform: scale(0);   opacity: 0; }
    50%  { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(1); }
}
@keyframes fadeOut { to { opacity: 0; visibility: hidden; } }
.confetti::before, .confetti::after {
    content: "🎊🎈🎉";
    font-size: 2rem;
    animation: float 5s ease-in-out infinite;
}
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-20px); }
}

/* ---------- Overlay reproductor M17 (por si lo reactivás) ---------- */
.overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0, 0, 0, .7);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}
.overlay-content {
    background: transparent;
    padding: 20px;
    border-radius: 12px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    position: relative;
}
.close-btn {
    position: absolute;
    top: 10px; right: 10px;
    font-size: 34px;
    color: #fff;
    cursor: pointer;
    font-weight: bold;
}

/* ---------- Celular ---------- */
@media (max-width: 800px) {
    #lastHerd { font-size: 11px; }
    #lastHerd th { font-size: 10px; padding: 4px; }
    #lastHerd td { padding: 4px; }
    .datagrid.datagrid-statistics,
    .datagrid.datagrid-statistics1 { font-size: 11px; }
    a.tooltip, a.tooltip:link, a.tooltip:visited, a.tooltip:active { font-size: 12px; }
}
