/* PathivuNews Live Stream — Player + Recordings Styles */

.pnls-wrap {
    --pnls-accent: #e5303c;
    --pnls-accent-dim: #b81f2a;
    --pnls-bg: #0b0d12;
    --pnls-bg-raised: #14171f;
    --pnls-border: rgba(255, 255, 255, 0.08);
    --pnls-text: #f2f3f5;
    --pnls-text-dim: #9aa0ab;

    width: 100%;
    max-width: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    box-sizing: border-box;
}
.pnls-wrap *, .pnls-wrap *::before, .pnls-wrap *::after {
    box-sizing: border-box;
}

/* ── Player card ─────────────────────────────────────────────────────────── */
.pnls-player-card {
    background: var(--pnls-bg);
    border: 1px solid var(--pnls-border);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}

.pnls-player-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 16px;
    background: linear-gradient(180deg, var(--pnls-bg-raised), var(--pnls-bg));
    border-bottom: 1px solid var(--pnls-border);
}

.pnls-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--pnls-text);
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.2px;
    white-space: nowrap;
}

.pnls-brand-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--pnls-accent);
    flex-shrink: 0;
}

.pnls-status-pills {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pnls-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    white-space: nowrap;
}

.pnls-pill-live {
    background: var(--pnls-accent);
    color: #fff;
    box-shadow: 0 2px 10px rgba(229, 48, 60, 0.4);
}

.pnls-pill-viewers {
    background: rgba(255, 255, 255, 0.08);
    color: var(--pnls-text-dim);
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
}

.pnls-dot {
    width: 6px;
    height: 6px;
    background: #fff;
    border-radius: 50%;
    animation: pnls-blink 1.1s ease-in-out infinite;
}

@keyframes pnls-blink {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.25; }
}

/* ── Video area ──────────────────────────────────────────────────────────── */
.pnls-video-area {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.pnls-video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

/* ── Offline screen ──────────────────────────────────────────────────────── */
.pnls-offline-screen {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: radial-gradient(ellipse at center, #16181f 0%, #0a0b0f 100%);
    color: var(--pnls-text-dim);
    text-align: center;
    padding: 24px;
    z-index: 5;
}

.pnls-offline-icon {
    margin-bottom: 16px;
    opacity: 0.35;
}

.pnls-offline-icon svg {
    fill: var(--pnls-text-dim);
}

.pnls-offline-text {
    font-size: 15px;
    line-height: 1.5;
    max-width: 420px;
    margin: 0;
    color: var(--pnls-text-dim);
}

/* ═══════════════════════════════════════════════════════════════════════
   Previous Broadcasts — slider
   ═══════════════════════════════════════════════════════════════════════ */
.pnls-recordings-section {
    margin-top: 26px;
}

.pnls-recordings-title {
    color: var(--pnls-text, #1a1a1a);
    font-size: 17px;
    font-weight: 700;
    margin: 0 0 14px;
}

.pnls-slider-wrap {
    position: relative;
    display: flex;
    align-items: stretch;
    gap: 8px;
}

.pnls-slider-track {
    flex: 1;
    display: flex;
    gap: 14px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scroll-behavior: smooth;
    padding: 2px 2px 10px;
    -ms-overflow-style: none;
    scrollbar-width: thin;
}

.pnls-slider-track::-webkit-scrollbar {
    height: 6px;
}
.pnls-slider-track::-webkit-scrollbar-thumb {
    background: rgba(128, 128, 128, 0.4);
    border-radius: 10px;
}

.pnls-slider-arrow {
    flex-shrink: 0;
    width: 36px;
    border: 1px solid rgba(128, 128, 128, 0.25);
    background: rgba(128, 128, 128, 0.08);
    color: inherit;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
}
.pnls-slider-arrow:hover {
    background: rgba(128, 128, 128, 0.18);
}

.pnls-recordings-empty {
    color: var(--pnls-text-dim, #888);
    font-size: 14px;
    padding: 20px 4px;
    margin: 0;
}

/* ── Recording card ──────────────────────────────────────────────────────── */
.pnls-rec-card {
    flex: 0 0 260px;
    scroll-snap-align: start;
    background: var(--pnls-bg-raised, #14171f);
    border: 1px solid var(--pnls-border, rgba(0,0,0,.08));
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.pnls-rec-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.pnls-rec-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background-color: #1c1f27;
    background-size: cover;
    background-position: center;
    cursor: pointer;
}
.pnls-rec-thumb-blank {
    background-image: linear-gradient(135deg, #1c1f27, #12141a);
}

.pnls-rec-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    border: 1.5px solid rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease;
}
.pnls-rec-card:hover .pnls-rec-play {
    background: var(--pnls-accent, #e5303c);
    transform: translate(-50%, -50%) scale(1.08);
}

.pnls-rec-duration {
    position: absolute;
    bottom: 6px;
    right: 6px;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
}

.pnls-rec-info {
    padding: 10px 12px 12px;
}

.pnls-rec-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--pnls-text, #222);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.pnls-rec-meta {
    display: flex;
    justify-content: space-between;
    font-size: 11.5px;
    color: var(--pnls-text-dim, #888);
    margin-bottom: 8px;
}

.pnls-rec-download {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 600;
    color: var(--pnls-accent, #e5303c);
    text-decoration: none;
    padding: 5px 10px;
    border: 1px solid rgba(229, 48, 60, 0.35);
    border-radius: 7px;
    transition: background 0.15s ease;
}
.pnls-rec-download:hover {
    background: rgba(229, 48, 60, 0.1);
}

/* ═══════════════════════════════════════════════════════════════════════
   Video modal (playback of a previous broadcast)
   ═══════════════════════════════════════════════════════════════════════ */
.pnls-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.pnls-modal[hidden] {
    display: none;
}

.pnls-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.82);
    backdrop-filter: blur(2px);
}

.pnls-modal-inner {
    position: relative;
    width: 100%;
    max-width: 860px;
    background: #0b0d12;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.pnls-modal-video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.pnls-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    border: none;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}
.pnls-modal-close:hover {
    background: rgba(0, 0, 0, 0.85);
}

.pnls-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
}

.pnls-modal-title {
    color: #f2f3f5;
    font-size: 13.5px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pnls-modal-download {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    background: var(--pnls-accent, #e5303c);
    color: #fff;
    text-decoration: none;
    font-size: 12.5px;
    font-weight: 700;
    padding: 7px 12px;
    border-radius: 8px;
}
.pnls-modal-download:hover {
    background: var(--pnls-accent-dim, #b81f2a);
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
    .pnls-brand { font-size: 12.5px; }
    .pnls-pill  { font-size: 10px; padding: 3px 8px; }
    .pnls-player-header { padding: 10px 12px; }
    .pnls-offline-text  { font-size: 13px; }
    .pnls-rec-card      { flex-basis: 210px; }
    .pnls-recordings-title { font-size: 15px; }
}

/* ── Gutenberg editor preview ────────────────────────────────────────────── */
.pnls-block-preview {
    background: #0a0a0a;
    border-radius: 12px;
    aspect-ratio: 16 / 9;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 14px;
    gap: 10px;
}
