/* ============================================================
   JPC Programación — Frontend  v1.8.7 (Corregido con Destello)
   ============================================================ */

/* ── Wrapper: oculto hasta confirmar datos ─────────────────── */
#prog-envivo-wrap {
    display: none;
    margin: 0 0 10px;
}
#prog-envivo-wrap.prog-tiene-datos { display: block; }
#prog-envivo-wrap[data-loading="1"] { display: block; }

/* ── Box ───────────────────────────────────────────────────── */
.bloqueahora {
    background: var(--prog-envivo-fondo, #141414);
    border-radius: 4px;
    border: 1px solid rgba(255,255,255,.08);
    overflow: hidden;
    font-family: 'Inter', -apple-system, sans-serif;
    box-shadow: 0 4px 16px rgba(0,0,0,.35);
}

/* ── Badge EN VIVO (Con efecto destello premium) ───────────── */
.blobs-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 7px 16px;
    background: var(--prog-envivo-badge-fondo-15, rgba(200, 0, 0, 0.15));
    border-bottom: 1px solid rgba(200, 0, 0, 0.2);
    /* Animación suave de destello ambiental */
    animation: destelloVivo 2.5s ease-in-out infinite; 
}
.blob.red {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--prog-envivo-badge-texto, #ff2222);
    animation: epulse 1.6s ease-in-out infinite;
}
@keyframes epulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255,34,34,.7); }
    55%       { box-shadow: 0 0 0 6px rgba(255,34,34,0); }
}
.envivo {
    color: var(--prog-envivo-badge-texto, #ff4444);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}

/* Nueva animación para el destello del contenedor */
@keyframes destelloVivo {
    0%, 100% {
        background: rgba(200, 0, 0, 0.15);
        box-shadow: inset 0 0 0px rgba(255, 34, 34, 0);
    }
    50% {
        background: var(--prog-envivo-badge-fondo-28, rgba(230, 0, 0, 0.28));
        box-shadow: inset 0 0 12px rgba(255, 34, 34, 0.3);
    }
}

/* ── Lista de eventos (Corregida sin márgenes residuales) ──── */
ul.prog-eventos-wrap {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block;
}
li.eventoenvivo {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 14px !important;
    margin: 0 !important;
    border-bottom: 1px solid rgba(255,255,255,.06);
    box-sizing: border-box !important;
}
li.eventoenvivo:last-child { 
    border-bottom: none !important; 
    margin-bottom: 0 !important;
}

.eventoenvivo__info {
    flex: 1;
    min-width: 0;
    margin: 0 !important;
    padding: 0 !important;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.eventoenvivo__titulo {
    font-size: 13px;
    font-weight: 700;
    color: var(--prog-envivo-titulo, #fff);
    line-height: 1.4;
    margin: 0 !important;
    padding: 0 !important;
    display: block;
    word-wrap: break-word;
}
.eventoenvivo__hora {
    font-size: 11px;
    color: var(--prog-envivo-hora, #888);
    line-height: 1;
    margin: 0 !important;
    padding: 0 !important;
    display: block;
}
.eventoenvivo__canal {
    font-size: 20px;
    font-weight: 800;
    color: var(--prog-envivo-canal, rgba(255,255,255,.3));
    flex-shrink: 0;
    line-height: 1;
    margin: 0 !important;
    padding: 0 !important;
    align-self: center;
}

/* ── Botón ─────────────────────────────────────────────────── */
.bloqueahora .btnlista {
    display: block;
    padding: 6px 14px;
    background: rgba(255,255,255,.05);
    border-top: 1px solid rgba(255,255,255,.07);
    font-size: 11px;
    font-weight: 600;
    color: var(--prog-envivo-boton-texto, #666);
    text-align: center;
    text-decoration: none;
    letter-spacing: .08em;
    text-transform: uppercase;
    transition: background .15s, color .15s;
    margin: 0;
}
.bloqueahora .btnlista:hover {
    background: rgba(255,255,255,.09);
    color: #aaa;
    text-decoration: none;
}

/* ── Skeleton ──────────────────────────────────────────────── */
.prog-envivo-skeleton {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px;
    opacity: .25;
    animation: spulse 1.4s ease-in-out infinite;
}
@keyframes spulse {
    0%, 100% { opacity: .25; }
    50%       { opacity: .08; }
}
.prog-envivo-dot {
    width: 8px; height: 8px;
    border-radius: 50%; background: #e00;
}
.prog-envivo-lines { display: flex; flex-direction: column; gap: 5px;  }
.prog-envivo-lines span {
    display: block; height: 8px; border-radius: 4px; background: #555;
}
.prog-envivo-lines span:first-child { width: 110px; }
.prog-envivo-lines span:last-child  { width: 70px; }

/* ── Bloques de grupos ─────────────────────────────────────── */
[id^="prog-grupo-"] {
    border-radius: 4px !important;
    overflow: hidden !important;
}
[id^="prog-grupo-"] > div:first-child {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 2px 12px !important;
    border-bottom: 1px solid rgba(255,255,255,.1) !important;
    box-sizing: border-box;
}
[id^="prog-grupo-"] > div:first-child img {
    width: 32px !important; height: 32px !important;
    border-radius: 3px !important; opacity: .9 !important;
    margin: 0 !important;
}
[id^="prog-grupo-"] > div:first-child span {
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: .06em !important;
    text-transform: uppercase !important;
}