:root {
    --pnfnl-panel: rgba(8, 8, 11, .98);
    --pnfnl-border: rgba(255,255,255,.12);
    --pnfnl-text: #ffffff;
    --pnfnl-muted: rgba(255,255,255,.66);
    --pnfnl-chat-bottom: 96px;
    --pnfnl-right: 18px;
}

.pnfnl-root,
.pnfnl-root * { box-sizing: border-box; }

/* El root se coloca en el mismo punto que el botón de chat en computadora */
.pnfnl-root {
    position: fixed;
    right: var(--pnfnl-right);
    bottom: 18px;
    width: 132px;
    height: 112px;
    z-index: 999998;
    font-family: inherit;
    pointer-events: none;
}

.pnfnl-buttons { position: absolute; inset: 0; pointer-events: none; }

.pnfnl-btn {
    position: absolute;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid #202020;
    background: #000000 !important;
    color: #ffffff;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    cursor: pointer;
    box-shadow: none !important;
    transition: none !important;
    transform: none !important;
    font-size: 7px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: none;
    line-height: 1;
    -webkit-tap-highlight-color: transparent;
    pointer-events: auto;
    padding: 0;
    outline: none;
}

.pnfnl-btn:before,
.pnfnl-btn:after { display: none !important; content: none !important; }

/* Posición alrededor del chat: arriba y hacia el costado, como orbitando el botón grande */
.pnfnl-btn-live { right: 38px; bottom: 56px; }
.pnfnl-btn-news { right: 64px; bottom: 10px; }

.pnfnl-btn:hover,
.pnfnl-btn:focus,
.pnfnl-btn:active {
    border-color: #333333;
    background: #000000 !important;
    box-shadow: none !important;
    transform: none !important;
    outline: none;
}

.pnfnl-btn > span { position: relative; z-index: 1; }
.pnfnl-btn-label { margin-top: 1px; font-size: 7px; font-weight: 800; color: #fff; }

.pnfnl-btn-mark {
    width: 15px;
    height: 12px;
    border-radius: 2px;
    border: 1.5px solid #fff;
    display: block;
    position: relative;
    background: transparent;
    font-size: 0;
    line-height: 0;
}
.pnfnl-btn-mark:before {
    content: "";
    position: absolute;
    left: 3px;
    right: 3px;
    top: 3px;
    height: 1.5px;
    background: #fff;
    box-shadow: 0 3.5px 0 #fff;
}
.pnfnl-btn-mark:after {
    content: "";
    position: absolute;
    left: -4px;
    top: 1px;
    width: 3px;
    height: 10px;
    border: 1.5px solid #fff;
    border-right: 0;
    border-radius: 2px 0 0 2px;
}

.pnfnl-live-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #ff1f55;
    display: block;
    box-shadow: none !important;
    animation: none !important;
}

.pnfnl-overlay { display: none !important; }

.pnfnl-panel {
    position: fixed;
    right: calc(var(--pnfnl-right) + 78px);
    bottom: 26px;
    width: min(390px, calc(100vw - 112px));
    max-height: min(640px, calc(100vh - 70px));
    background: var(--pnfnl-panel);
    color: var(--pnfnl-text);
    border: 1px solid var(--pnfnl-border);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 18px 54px rgba(0,0,0,.48);
    backdrop-filter: blur(16px);
    transform: translateY(10px) scale(.98);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
    z-index: 999999;
}

.pnfnl-root.is-open .pnfnl-overlay { display:none !important; opacity:0; pointer-events:none; }
.pnfnl-panel.is-active { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }

.pnfnl-panel-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    padding: 18px 18px 13px;
    border-bottom: 1px solid rgba(255,255,255,.08);
    background: #000;
}

.pnfnl-panel-head strong { display: block; font-size: 22px; line-height: 1.05; letter-spacing: -.04em; }
.pnfnl-panel-head small { display: block; margin-top: 5px; color: var(--pnfnl-muted); font-size: 12px; }

.pnfnl-close {
    width: 33px;
    height: 33px;
    min-width: 33px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.14);
    background: #000;
    color: #fff;
    cursor: pointer;
    font-size: 23px;
    line-height: 1;
}

.pnfnl-news-list { padding: 12px; overflow: auto; max-height: 525px; }

.pnfnl-news-card {
    display: grid;
    grid-template-columns: 78px 1fr;
    gap: 11px;
    padding: 9px;
    border-radius: 18px;
    color: #fff;
    text-decoration: none !important;
    border: 1px solid rgba(255,255,255,.09);
    background: rgba(255,255,255,.045);
    margin-bottom: 9px;
    transition: none;
}

.pnfnl-news-card:hover { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.16); transform: none; }
.pnfnl-news-thumb { width: 78px; height: 78px; border-radius: 14px; background: #111; overflow: hidden; }
.pnfnl-news-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pnfnl-news-thumb span { display: block; width: 100%; height: 100%; background: #111; }
.pnfnl-news-body h3 { margin: 0 0 6px; color: #fff; font-size: 14px; line-height: 1.2; letter-spacing: -.01em; }
.pnfnl-news-body p { margin: 0 0 7px; color: rgba(255,255,255,.70); font-size: 12px; line-height: 1.35; }
.pnfnl-panel-news .pnfnl-news-body p { display: none !important; }
.pnfnl-news-body span { color: rgba(255,255,255,.48); font-size: 11px; }
.pnfnl-loading, .pnfnl-empty { padding: 28px 18px; color: rgba(255,255,255,.72); text-align: center; font-size: 13px; }

.pnfnl-live-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 12px 14px 0; }
.pnfnl-live-tab { border: 1px solid rgba(255,255,255,.12); background: #000; color: rgba(255,255,255,.72); border-radius: 999px; height: 38px; cursor: pointer; font-size: 12px; font-weight: 850; }
.pnfnl-live-tab.is-active { color: #000; background: #fff; border-color: #fff; }
.pnfnl-player-shell { padding: 14px; }
.pnfnl-player { display: none; }
.pnfnl-player.is-active { display: block; }
.pnfnl-player iframe { display: block; width: 100%; aspect-ratio: 16 / 9; height: auto; min-height: 205px; border: 0; border-radius: 18px; background: #000; }
.pnfnl-radio-audio { width: 100%; height: 46px; display: block; margin-top: 8px; }
.pnfnl-empty.is-hidden { display: none; }
.pnfnl-live-actions { padding: 0 14px 16px; }
.pnfnl-expand { display: flex; width: 100%; height: 43px; align-items: center; justify-content: center; border-radius: 999px; text-decoration: none !important; color: #000 !important; background: #fff; font-size: 13px; font-weight: 900; }
.pnfnl-expand.is-disabled { display: none; }
body.pnfnl-hide-mobile .pnfnl-root { display: none !important; }

@media (max-width: 1024px) {
    .pnfnl-root {
        right: 14px !important;
        bottom: calc(96px + env(safe-area-inset-bottom, 0px)) !important;
        width: 126px;
        height: 104px;
        transform: none !important;
    }
    .pnfnl-btn { width: 38px; height: 38px; font-size: 6.5px; }
    .pnfnl-btn-label { font-size: 6.5px; }
    .pnfnl-btn-live { right: 34px; bottom: 52px; }
    .pnfnl-btn-news { right: 62px; bottom: 8px; }
}

@media (max-width: 767px) {
    .pnfnl-root { width: 126px; height: 104px; }
    .pnfnl-btn { width: 38px; height: 38px; }
    .pnfnl-btn-label { font-size: 6px; }
    .pnfnl-btn-news { right: 62px; bottom: 8px; }
    .pnfnl-btn-live { right: 34px; bottom: 52px; }
    .pnfnl-btn-mark { width: 15px; height: 12px; }
    .pnfnl-live-dot { width: 13px; height: 13px; }
    .pnfnl-panel { right: 12px; left: 12px; bottom: calc(96px + env(safe-area-inset-bottom, 0px) + 110px); width: auto; max-height: calc(100vh - 165px); border-radius: 22px; }
    .pnfnl-panel-head { padding: 16px 16px 11px; }
    .pnfnl-panel-head strong { font-size: 20px; }
    .pnfnl-news-list { max-height: calc(100vh - 260px); }
    .pnfnl-news-card { grid-template-columns: 70px 1fr; gap: 10px; }
    .pnfnl-news-thumb { width: 70px; height: 70px; }
    .pnfnl-news-body p { display: none; }
    .pnfnl-player iframe { min-height: 180px; }
}

/* v1.2.2: en computadora el popup se mueve más a la izquierda y los botones quedan siempre encima */
@media (min-width: 768px) {
    .pnfnl-buttons {
        z-index: 1000002 !important;
    }
    .pnfnl-btn {
        z-index: 1000003 !important;
    }
    .pnfnl-panel {
        right: calc(var(--pnfnl-right) + 154px) !important;
        width: min(390px, calc(100vw - 210px)) !important;
        z-index: 1000000 !important;
    }
}

.pnfnl-custom-html,
.pnfnl-custom-html iframe,
.pnfnl-custom-html video,
.pnfnl-custom-html audio {
    max-width: 100%;
}
.pnfnl-custom-html iframe {
    width: 100%;
    min-height: 205px;
    border: 0;
    border-radius: 18px;
    background: #000;
}
.pnfnl-custom-html audio {
    width: 100%;
}

.pnfnl-radio-popout {
    display: flex;
    width: 100%;
    height: 43px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,.16);
    text-decoration: none !important;
    color: #fff !important;
    background: #000;
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
    margin-bottom: 8px;
}
.pnfnl-radio-popout.is-hidden { display: none !important; }


/* v1.2.4: mini radio más estética y botón de acción más limpio */
.pnfnl-live-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}
.pnfnl-radio-popout {
    background: #fff !important;
    color: #000 !important;
    border-color: #fff !important;
    letter-spacing: -.01em;
}
.pnfnl-radio-popout:before {
    content: "";
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #ff1f55;
    margin-right: 8px;
    display: inline-block;
}
.pnfnl-expand {
    background: #000 !important;
    color: #fff !important;
    border: 1px solid rgba(255,255,255,.16);
}
.pnfnl-player-shell {
    padding-bottom: 10px;
}

/* v1.3.2: navegación interna suave */
html.pnfnl-pjax-active .pnfnl-radio-popout {
    background: #0f0f0f !important;
    color: #fff !important;
    border-color: rgba(255,255,255,.18) !important;
}
html.pnfnl-pjax-active .pnfnl-radio-popout:before {
    background: #ff1f55;
}
html.pnfnl-pjax-loading:after { display: none !important; }
