/* Press24 News Pro v6.0 — 8 New Features + Bulletproof Full-Page E-Paper CSS */

/* 0. Bulletproof Full-Page E-Paper Override (Works even with [p24_epaper] on normal page.php!) */
body.p24-epaper-page .p24-main { padding: 0 0 24px !important; }
body.p24-epaper-page .p24-main > .p24-container { max-width: 100% !important; padding: 0 !important; }
body.p24-epaper-page .p24-content-grid { display: block !important; }
body.p24-epaper-page .p24-sidebar { display: none !important; }
body.p24-epaper-page .p24-article-wrap { border: 0 !important; border-radius: 0 !important; padding: 0 !important; box-shadow: none !important; background: transparent !important; }
body.p24-epaper-page .p24-single-title { display: none !important; }

.p24-epaper-shell.p24-ep-overlay {
  position: fixed !important;
  inset: 0 !important;
  z-index: 99998 !important;
  width: 100vw !important;
  height: 100vh !important;
  overflow-y: auto !important;
  background: #F1F5F9 !important;
  border: 0 !important;
}

/* 1. Mobile App Bottom Navbar + PWA Install Banner */
.p24-mob-nav {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9300;
  background: var(--p24-surface);
  border-top: 1.5px solid var(--p24-border);
  box-shadow: 0 -6px 24px rgba(15, 23, 42, 0.12);
  grid-template-columns: repeat(5, 1fr);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
}
.p24-mn-item {
  border: 0;
  background: transparent;
  color: var(--p24-text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-family: var(--p24-font);
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  padding: 2px 0;
}
.p24-mn-item.active,
.p24-mn-item:hover { color: var(--p24-primary); }
.p24-mn-ic { font-size: 18px; line-height: 1.1; }

.p24-pwa-banner {
  position: fixed;
  left: 14px;
  right: 14px;
  bottom: 72px;
  max-width: 440px;
  margin: 0 auto;
  z-index: 9600;
  background: linear-gradient(135deg, #0F172A, #064E3B);
  color: #FFFFFF;
  border: 1.5px solid #34D399;
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  box-shadow: 0 14px 34px rgba(2, 6, 23, 0.45);
}
.p24-pwa-info { display: flex; flex-direction: column; }
.p24-pwa-info strong { font-size: 15px; }
.p24-pwa-info small { font-size: 12px; color: #CBD5E1; }
.p24-pwa-acts { display: flex; align-items: center; gap: 6px; }
.p24-pwa-btn {
  background: #10B981;
  color: #FFFFFF;
  border: 0;
  border-radius: 8px;
  padding: 7px 12px;
  font-family: var(--p24-font);
  font-size: 13.5px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}
.p24-pwa-x {
  background: rgba(255,255,255,0.14);
  color: #FFFFFF;
  border: 0;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  cursor: pointer;
  font-size: 18px;
}

/* Dynamic Bottom Stack: Zero Overlap between Mobile Nav, Sticky Bottom Ad, Floating Reader Bar & Back-to-Top */
.p24-article-body {
  font-size: var(--p24-article-fz, 19px);
}
.p24-float-bar {
  bottom: var(--p24-float-bottom, 16px) !important;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.24s ease, bottom 0.22s ease !important;
}
.p24-back-top {
  bottom: var(--p24-btt-bottom, 24px);
  transition: bottom 0.22s ease;
}
.p24-back-top.p24-lifted {
  bottom: var(--p24-btt-lifted, 88px);
}
@media (max-width: 768px) {
  .p24-mob-nav { display: grid; }
  body { padding-bottom: 62px; }
}

/* 2. Live Blog Timeline */
.p24-live-blog-box {
  background: var(--p24-surface-alt);
  border: 2px solid rgba(220, 38, 38, 0.35);
  border-radius: 12px;
  padding: 16px 18px;
  margin: 0 0 22px;
}
.p24-lv-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 10px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--p24-border);
}
.p24-lv-status { font-size: 13.5px; color: var(--p24-text-muted); font-weight: 700; }
.p24-lv-timeline {
  position: relative;
  padding-left: 20px;
  border-left: 3px solid #DC2626;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.p24-lv-item {
  position: relative;
  background: var(--p24-surface);
  border: 1px solid var(--p24-border);
  border-radius: 10px;
  padding: 12px 14px;
}
.p24-lv-dot {
  position: absolute;
  left: -28px;
  top: 15px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #DC2626;
  border: 3px solid var(--p24-surface-alt);
}
.p24-lv-time { font-size: 13px; font-weight: 800; color: #DC2626; margin-bottom: 4px; }
.p24-lv-title { margin: 0 0 6px; font-size: 18px; line-height: 1.35; }
.p24-lv-body p { margin: 0 0 8px; font-size: 16px; }
.p24-lv-body p:last-child { margin-bottom: 0; }

/* 4. Infinite Scroll Divider */
.p24-inf-divider {
  text-align: center;
  margin: 28px 0 18px;
  position: relative;
}
.p24-inf-divider::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 50%;
  height: 2px;
  background: var(--p24-border);
  z-index: 0;
}
.p24-inf-divider span {
  position: relative;
  z-index: 1;
  background: var(--p24-primary);
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 800;
  padding: 5px 16px;
  border-radius: 999px;
}
.p24-inf-sentinel {
  text-align: center;
  padding: 18px 0;
  font-weight: 700;
  color: var(--p24-primary);
}

/* 5. Follow Channels Banner */
.p24-follow-banner {
  background: linear-gradient(135deg, rgba(5,150,105,0.10), rgba(37,99,235,0.08));
  border: 1.5px solid rgba(5, 150, 105, 0.30);
  border-radius: 12px;
  padding: 16px 18px;
  margin: 20px 0 6px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.p24-fb-head { display: flex; align-items: center; gap: 11px; }
.p24-fb-ic {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--p24-primary);
  color: #FFFFFF;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.p24-fb-head strong { display: block; font-size: 17px; color: var(--p24-text); }
.p24-fb-head small { color: var(--p24-text-muted); font-size: 13.5px; }
.p24-fb-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.p24-fbtn {
  padding: 8px 15px;
  border-radius: 8px;
  color: #FFFFFF !important;
  font-size: 14.5px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.p24-fbtn:hover { opacity: 0.9; }
.p24-fbtn-wa { background: #16A34A; }
.p24-fbtn-gn { background: #2563EB; }
.p24-fbtn-tg { background: #0284C7; }
.p24-fbtn-fb { background: #1877F2; }

/* 6. Smart Welcome Popup Ad + Sticky Bottom Ad */
.p24-popad-card {
  position: relative;
  background: var(--p24-surface);
  border-radius: 14px;
  max-width: 560px;
  width: 100%;
  padding: 10px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.5);
  text-align: center;
}
.p24-popad-card img { width: 100%; height: auto; border-radius: 10px; }
.p24-popad-close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid #FFFFFF;
  background: #DC2626;
  color: #FFFFFF;
  font-size: 22px;
  cursor: pointer;
  z-index: 3;
}
.p24-popad-tag {
  position: absolute;
  top: 16px;
  left: 16px;
  background: rgba(15, 23, 42, 0.78);
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
}
.p24-sticky-ad {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  z-index: 9100;
  background: var(--p24-surface);
  border: 1px solid var(--p24-border);
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
  padding: 6px 10px;
  box-shadow: 0 -6px 24px rgba(0,0,0,0.18);
  max-width: 760px;
  width: auto;
}
.p24-sticky-ad-close {
  position: absolute;
  top: -12px;
  right: -10px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 0;
  background: #0F172A;
  color: #FFFFFF;
  font-size: 16px;
  cursor: pointer;
}
.p24-sticky-ad-inner img { max-height: 90px; width: auto; margin: 0 auto; }
@media (max-width: 768px) {
  .p24-sticky-ad { bottom: var(--p24-mob-nav-h, 58px); width: calc(100% - 16px); }
}

/* 7. Fact-Check Stamp Badge & ClaimReview Box */
.p24-fc-pill {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  font-size: 12px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 6px;
  color: #FFFFFF;
  box-shadow: 0 4px 10px rgba(0,0,0,0.22);
}
.p24-fc-pill.fc-true { background: #059669; }
.p24-fc-pill.fc-false { background: #DC2626; }
.p24-fc-pill.fc-misleading { background: #D97706; }
.p24-fc-pill.fc-partial { background: #2563EB; }

.p24-fc-box {
  border-radius: 12px;
  padding: 15px 18px;
  margin-bottom: 18px;
  border: 2px solid var(--p24-border);
}
.p24-fc-box.fc-true { background: rgba(5,150,105,0.09); border-color: #059669; }
.p24-fc-box.fc-false { background: rgba(220,38,38,0.09); border-color: #DC2626; }
.p24-fc-box.fc-misleading { background: rgba(217,119,6,0.09); border-color: #D97706; }
.p24-fc-box.fc-partial { background: rgba(37,99,235,0.09); border-color: #2563EB; }
.p24-fc-stamp {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 8px;
  color: #FFFFFF;
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 8px;
}
.p24-fc-box.fc-true .p24-fc-stamp { background: #059669; }
.p24-fc-box.fc-false .p24-fc-stamp { background: #DC2626; }
.p24-fc-box.fc-misleading .p24-fc-stamp { background: #D97706; }
.p24-fc-box.fc-partial .p24-fc-stamp { background: #2563EB; }
.p24-fc-row { font-size: 15.5px; margin-top: 5px; line-height: 1.5; }

/* 8. Auto-Floating Video Mini Player (PiP) */
.p24-vg-pip-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94A3B8;
  font-weight: 700;
}
.p24-vg-iframe-wrap.is-pip {
  position: fixed !important;
  right: 18px !important;
  bottom: 78px !important;
  width: 340px !important;
  height: 192px !important;
  aspect-ratio: auto !important;
  z-index: 9450 !important;
  border: 2px solid #10B981 !important;
  border-radius: 12px !important;
  box-shadow: 0 18px 42px rgba(2, 6, 23, 0.55) !important;
  overflow: visible !important;
}
.p24-vg-iframe-wrap.is-pip iframe,
.p24-vg-iframe-wrap.is-pip video {
  border-radius: 10px;
}
.p24-pip-close {
  position: absolute;
  top: -12px;
  right: -10px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid #FFFFFF;
  background: #DC2626;
  color: #FFFFFF;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  z-index: 10;
  display: none;
  align-items: center;
  justify-content: center;
}
.p24-vg-iframe-wrap.is-pip .p24-pip-close { display: inline-flex; }
@media (max-width: 560px) {
  .p24-vg-iframe-wrap.is-pip {
    width: 240px !important;
    height: 135px !important;
    right: 10px !important;
    bottom: 70px !important;
  }
}

@media print {
  .p24-mob-nav, .p24-pwa-banner, .p24-sticky-ad, .p24-follow-banner, .p24-vg-iframe-wrap.is-pip {
    display: none !important;
  }
}

/* 9. Complete Popular Share Buttons Grid (12 Platforms — Main + Infinite Scroll) */
.p24-share-bar {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}
.p24-share-head {
  font-size: 16px;
  font-weight: 800;
  color: var(--p24-text);
}
.p24-share-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
}
.p24-share-btn {
  padding: 7px 13px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 700;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.p24-share-btn:hover {
  transform: translateY(-2px);
  opacity: 0.92;
  color: #FFFFFF !important;
}
.p24-sh-ms { background: linear-gradient(135deg, #0084FF, #A033FF); }
.p24-sh-li { background: #0A66C2; }
.p24-sh-pi { background: #E60023; }
.p24-sh-rd { background: #FF4500; }
.p24-sh-em { background: #0D9488; }
.p24-sh-pr { background: #334155; }
.p24-sh-nat { background: linear-gradient(135deg, #059669, #10B981); }
