/*
 * Breaking News TV – Popup / Toast Alert Styles
 */

:root {
  --bntv-popup-w: 320px;
  --bntv-popup-bg: #1a1a2e;
  --bntv-popup-radius: 8px;
  --bntv-popup-shadow: 0 12px 40px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.06);
  --bntv-popup-z: 999999;
}

/* ── Popup container ───────────────────────────────────────────────────── */
.bntv-popup {
  position: fixed;
  z-index: var(--bntv-popup-z);
  width: var(--bntv-popup-w);
  max-width: calc(100vw - 32px);
  background: var(--bntv-popup-bg);
  color: #fff;
  border-radius: var(--bntv-popup-radius);
  box-shadow: var(--bntv-popup-shadow);
  overflow: hidden;
  border-top: 3px solid #e63946;
  font-family: system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;

  /* Entrance animation base */
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .3s ease, transform .3s cubic-bezier(.34,1.56,.64,1);
}

.bntv-popup.bntv-popup--visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Positions ─────────────────────────────────────────────────────────── */
.bntv-popup--bottom-right { bottom: 24px; right: 24px; }
.bntv-popup--bottom-left  { bottom: 24px; left:  24px; }
.bntv-popup--top-right    { top: 80px;    right: 24px; transform: translateY(-24px); }
.bntv-popup--top-left     { top: 80px;    left:  24px; transform: translateY(-24px); }
.bntv-popup--center {
  top: 50%; left: 50%;
  transform: translate(-50%, -44%);
}
.bntv-popup--center.bntv-popup--visible {
  transform: translate(-50%, -50%);
}
.bntv-popup--top-right.bntv-popup--visible,
.bntv-popup--top-left.bntv-popup--visible  { transform: translateY(0); }

/* ── Inner layout ──────────────────────────────────────────────────────── */
.bntv-popup__badge {
  padding: 12px 16px 0;
}

.bntv-popup__close {
  position: absolute;
  top: 10px;
  color: rgba(255,255,255,.6);
  background: none;
  border: none;
  font-size: 16px;
  cursor: pointer;
  line-height: 1;
  padding: 4px 6px;
  border-radius: 4px;
  transition: color .2s, background .2s;
}
.bntv-ltr .bntv-popup__close { right: 10px; }
.bntv-rtl .bntv-popup__close { left: 10px; }

.bntv-popup__close:hover {
  color: #fff;
  background: rgba(255,255,255,.12);
}

.bntv-popup__thumb {
  width: 100%;
  height: 140px;
  overflow: hidden;
  margin-top: 10px;
}
.bntv-popup__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.bntv-popup__title {
  padding: 10px 16px 6px;
  font-weight: 700;
  font-size: 0.93rem;
  line-height: 1.4;
  color: #fff;
}

.bntv-popup__cta {
  display: block;
  margin: 0 16px 16px;
  padding: 9px 16px;
  background: #e63946;
  color: #fff;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.85rem;
  text-align: center;
  transition: background .2s, transform .1s;
}
.bntv-popup__cta:hover {
  background: #c1121f;
  transform: translateY(-1px);
}

/* ── RTL ───────────────────────────────────────────────────────────────── */
.bntv-rtl.bntv-popup { direction: rtl; text-align: right; }

/* ── Mobile ────────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
  :root { --bntv-popup-w: 100%; }
  .bntv-popup--bottom-right,
  .bntv-popup--bottom-left {
    bottom: 0; left: 0; right: 0;
    border-radius: 12px 12px 0 0;
  }
}

/* ═══════════════════════════════════════════════════════════════
   BROADCAST THEMES — Popup inherits the active ticker theme
   Add class bntv-theme-{name} to the popup div via PHP
═══════════════════════════════════════════════════════════════ */

/* ── Newsroom Red (bbc) ── */
.bntv-theme-bbc.bntv-popup {
  background:  #2b2b2b;
  border-top:  4px solid #bb1919;
  box-shadow:  0 12px 40px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.06);
}
.bntv-theme-bbc .bntv-popup__cta { background: #bb1919; }
.bntv-theme-bbc .bntv-popup__cta:hover { background: #991414; }

/* ── Broadcast Dark (cnn) ── */
.bntv-theme-cnn.bntv-popup {
  background:  #0a0a0a;
  border-top:  4px solid #cc0000;
  box-shadow:  0 12px 40px rgba(200,0,0,.3), 0 0 0 1px rgba(200,0,0,.2);
}
.bntv-theme-cnn .bntv-popup__title { text-transform: uppercase; letter-spacing: .04em; font-size: .9rem; }
.bntv-theme-cnn .bntv-popup__cta   { background: #cc0000; letter-spacing: .04em; text-transform: uppercase; font-size: .8rem; }
.bntv-theme-cnn .bntv-popup__cta:hover { background: #990000; }

/* ── Arabic Gold (aljazeera) ── */
.bntv-theme-aljazeera.bntv-popup {
  background:  #0d1b2a;
  border-top:  4px solid #c8a84b;
  color:       #f0e9d2;
  box-shadow:  0 12px 40px rgba(0,0,0,.6);
}
.bntv-theme-aljazeera .bntv-popup__title { color: #f0e9d2; font-family: 'Segoe UI', 'Cairo', Arial, sans-serif; }
.bntv-theme-aljazeera .bntv-popup__cta   { background: #c8a84b; color: #0d1b2a; font-weight: 800; }
.bntv-theme-aljazeera .bntv-popup__cta:hover { background: #a8883b; }
.bntv-theme-aljazeera .bntv-popup__close { color: rgba(200,168,75,.7); }
.bntv-theme-aljazeera .bntv-popup__close:hover { background: rgba(200,168,75,.15); color: #c8a84b; }
