/* ===================================================================================================================
   🌎 CLIMA 24.7 - CARD PROVINCIAS / REGIONES / CIUDADES
   -------------------------------------------------------------------------------------------------------------------
   CSS LIMPIO Y ORGANIZADO
   ---------------------------------------------------------------------------------------------------------------
   Este archivo reemplaza los patches acumulados.
   Mantiene SOLO el layout actual:
   - Card base
   - Header Provincia + Región
   - Columna izquierda: mapa / bandera / escudo / próxima provincia
   - Panel derecho TV: ciudad + badges + clima principal + turismo
   - Footer: última actualización + contador ciudad
   - Standby
=================================================================================================================== */


/* ===================================================================================================================
   1) STACK CONTENEDOR
=================================================================================================================== */

.footer-left-stack {
    position: absolute;

    left: 10px;
    bottom: 150px !important;

    z-index: 80;

    display: flex;
    flex-direction: row;
    align-items: flex-end;

    pointer-events: none;
}

/* Oculta provincias durante ríos/mensajes */
.footer-left-stack.is-editorial-standby .card {
    display: none;
}

/* Mientras hay mensajes, NO mostrar el mini standby-card */
.footer-left-stack.is-editorial-standby .weather-standby-card {
    display: none;
}

/* Solo cuando ya terminaron mensajes/ríos, mostrar standby-card */
.footer-left-stack.is-standby .weather-standby-card {
    display: flex;
}
/* ===================================================================================================================
   2) CARD BASE
=================================================================================================================== */

.card {
    position: relative;

    width: 920px;
    min-height: 460px;

    display: flex;
    flex-direction: column;

    overflow: hidden;

    border-left: 8px solid var(--codelis-logoL-rgb);
    border-radius: 10px;

    background: linear-gradient(
        90deg,
        rgba(112, 56, 142, 0.55),
        rgba(143, 85, 155, 0.35)
    );

    box-shadow:
        0 12px 30px rgba(0,0,0,.35),
        0 0 30px rgba(112,56,142,.25);

    color: #fff;
}


/* ===================================================================================================================
   3) HEADER
=================================================================================================================== */

.card-header {
    width: 100%;
    min-height: 100px;

    display: flex;
    flex-direction: column;

    border-radius: 10px 10px 0 0;

    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
}

.card-header-top {
    flex: 1;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0 14px;
}

.card-header-top-txt {
    width: 100%;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 14px;

    font-size: 50px;
    font-weight: 900;

    color: #fff;

    text-align: center;

    text-shadow:
        -1px -1px 0 #000,
         1px -1px 0 #000,
        -1px  1px 0 #000,
         1px  1px 0 #000,
         0 0 8px #000;
}

.card-header-province,
.card-header-region {
    display: inline-flex;
    align-items: center;

    gap: 8px;

    min-width: 0;

    white-space: nowrap;
}

.card-header-province {
    justify-content: flex-start;

    overflow: hidden;
    text-overflow: ellipsis;
}

.card-header-region {
    justify-content: flex-end;

    font-size: 38px;
}

.card-header-bottom {
    flex: 0 0 0;

    min-height: 0;

    padding: 0;

    overflow: hidden;
}


/* ===================================================================================================================
   4) BODY
=================================================================================================================== */

.card-middle {
    flex: 1;

    display: flex;

    min-height: 0;
}


/* ===================================================================================================================
   5) LEFT COLUMN - MAPA / BANDERA / ESCUDO / PRÓXIMA
=================================================================================================================== */

.card-left {
    width: 180px;

    display: flex;
    flex-direction: column;
    align-items: center;
}


/* -------------------------------------------------------------------------------------------------------------------
   MAPA PROVINCIA
------------------------------------------------------------------------------------------------------------------- */

.card-left-top {
    width: 100%;
    height: 180px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding-top: 12px;
    padding-bottom: 6px;

    overflow: hidden;

}

.card-left-top img {
    max-width: 145px;
    max-height: 145px;

    width: auto;
    height: auto;

    object-fit: contain;

    filter:
        drop-shadow(0 0 6px rgba(143, 85, 155, 0.65))
        drop-shadow(0 0 12px rgba(112, 56, 142,.12));
}


/* -------------------------------------------------------------------------------------------------------------------
   BANDERA + ESCUDO
------------------------------------------------------------------------------------------------------------------- */

.card-left-middle {
    width: 100%;
    min-height: 140px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: 8px;

    padding-top: 8px;
    padding-bottom: 10px;

}

.card-left-middle img {
    object-fit: contain;

    filter:
        drop-shadow(0 0 6px rgba(143, 85, 155, 0.65))
        drop-shadow(0 0 12px rgba(112, 56, 142,.12));
}

.province-flag-left {
    width: 140px;
    max-height: 100px;
}

.card-left-middle #province-coat-arms {
    width: 100px;
    height: auto;
}


/* -------------------------------------------------------------------------------------------------------------------
   PRÓXIMA PROVINCIA + TIMER
------------------------------------------------------------------------------------------------------------------- */

.card-left-bottom {
    width: calc(100% - 16px);

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    margin-top: auto;
    margin-left: 8px;
    margin-right: 8px;
    margin-bottom: 10px;

    padding-top: 14px;
    padding-bottom: 12px;

    
    border-radius: 10px;
    border: 1px solid var(--info-oscuro-rgb);
    backdrop-filter: blur(10px);
    background: linear-gradient(
        180deg,
        rgba(28, 90, 156,.09),
        rgba(22, 66, 114,.15)
    );
}

.card-left-bottom-next-label {
    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 20px;
    line-height: 1;

    color: #fff;
}

.card-left-bottom-next-name {
    display: flex;
    align-items: center;
    justify-content: center;

    padding: 4px 8px;

    font-size: 24px;
    font-weight: 900;

    color: #fff;

    text-align: center;
}

.next-prov-timer {
    width: 78px;

    margin: 8px auto 0;
    padding: 8px 8px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 6px;

    font-size: 24px;
    font-weight: 900;

    color: var(--blanco);

    background: rgba(22, 66, 114,.35);

    border: 1px solid rgba(28, 90, 156,.25);
}

.next-prov-timer.alert {
    color: var(--blanco);

    background: var(--danger);
    border-color: var(--danger-claro);

    animation: pulseProvTimer .7s infinite alternate;
}

@keyframes pulseProvTimer {
    from {
        transform: scale(1);
    }

    to {
        transform: scale(1.08);
    }
}


/* ===================================================================================================================
   6) RIGHT COLUMN - PANEL TV
=================================================================================================================== */

.card-right {
    flex: 1;

    min-width: 0;
    min-height: 320px;

    display: flex;
    flex-direction: column;

    padding: 8px 10px;

    overflow: hidden;
}

.card-right-txt {
    font-size: 19px;
    color: #fff;
}

.city-list {
    width: 100%;
    height: 100%;

    min-width: 0;

    display: flex;
}

.city-weather-card {
    width: 100%;
}

.city-tv-card {
    width: 100%;
    height: 100%;

    display: flex;
    flex-direction: column;

    gap: 8px;

    animation: cityOneFade .35s ease;
}

@keyframes cityOneFade {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* -------------------------------------------------------------------------------------------------------------------
   CIUDAD
------------------------------------------------------------------------------------------------------------------- */

.city-tv-city-line {
    width: 100%;

    display: flex;
    align-items: center;
    justify-content: flex-start;

    gap: 10px;

    padding: 4px 2px 8px;

    border-bottom: 1px solid rgba(255,255,255,.12);

    font-size: 42px;
    font-weight: 900;
    line-height: 1;

    color: #fff;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;

    text-shadow: 0 0 8px rgba(0,0,0,.65);
    margin-bottom: 4px;
}

.city-tv-city-line i {
    flex-shrink: 0;

    font-size: 38px;
}


/* -------------------------------------------------------------------------------------------------------------------
   LAYOUT INTERNO: BADGES + CLIMA PRINCIPAL
------------------------------------------------------------------------------------------------------------------- */

.city-tv-layout {
    flex: 1 1 auto;

    width: 100%;

    display: grid;
    grid-template-columns: 1.06fr .94fr;

    gap: 12px;

    min-width: 0;
    min-height: 0;
}


/* -------------------------------------------------------------------------------------------------------------------
   BADGES TÉCNICOS
------------------------------------------------------------------------------------------------------------------- */

.city-tv-metrics {
    min-width: 0;

    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: minmax(48px, 1fr);

    gap: 7px;
}

.city-extra-item,
.city-extra-item-temp {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    border-radius: 7px;

    white-space: nowrap;
}

.city-extra-item {
    min-width: 0;
    min-height: 48px;

    flex-direction: column;

    gap: 3px;

    padding: 5px 6px;

    overflow: hidden;

    border: 1px solid rgba(0,123,255,.85);
    backdrop-filter: blur(6px);
    background: linear-gradient(
        90deg,
        rgba(3, 28, 54, 0.75),
        rgba(28, 90, 156, 0.25)
    );

    font-weight: 900;
}

.city-extra-item i {
    font-size: 30px;
    line-height: 1;
}

.city-extra-item b {
    width: 100%;

    display: block;

    font-size: 20px;
    font-weight: 900;
    line-height: 1;

    color: #fff;

    text-align: center;
    text-transform: uppercase;
    letter-spacing: .25px;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.city-extra-item strong {
    width: 100%;

    display: block;

    font-size: 24px;
    font-weight: 900;
    line-height: 1;

    color: #fff;

    text-align: center;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.city-extra-wind strong {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 5px;
}


/* -------------------------------------------------------------------------------------------------------------------
   CLIMA PRINCIPAL
------------------------------------------------------------------------------------------------------------------- */

.city-tv-main {
    min-width: 0;
    min-height: 0;

    display: flex;
    flex-direction: column;
    justify-content: flex-start;

    gap: 8px;
}

.city-tv-main-top {
    flex: 0 0 auto;

    width: 100%;

    display: grid;
    grid-template-columns: 1.1fr .9fr;

    gap: 10px;

    align-items: stretch;
}

.city-tv-weather-left {
    min-width: 0;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: 6px;

    padding: 0;

    background: transparent;
    border: 0;
    box-shadow: none;
}

.city-tv-icon {
    width: 100%;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 88px;
    line-height: 1;

    filter: drop-shadow(0 0 8px rgba(0,0,0,.65));
}

.city-tv-desc {
    width: 100%;

    padding: 0;

    background: transparent;
    border: 0;
    box-shadow: none;

    font-size: 23px;
    font-weight: 900;
    line-height: 1.05;

    color: rgba(255,255,255,.94);

    text-align: center;

    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.city-tv-weather-right {
    min-width: 0;

    display: grid;
    grid-template-rows: 1fr 1fr;

    gap: 8px;
}

.city-temp,
.city-st,
.city-tv-temp,
.city-tv-st {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    height: auto;
    min-height: 52px;

    border-radius: 8px;

    font-weight: 900;
    line-height: 1;

    white-space: nowrap;
}

.city-tv-temp {
    font-size: 42px;
}

.city-tv-st {
    font-size: 29px;
}


/* -------------------------------------------------------------------------------------------------------------------
   MIN / MAX
------------------------------------------------------------------------------------------------------------------- */

.city-tv-minmax {
    flex: 0 0 auto;

    width: 100%;

    display: grid;
    grid-template-columns: 1fr 1fr;

    gap: 8px;
}

.city-tv-min,
.city-tv-max {
    min-height: 40px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 7px;

    font-size: 27px;
    font-weight: 900;
    line-height: 1;

    box-shadow:
        0 0 7px rgba(0,0,0,.30),
        inset 0 0 0 1px rgba(255,255,255,.14);
}


/* -------------------------------------------------------------------------------------------------------------------
   TURISMO
------------------------------------------------------------------------------------------------------------------- */

.city-tv-tourism {
    flex: 1 1 auto;

    width: 100%;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: 8px;

    min-height: 0;

    padding: 0;
    margin: 0;
}

.city-tv-tourism-logo-line,
.city-tv-tourism-web-line {
    width: 100%;

    display: flex;
    align-items: center;
    justify-content: center;

    text-align: center;
}

.city-tv-tourism-logo {
    max-width: 100%;
    height: 65px;

    object-fit: contain;

    filter:
        drop-shadow(0 0 4px rgba(0,0,0,.55))
        drop-shadow(0 0 8px rgba(255,255,255,.10));
}

.city-tv-tourism-web-line {
    font-size: 28px;
    font-weight: 900;
    line-height: 1;

    color: rgba(255,255,255,.94);

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;

    text-shadow: 0 0 6px rgba(0,0,0,.55);
}


/* ===================================================================================================================
   7) FOOTER - ÚLTIMA ACTUALIZACIÓN + CONTADOR CIUDAD
=================================================================================================================== */

.card-footer {
    width: 100%;
    height: 54px;
    min-height: 54px;

    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;

    gap: 14px;

    padding: 0 14px;

    border-top: 2px solid rgba(255,255,255,.08);
    border-radius: 0 0 10px 10px;

    background: linear-gradient(
        90deg,
        rgba(0,0,0,.18),
        rgba(255,255,255,.03)
    );

    overflow: hidden;
}

.card-footer-last-update {
    flex: 1 1 auto;

    min-width: 0;

    display: flex;
    align-items: center;
    justify-content: flex-start;

    gap: 6px;

    overflow: visible;

    font-size: 20px;
    font-weight: 900;
    line-height: 1.05;

    color: rgba(255,255,255,.95);

    text-align: left;

    white-space: normal;

    text-shadow: 0 0 6px rgba(0,0,0,.65);
}

.card-footer-last-update br {
    display: none;
}

.card-footer-last-update i {
    flex-shrink: 0;
}

.card-footer-last-update .txt-warning {
    display: inline-flex;

    margin-left: 4px;

    color: var(--warning);
}

.card-footer-city-counter {
    flex: 0 0 auto;

    display: flex;
    align-items: center;
    justify-content: flex-end;

    gap: 6px;

    font-size: 20px;
    font-weight: 900;
    line-height: 1;
    padding: 8px;
    background: linear-gradient(
        90deg,
        rgba(3, 28, 54, 0.95),
        rgba(28, 90, 156, 0.45)
    );
    border-radius: 8px;
    border: 1px solid var(--info-oscuro-rgb);
    border-left: 6px solid var(--info-rgb);
    color: var(--blanco-rgb);

    text-align: right;
    white-space: nowrap;

    text-shadow: 0 0 6px rgba(0,0,0,.65);
}


/* ===================================================================================================================
   8) STANDBY
=================================================================================================================== */

.weather-standby-card {
    display: none;

    position: absolute;

    left: 0;
    bottom: 0;

    width: 520px;
    height: 50px;

    border-left: 6px solid var(--codelis-logoL-rgb);
    border-bottom: 2px solid var(--codelis-logoR-rgb);
    border-radius: 12px;

    background: linear-gradient(
        90deg,
        #38154b,
        #2f012c
    );

    backdrop-filter: blur(6px);

    color: var(--blanco);
}

.footer-left-stack.is-standby .card {
    display: none;
}

.footer-left-stack.is-standby .weather-standby-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.weather-standby-title {
    padding-left: 110px;

    font-size: 22px;
    font-weight: 900;
    line-height: 1.1;
}

#weather-standby-timer {
    color: var(--warning);

    font-size: 22px;

    transition:
        color .25s ease,
        transform .25s ease;
}

#weather-standby-timer.alert {
    color: var(--danger);

    transform: scale(1.08);
}


/* ===================================================================================================================
   9) LEGACY OCULTO
   -------------------------------------------------------------------------------------------------------------------
   Estas clases pertenecían al layout anterior.
   Se dejan ocultas por seguridad si algún render viejo aparece durante una recarga parcial.
=================================================================================================================== */

.city-row-topline,
.city-row-main,
.city-weather-desc,
.city-temp-row,
.city-row-extra,
.footer-temp-bar,
.temp-gradient,
.temp-scale,
.card-footer-tourism,
.card-footer-tourism-label,
.card-footer-tourism-prov,
.card-footer-tourism-web,
.card-footer-tourism-logo,
.city-tv-counter {
    display: none;
}
