/*
 * elparamo.net - Embalses
 * Estética común plugins elparamo.net
 */


/* =========================================================
   CONTENEDOR
   ========================================================= */

.ep-embalses {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr));
    gap: 28px;
    width: 100%;
    margin: 24px 0;
    font-family: inherit;
}

.ep-embalses-single {
    grid-template-columns: 1fr;
}

.ep-embalses * {
    box-sizing: border-box;
}


/* =========================================================
   TARJETA
   Mismo patrón visual que Eventos
   ========================================================= */

.ep-embalse {
    min-width: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 14px;
    border: 1px solid #7D0400;
    border-radius: 12px;
    background: #FFF8F2;
    color: #000000;
    overflow: hidden;
}


/* =========================================================
   CABECERA
   ========================================================= */

.ep-embalse-head {
    padding: 2px 2px 14px;
    background: transparent;
    border: 0;
}

.ep-embalse-kicker {
    margin: 0;
    font-size: 12px;
    line-height: 1.4;
    font-weight: 600;
    letter-spacing: .02em;
    color: #7D0400;
}

.ep-embalse .ep-embalse-head h2 {
    margin: 5px 0 0 !important;
    padding: 0;
    font-size: clamp(18px, 1.35vw, 22px);
    line-height: 1.25;
    font-weight: 700;
    color: #7D0400;
}


/* =========================================================
   DATOS PRINCIPALES
   ========================================================= */

.ep-embalse-main {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 18px;
    padding: 8px 2px 4px;
}

.ep-embalse-main strong {
    display: block;
    font-size: clamp(28px, 3.2vw, 38px);
    line-height: 1.15;
    font-weight: 700;
    color: #7D0400;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.ep-embalse-main strong small {
    font-size: .55em;
    font-weight: 600;
}

.ep-embalse-main span {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.4;
    color: #000000;
}


/* =========================================================
   PERFIL DEL EMBALSE
   ========================================================= */

.ep-embalse-profile {
    margin: 14px 0;
    padding: 0;
}

.ep-embalse-profile svg {
    display: block;
    width: 100%;
    max-width: 760px;
    height: auto;
    margin: auto;
}

.ep-embalse-terreno {
    fill: #A98260;
    stroke: #5F4938;
    stroke-width: 3;
    stroke-linejoin: round;
}

.ep-embalse-superficie-agua {
    fill: none;
    stroke: #3C9ED8;
    stroke-width: 3;
}

.ep-embalse-cota-maxima {
    stroke: #9CA3AF;
    stroke-width: 2;
    stroke-dasharray: 10 8;
}

.ep-embalse-presa {
    stroke: #616367;
    stroke-width: 4;
    stroke-linejoin: round;
}

.ep-embalse-presa-coronacion {
    fill: none;
    stroke: #616367;
    stroke-width: 4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ep-embalse-svg-nivel {
    fill: #7D0400;
    font-size: 24px;
    font-weight: 700;
}

.ep-embalse-indicador-agua {
    fill: #7D0400;
}


/* =========================================================
   DETALLES
   ========================================================= */

.ep-embalse-details {
    margin: 0 2px !important;
    padding: 0;
    border-top: 1px solid #E5E7EB;
    font-size: 13px;
}

.ep-embalse-details > div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    padding: 11px 0;
    border-bottom: 1px solid #E5E7EB;
}

.ep-embalse-details dt {
    color: #000000;
    font-weight: 400;
}

.ep-embalse-details dd {
    margin: 0;
    text-align: right;
    font-weight: 600;
    color: #000000;
    font-variant-numeric: tabular-nums;
}

.ep-embalse-details dd small {
    display: block;
    margin-top: 4px;
    font-size: 10px;
    font-weight: 400;
    color: #666666;
}


/* =========================================================
   VARIACIÓN
   ========================================================= */

.ep-embalse-trend {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
}

.ep-embalse-up {
    background: #EAF4EA;
    color: #126000;
}

.ep-embalse-down {
    background: #FBEAEA;
    color: #7D0400;
}

.ep-embalse-flat {
    background: #E5E7EB;
    color: #000000;
}


/* =========================================================
   HISTÓRICO
   ========================================================= */

.ep-embalse-details .ep-embalse-history-date {
    padding: 8px 0;
    font-size: 10px;
}

.ep-embalse-history-date dd {
    font-weight: 400;
    color: #666666;
}


/* =========================================================
   ACTUALIZACIÓN
   ========================================================= */

.ep-embalse-date {
    margin: 14px 2px !important;
    font-size: 10px;
    line-height: 1.5;
    color: #666666;
}

.ep-embalse-date strong {
    font-weight: 600;
}


/* =========================================================
   PIE / ENLACE
   ========================================================= */

.ep-embalse-foot {
    margin-top: auto;
    margin-right: -14px;
    margin-bottom: -14px;
    margin-left: -14px;
    padding: 12px 16px;
    border-top: 1px solid #E5E7EB;
    background: #FFFFFF;
}

.ep-embalse .ep-embalse-foot a {
    font-size: 12px;
    font-weight: 600;
    color: #7D0400;
    text-decoration: none;
}

.ep-embalse .ep-embalse-foot a:hover {
    color: #126000;
    text-decoration: none;
}

.ep-embalse-foot a:focus-visible {
    outline: 2px solid #7D0400;
    outline-offset: 3px;
}


/* =========================================================
   NOTA GENERAL
   ========================================================= */

.ep-embalses-note {
    margin: 12px 0 24px !important;
    font-size: 11px !important;
    line-height: 1.5;
    color: #666666;
    text-align: center;
}


/* =========================================================
   ESTADOS
   ========================================================= */

.ep-embalse-empty,
.ep-embalse-stale {
    padding: 14px 2px;
    margin: 0 !important;
    font-size: 13px;
}

.ep-embalse-stale {
    color: #7D0400;
    background: transparent;
}


/* =========================================================
   MÓVIL
   ========================================================= */

@media (max-width: 600px) {

    .ep-embalses {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .ep-embalse {
        padding: 12px;
        border-radius: 12px;
    }

    .ep-embalse-head {
        padding: 2px 2px 12px;
    }

    .ep-embalse-main {
        padding: 6px 2px 4px;
        gap: 12px;
    }

    .ep-embalse-main strong {
        font-size: clamp(26px, 7.2vw, 34px);
    }

    .ep-embalse-profile {
        margin: 12px 0;
    }

    .ep-embalse-details {
        margin: 0 2px !important;
        font-size: 12px;
    }

    .ep-embalse-details > div {
        gap: 12px;
    }

    .ep-embalse-date {
        margin: 14px 2px !important;
    }

    .ep-embalse-foot {
        margin-top: auto;
        margin-right: -12px;
        margin-bottom: -12px;
        margin-left: -12px;
        padding: 12px 14px;
    }
}


@media (max-width: 340px) {

    .ep-embalse-details > div {
        display: block;
    }

    .ep-embalse-details dd {
        margin-top: 5px;
        text-align: left;
    }

    .ep-embalse-main {
        grid-template-columns: 1fr;
    }

}


.ep-embalse-presa-coronacion-boveda {
    stroke-width: 4;
}

/* Ajuste final coronación presas */
.ep-embalse-presa-coronacion,
.ep-embalse-presa-coronacion-boveda {
    stroke-width: 4 !important;
}

/* Ajuste final coronación */
.ep-embalse-presa-coronacion,
.ep-embalse-presa-coronacion-boveda {
    stroke-width: 4 !important;
}

/* Ajuste final coronación */
.ep-embalse-presa-coronacion,
.ep-embalse-presa-coronacion-boveda {
    stroke-width: 4 !important;
}

/* =========================================================
   PERFIL DE PRESAS
   ========================================================= */

.ep-embalse-presa {
    stroke-width: 4;
}

.ep-embalse-presa-coronacion {
    stroke-width: 4 !important;
}
