/* ============================================================================
 * POWER MAX VIVO — Plugin v3.10.0
 * Estilos para [pm_live], [pm_live_player], [pm_sidebar_live], [pm_schedule], [pm_header_bar]
 * ========================================================================= */

:root {
    --pm-accent: #fa5a07;
    --pm-text: #1c1c1c;
    --pm-muted: #6b6b6b;
    --pm-bg: #fff;
    --pm-bg-alt: #faf6f2;
    --pm-border: #eee2d4;
    --pm-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    --pm-radius: 12px;
}

/* ============================================================================
 * [pm_live] / [pm_live_player]
 * ========================================================================= */

.pm-live {
    background: linear-gradient(135deg, #faf6f2 0%, #f5ece1 100%);
    border-radius: var(--pm-radius);
    border-top: 2px solid var(--pm-accent);
    border-bottom: 2px solid var(--pm-accent);
    padding: 32px;
    margin: 24px 0;
    color: var(--pm-text);
    font-family: inherit;
}

.pm-live__container {
    display: flex;
    gap: 36px;
    align-items: stretch;
}

.pm-live__left  { flex: 1 1 40%; min-width: 0; display: flex; flex-direction: column; }
.pm-live__right { flex: 1 1 60%; min-width: 0; }

.pm-live__header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 24px;
}

.pm-live .pm-live__header img.pm-live__logo {
    width: 400px !important;
    max-width: 400px !important;
    height: auto !important;
    display: block;
    align-self: center;
    margin-left: auto;
    margin-right: auto;
}

.pm-live__pills {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.pm-live__badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #e60000;
    color: #fff;
    padding: 6px 13px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.6px;
}

.pm-live__dot {
    width: 7px;
    height: 7px;
    background: currentColor;
    border-radius: 50%;
    animation: pm-pulse 1.4s ease-in-out infinite;
}

@keyframes pm-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: 0.45; transform: scale(0.85); }
}

.pm-live__pill-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--pm-accent);
    text-decoration: none;
    border: 1.5px solid var(--pm-accent);
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.4px;
    transition: background .2s ease, color .2s ease;
}

.pm-live__pill-link:hover {
    background: var(--pm-accent);
    color: #fff;
}

.pm-live__program { margin-bottom: 22px; }

.pm-live__eyebrow {
    display: block;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.4px;
    color: var(--pm-accent);
    margin-bottom: 8px;
    text-transform: uppercase;
}

.pm-live__title {
    font-size: clamp(1.7rem, 1.2rem + 1.5vw, 2.4rem);
    font-weight: 900;
    margin: 0 0 8px;
    line-height: 1.05;
    letter-spacing: -0.01em;
}

.pm-live__hosts {
    font-size: 15px;
    color: var(--pm-muted);
    margin: 0;
}

.pm-live__share {
    display: flex;
    gap: 8px;
    margin-top: auto;
    padding-top: 12px;
}

.pm-live__share a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #fff;
    color: var(--pm-text);
    text-decoration: none;
    border: 1px solid rgba(0, 0, 0, 0.08);
    transition: background .2s ease, color .2s ease, transform .2s ease;
}

.pm-live__share a:hover {
    background: var(--pm-accent);
    color: #fff;
    transform: translateY(-2px);
}

.pm-live__share svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.pm-live__player {
    position: relative;
    background: #000;
    border-radius: var(--pm-radius);
    overflow: hidden;
    box-shadow: var(--pm-shadow);
}

.pm-live__player--16x9 { aspect-ratio: 16 / 9; }

.pm-live__player iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

/* Placeholder mientras el reproductor no ha entrado en viewport */
.pm-live__player--idle {
    background: radial-gradient(ellipse at center, #1f1f1f 0%, #050505 100%);
}

/* ============================================================================
 * [pm_sidebar_live] — Player compacto para la barra lateral de los posts
 * ========================================================================= */

.pm-sidebar-live {
    background: #f7f5f1;
    border-top: 3px solid var(--pm-accent);
    border-bottom: 3px solid var(--pm-accent);
    border-radius: 14px;
    padding: 12px;
    box-sizing: border-box;
}

.pm-sidebar-live__player {
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

.pm-sidebar-live__badge {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #e60000;
    color: #fff;
    padding: 4px 9px 4px 8px;
    border-radius: 30px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    line-height: 1;
    box-shadow: 0 2px 6px rgba(230, 0, 0, 0.35);
    pointer-events: none;
}

@media (max-width: 880px) {
    .pm-live { padding: 24px 18px; }
    .pm-live__container { flex-direction: column; gap: 25px; align-items: stretch; }
    .pm-live__left, .pm-live__right { flex: 1 1 100%; width: 100%; }
    .pm-live__title { font-size: 22px; }
    .pm-live__header { align-items: center; text-align: center; }
    .pm-live .pm-live__header img.pm-live__logo { width: 300px !important; max-width: 300px !important; }
}

@media (max-width: 480px) {
    .pm-live .pm-live__header img.pm-live__logo { width: 220px !important; max-width: 220px !important; }
}

/* ============================================================================
 * [pm_schedule] — Carrusel de días con altura estable
 * ========================================================================= */

.pm-schedule { padding: 0; margin: 0; }

.pm-schedule__header {
    margin-bottom: 24px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--pm-border);
}

.pm-schedule__title {
    font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem);
    font-weight: 800;
    margin: 0 0 4px;
    color: var(--pm-text);
    letter-spacing: -0.01em;
}

.pm-schedule__meta {
    font-size: 0.9rem;
    color: var(--pm-muted);
    margin: 0;
}

.pm-schedule__carousel {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: stretch;
    gap: 12px;
}

.pm-schedule__nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    align-self: center;
    border-radius: 50%;
    border: 1.5px solid var(--pm-border);
    background: #fff;
    color: var(--pm-accent);
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    transition: background .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
    box-shadow: var(--pm-shadow);
}

.pm-schedule__nav:hover,
.pm-schedule__nav:focus-visible {
    background: var(--pm-accent);
    color: #fff;
    border-color: var(--pm-accent);
    transform: scale(1.05);
    outline: none;
}

.pm-schedule__nav:active { transform: scale(0.95); }
.pm-schedule__nav svg { display: block; }

.pm-schedule__viewport {
    min-width: 0;
    position: relative;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
}

.pm-schedule__viewport .pm-schedule__day {
    grid-column: 1;
    grid-row: 1;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .25s ease;
}

.pm-schedule__viewport .pm-schedule__day.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    animation: pm-day-in .3s ease;
}

@keyframes pm-day-in {
    from { opacity: 0; transform: translateX(8px); }
    to   { opacity: 1; transform: translateX(0); }
}

.pm-schedule__viewport .pm-schedule__day.is-active.is-from-prev { animation: pm-day-in-prev .3s ease; }

@keyframes pm-day-in-prev {
    from { opacity: 0; transform: translateX(-8px); }
    to   { opacity: 1; transform: translateX(0); }
}

.pm-schedule__dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 18px;
    flex-wrap: wrap;
}

.pm-schedule__dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    border: 0;
    padding: 0;
    background: rgba(28, 28, 28, 0.18);
    cursor: pointer;
    transition: background .2s ease, transform .2s ease, width .25s ease;
}

.pm-schedule__dot:hover { background: rgba(250, 90, 7, 0.5); }
.pm-schedule__dot:focus-visible { outline: 2px solid var(--pm-accent); outline-offset: 2px; }

.pm-schedule__dot.is-active {
    background: var(--pm-accent);
    width: 24px;
    border-radius: 5px;
}

.pm-schedule__day {
    background: linear-gradient(135deg, #faf6f2 0%, #f5ece1 100%);
    border-radius: var(--pm-radius);
    border-top: 1.5px solid var(--pm-border);
    border-bottom: 1.5px solid var(--pm-border);
    padding: 22px 22px 18px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: border-color .2s ease, box-shadow .2s ease;
}

.pm-schedule__day.is-today {
    border-top-color: var(--pm-accent);
    border-bottom-color: var(--pm-accent);
    box-shadow: 0 4px 16px rgba(250, 90, 7, 0.12);
}

.pm-schedule__day-stripe {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--pm-accent) 0%, #ffb547 100%);
}

.pm-schedule__day-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px dashed rgba(250, 90, 7, 0.2);
}

.pm-schedule__day-icon { color: var(--pm-accent); display: inline-flex; }

.pm-schedule__day-name {
    font-size: 0.95rem;
    font-weight: 800;
    margin: 0;
    color: var(--pm-accent);
    letter-spacing: 0.3px;
    flex: 1;
}

.pm-schedule__today-tag {
    background: var(--pm-accent);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    padding: 3px 9px;
    border-radius: 999px;
    letter-spacing: 1px;
    animation: pm-today-pulse 2.4s ease-in-out infinite;
}

@keyframes pm-today-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(250, 90, 7, 0.4); }
    50%      { box-shadow: 0 0 0 6px rgba(250, 90, 7, 0); }
}

.pm-schedule__list { list-style: none; padding: 0; margin: 0; }

.pm-schedule__item {
    display: flex;
    gap: 14px;
    padding: 10px 8px;
    position: relative;
    border-radius: 8px;
    transition: background .2s ease;
}

.pm-schedule__item + .pm-schedule__item {
    border-top: 1px dotted rgba(28, 28, 28, 0.08);
}

.pm-schedule__item.is-current {
    background: rgba(250, 90, 7, 0.08);
    box-shadow: inset 3px 0 0 var(--pm-accent);
}

.pm-schedule__rail { display: none; }

.pm-schedule__time-block {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    flex-shrink: 0;
    width: 76px;
}

.pm-schedule__clock-icon {
    color: var(--pm-accent);
    margin-top: 2px;
    flex-shrink: 0;
}

.pm-schedule__time {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}

.pm-schedule__time-from { font-size: 13px; font-weight: 800; color: var(--pm-accent); }
.pm-schedule__time-to   { font-size: 13px; font-weight: 700; color: var(--pm-muted); }

.pm-schedule__body { flex: 1; min-width: 0; }

.pm-schedule__name {
    font-size: 14px;
    font-weight: 800;
    margin: 0 0 3px;
    color: var(--pm-text);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.pm-schedule__live-tag {
    display: none;
    align-items: center;
    gap: 4px;
    background: #e60000;
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 999px;
    letter-spacing: 0.6px;
}

.pm-schedule__item.is-current .pm-schedule__live-tag { display: inline-flex; }

.pm-schedule__hosts {
    font-size: 12px;
    color: var(--pm-muted);
    margin: 0;
    line-height: 1.4;
}

.pm-schedule__footer {
    margin-top: 20px;
    padding-top: 12px;
    border-top: 1px solid var(--pm-border);
    text-align: center;
}

.pm-schedule__footer p {
    font-size: 12px;
    color: var(--pm-muted);
    margin: 0;
}

@media (max-width: 600px) {
    .pm-schedule__carousel { gap: 6px; }
    .pm-schedule__nav { width: 38px; height: 38px; }
    .pm-schedule__nav svg { width: 18px; height: 18px; }
    .pm-schedule__day { padding: 18px 16px 14px; }
}

/* ============================================================================
 * [pm_header_bar] — Reproductor compacto premium
 * ========================================================================= */

.pm-bar {
    --pm-bar-accent: #e60000;
    --pm-bar-text: #1a1a1a;
    --pm-bar-muted: #6b6b6b;
    --pm-bar-track: #f0f0f0;

    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 12px;
    font-family: inherit;
    font-size: 13px;
    line-height: 1;
    color: var(--pm-bar-text);
    width: max-content;
    max-width: 100%;
}

/* Waveform — siempre visible a la izquierda */
.pm-bar__bars {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    flex-shrink: 0;
    height: 18px;
}

.pm-bar__bars i {
    display: block;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fa5607 0%, #f6400d 100%);
    opacity: 0.5;
    transition: opacity .25s ease, transform .25s ease;
}

.pm-bar.is-playing .pm-bar__bars i {
    opacity: 1;
    animation: pm-bar-dot 1.2s ease-in-out infinite;
}

.pm-bar.is-playing .pm-bar__bars i:nth-child(1) { animation-delay: 0s;    }
.pm-bar.is-playing .pm-bar__bars i:nth-child(2) { animation-delay: 0.18s; }
.pm-bar.is-playing .pm-bar__bars i:nth-child(3) { animation-delay: 0.36s; }

@keyframes pm-bar-dot {
    0%, 100% { transform: scale(0.6); opacity: 0.4; }
    50%      { transform: scale(1.3); opacity: 1; }
}

/* Programa al aire — eyebrow "pegado" justo arriba del nombre */
.pm-bar__now {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    flex: 1 1 auto;
    min-width: 0;
    max-width: 240px;
    overflow: hidden;
    line-height: 1;
}

.pm-bar__eyebrow {
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.9px;
    text-transform: uppercase;
    color: #ff7801;
    line-height: 1;
    margin-bottom: 1px;
    white-space: nowrap;
}

/* Prefijo "AHORA:" en línea — solo se muestra en pantallas angostas */
.pm-bar__label { display: none; }

/* El nombre se desplaza (marquee) cuando no entra, sin puntos suspensivos */
.pm-bar__program {
    display: block;
    max-width: 100%;
    overflow: hidden;
}

.pm-bar__program-text {
    display: inline-block;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: 0.2px;
    color: var(--pm-bar-text);
    white-space: nowrap;
}

.pm-bar__program.is-scrolling .pm-bar__program-text {
    padding-left: 100%;
    animation: pm-bar-marquee var(--pm-marquee-dur, 12s) linear infinite;
}

@keyframes pm-bar-marquee {
    from { transform: translateX(0); }
    to   { transform: translateX(-100%); }
}

/* Botones EN VIVO / RADIO */
.pm-bar__tabs {
    display: inline-flex;
    align-items: center;
    background: var(--pm-bar-track);
    border-radius: 999px;
    padding: 3px;
    flex-shrink: 0;
}

.pm-bar__tab {
    border: 0;
    background: transparent;
    color: var(--pm-bar-muted);
    font: 700 11px/1 inherit;
    letter-spacing: 0.6px;
    padding: 7px 14px;
    border-radius: 999px;
    cursor: pointer;
    transition: background .2s ease, color .2s ease;
    white-space: nowrap;
}

.pm-bar__tab:hover { color: var(--pm-bar-text); }

.pm-bar__tab.is-active {
    background: var(--pm-bar-accent);
    color: #fff;
}

.pm-bar__tab:focus-visible {
    outline: 2px solid var(--pm-bar-accent);
    outline-offset: 2px;
}

.pm-bar.is-loading .pm-bar__tab--radio { opacity: 0.65; }

/* Botón EN VIVO con punto pulsante */
.pm-bar__tab--stream {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.pm-bar__tab-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--pm-bar-accent);
    flex-shrink: 0;
    animation: pm-pulse 1.4s ease-in-out infinite;
}

.pm-bar__tab--stream.is-active .pm-bar__tab-dot { background: #fff; }

@media (prefers-reduced-motion: reduce) {
    .pm-bar.is-playing .pm-bar__bars i { animation: none; transform: scale(0.9); }
    .pm-bar__tab { transition: none; }
    .pm-bar__tab-dot { animation: none; }
    .pm-bar__program.is-scrolling .pm-bar__program-text { animation: none; padding-left: 0; }
}

/* ----------------------------------------------------------------------------
 * Responsive — pantallas angostas / móviles
 * La barra ocupa todo el ancho disponible y mantiene SIEMPRE una sola línea:
 *   [waveform]  ·  [AHORA: nombre del programa]  ·  [botones]
 * El nombre del programa se desplaza (marquee) si no entra; nunca empuja al
 * resto de los elementos ni salta de renglón.
 * ------------------------------------------------------------------------- */
@media (max-width: 600px) {
    .pm-bar {
        display: flex !important;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        margin: 0;
        padding: 0 14px;            /* separación clara de los bordes */
        gap: 10px;
        flex-wrap: nowrap;          /* nunca salta de renglón */
        white-space: nowrap;
    }

    /* Element 1 — waveform: ancho fijo, no se comprime */
    .pm-bar__bars {
        flex-shrink: 0;
        height: 16px;
    }
    .pm-bar__bars i { width: 4.5px; height: 4.5px; }

    /* Element 2 — "AHORA: programa": ocupa el espacio libre, en una sola línea */
    .pm-bar__now {
        flex: 1 1 auto;
        min-width: 0;               /* permite que el contenido se recorte/desplace */
        max-width: none;
        flex-direction: row;        /* eyebrow apilado -> prefijo en línea */
        align-items: center;
        gap: 5px;
        overflow: hidden;
    }
    .pm-bar__eyebrow { display: none; }          /* el eyebrow apilado es solo desktop */
    .pm-bar__label {
        display: inline-block;
        flex-shrink: 0;
        font-size: 11px;
        font-weight: 800;
        letter-spacing: 0.5px;
        text-transform: uppercase;
        color: #ff7801;
        white-space: nowrap;
    }
    .pm-bar__program {
        flex: 1 1 auto;
        min-width: 0;
        overflow: hidden;           /* contiene el marquee del nombre */
    }
    .pm-bar__program-text { font-size: 12px; }

    /* Element 3 — botones: ancho fijo, anclados a la derecha */
    .pm-bar__tabs { flex-shrink: 0; }
    .pm-bar__tab { padding: 6px 11px; font-size: 10px; }
}

@media (max-width: 380px) {
    .pm-bar { gap: 7px; padding: 0 10px; }
    .pm-bar__now { gap: 4px; }
    .pm-bar__label { font-size: 10px; letter-spacing: 0.3px; }
    .pm-bar__tab { padding: 6px 9px; letter-spacing: 0.4px; }
}
