/* BharatPulse features: listen, news card, PWA */
#cd-top {
  position: fixed;
  bottom: 30px;
  right: 25px;
  width: 42px;
  height: 42px;
  background-color: var(--bp-red);
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 9999;
}

#cd-top.cd-is-visible {
  opacity: 1;
  visibility: visible;
}

#cd-top:hover {
  background-color: var(--bp-red2);
  transform: translateY(-3px);
}

.article-tools {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  margin: 14px 0 18px; padding: 10px 12px;
  background: #fff8f5; border: 1px solid #fde1cf; border-radius: 10px;
}
.listen-player { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.listen-main-btn, .news-card-btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  border: 0; border-radius: 999px; padding: 9px 18px;
  font-weight: 800; font-size: 14px; font-family: "Noto Sans Devanagari",Arial,sans-serif;
}
.listen-main-btn { background: var(--bp-red); color: #fff; }
.listen-main-btn:hover { background: var(--bp-red2, #a50f15); }
.news-card-btn { background: #fff; color: #111; border: 2px solid #111; }
.news-card-btn:hover { background: #111; color: #fff; }
.news-card-btn:disabled { opacity: .6; cursor: wait; }
.listen-mini-btn {
  width: 34px; height: 34px; border-radius: 50%; border: 1px solid #ccc; background: #fff; cursor: pointer;
}
.listen-speed { border: 1px solid #ccc; border-radius: 6px; padding: 6px 8px; background: #fff; font-size: 13px; }
.listen-status { font-size: 12px; color: #666; }

.newscard-modal {
  position: fixed; inset: 0; z-index: 10001; background: rgba(0,0,0,.75);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.newscard-box { position: relative; background: #fff; border-radius: 12px; padding: 14px; max-width: 460px; width: 100%; max-height: 94vh; overflow: auto; }
.newscard-box img { width: 100%; height: auto; display: block; border-radius: 8px; }
.newscard-close { position: absolute; top: 20px; right: 20px; z-index: 2; width: 34px; height: 34px; border-radius: 50%; border: 0; background: #111; color: #fff; font-size: 20px; cursor: pointer; }
.newscard-actions { display: flex; gap: 10px; margin-top: 12px; }
.newscard-actions a, .newscard-actions button {
  flex: 1; text-align: center; padding: 10px; border-radius: 8px; border: 0; cursor: pointer;
  font-weight: 800; font-size: 14px; color: #fff; background: var(--bp-red); text-decoration: none;
}
.newscard-actions .newscard-share { background: #25d366; }

.pwa-install-btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  background: #111; color: #fff; border: 0; border-radius: 8px; padding: 10px 16px; font-weight: 700; font-size: 14px;
}
.pwa-install-btn[hidden] { display: none; }
.mobile-drawer .pwa-install-btn { width: 100%; justify-content: center; margin-top: 16px; }

/* PWA install popup (bottom sheet) */
.pwa-popup {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10002;
  display: flex; justify-content: center; padding: 12px;
  transform: translateY(110%); transition: transform .3s ease; pointer-events: none;
}
.pwa-popup.show { transform: translateY(0); }
.pwa-popup-box {
  pointer-events: auto; width: 100%; max-width: 480px;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: #fff; border: 1px solid #e5e7eb; border-top: 3px solid var(--bp-red);
  border-radius: 14px; padding: 12px 14px; box-shadow: 0 10px 30px rgba(0,0,0,.25);
}
.pwa-popup-icon { width: 44px; height: 44px; border-radius: 10px; flex: 0 0 auto; }
.pwa-popup-text { flex: 1 1 140px; display: flex; flex-direction: column; font-size: 13px; color: #555; line-height: 1.35; min-width: 0; }
.pwa-popup-text strong { color: #111; font-size: 15px; }
.pwa-popup-yes { background: var(--bp-red); color: #fff; border: 0; border-radius: 8px; padding: 9px 14px; font-weight: 800; cursor: pointer; font-size: 14px; }
.pwa-popup-no { background: none; border: 0; color: #666; cursor: pointer; font-size: 13px; padding: 8px 6px; }


/* Hero Right widget area (YouTube / video above "बड़ी खबरें") */
.hero-right-widgets .widget { margin-bottom: 20px; }
.hero-right-widgets .widget-title-bar h3 { margin: 0; }
.hero-right-widgets iframe,
.hero-right-widgets video,
.hero-right-widgets .wp-video,
.hero-right-widgets .wp-block-embed__wrapper,
.hero-right-widgets .mejs-container { width: 100% !important; max-width: 100%; display: block; }
.hero-right-widgets iframe { aspect-ratio: 16 / 9; height: auto; border: 0; }
.hero-right-widgets .textwidget,
.hero-right-widgets .widget_media_video .wp-video { padding: 0; margin: 0; }

/* dark mode (only when the visitor switches it on) */
:root[data-theme="dark"] .article-tools{background:#2a1f1c;border-color:#4a2f27}
:root[data-theme="dark"] .news-card-btn{background:transparent;color:#efeee9;border-color:#efeee9}
:root[data-theme="dark"] .listen-speed{background:#1e1c19;color:#efeee9;border-color:#444}
:root[data-theme="dark"] .pwa-popup-box,:root[data-theme="dark"] .newscard-box{background:#1e1c19;color:#efeee9}
:root[data-theme="dark"] .pwa-popup-text strong{color:#efeee9}
:root[data-theme="dark"] .bp-empty-hint{background:#2a1f12;color:#fbbf77}
@media (max-width:900px){.pwa-popup{bottom:76px}}
