/* =====================================================
   Headline Ticker (নিচে) + Notice Bar (উপরে)
   রঙ আসে Design Options এর --accent থেকে
   ===================================================== */
:root {
  --sa-red: var(--accent, #e60012);
  --sa-red-dark: color-mix(in srgb, var(--sa-red) 78%, #000);
  --sa-bg: rgba(255, 255, 255, .96);
  --sa-text: #14141a;
  --sa-muted: #d9d9e0;
  --sa-height: 48px;
}
@media (prefers-color-scheme: dark) {
  :root { --sa-bg: rgba(22, 22, 28, .96); --sa-text: #f2f2f5; --sa-muted: #3a3a44; }
}

/* ---------- নিচের টিকার ---------- */
#sa-ticker-wrapper {
  position: fixed; bottom: 0; left: 0; width: 100%; height: var(--sa-height);
  background: var(--sa-bg);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-top: 3px solid var(--sa-red);
  box-shadow: 0 -6px 24px rgba(0, 0, 0, .12);
  z-index: 999999; display: flex; align-items: stretch; overflow: hidden; box-sizing: border-box;
}
.sa-ticker-title {
  position: relative; z-index: 10; display: flex; align-items: center; gap: 10px;
  padding: 0 34px 0 22px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--sa-red) 80%, #fff) 0%, var(--sa-red) 45%, var(--sa-red-dark) 100%);
  color: #fff; font-weight: 700; font-size: 18px; letter-spacing: .3px; white-space: nowrap;
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 50%, calc(100% - 18px) 100%, 0 100%);
  text-shadow: 0 1px 2px rgba(0, 0, 0, .25);
}
.sa-live-dot { position: relative; width: 10px; height: 10px; border-radius: 50%; background: #fff; flex-shrink: 0; }
.sa-live-dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: #fff; animation: sa-pulse 1.6s ease-out infinite; }
@keyframes sa-pulse { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(3.2); opacity: 0; } }

.sa-ticker-body {
  flex: 1; min-width: 0; display: flex; align-items: center; overflow: hidden; margin-left: -10px;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 40px, #000 calc(100% - 40px), transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, #000 40px, #000 calc(100% - 40px), transparent 100%);
}
.sa-ticker-track { display: flex; width: max-content; animation: sa-scroll var(--sa-duration, 60s) linear infinite; will-change: transform; }
.sa-ticker-body:hover .sa-ticker-track { animation-play-state: paused; }
.sa-ticker-group { display: flex; align-items: center; flex-shrink: 0; }
@keyframes sa-scroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

.sa-ticker-news-link {
  position: relative; display: inline-flex; align-items: center; padding: 0 30px 0 0; margin-right: 30px;
  text-decoration: none !important; color: var(--sa-text) !important;
  font-size: 16px; font-weight: 500; line-height: 1; white-space: nowrap; transition: color .25s ease;
}
.sa-ticker-news-link::after { content: ""; position: absolute; right: 0; top: 50%; width: 1px; height: 18px; background: var(--sa-muted); transform: translateY(-50%); }
.sa-ticker-news-link:hover { color: var(--sa-red) !important; }
.sa-news-bullet {
  display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; margin-right: 12px;
  border-radius: 50%; background: color-mix(in srgb, var(--sa-red) 12%, transparent); flex-shrink: 0;
  transition: background .25s ease, transform .25s ease;
}
.sa-news-bullet::before { content: ""; width: 0; height: 0; margin-left: 2px; border-top: 5px solid transparent; border-bottom: 5px solid transparent; border-left: 7px solid var(--sa-red); transition: border-left-color .25s ease; }
.sa-ticker-news-link:hover .sa-news-bullet { background: var(--sa-red); transform: scale(1.12); }
.sa-ticker-news-link:hover .sa-news-bullet::before { border-left-color: #fff; }

body.has-ticker { padding-bottom: var(--sa-height) !important; }
body.has-ticker #back-top { bottom: calc(var(--sa-height) + 18px) !important; }

/* ---------- উপরের নোটিশ বার ---------- */
.somoy-notice {
  position: relative; display: flex; align-items: center; gap: 12px;
  padding: 8px 14px; background: var(--n-bg, #14141a); color: var(--n-fg, #fff);
  font-size: 15px; line-height: 1.5; z-index: 99998;
}
.somoy-notice .n-tag {
  display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0;
  padding: 3px 12px; border-radius: 999px; font-size: 13px; font-weight: 700;
  background: var(--accent, #e11d2e); color: #fff;
}
.somoy-notice .n-dot { width: 7px; height: 7px; border-radius: 50%; background: #fff; display: inline-block; animation: sa-blink 1.4s ease-in-out infinite; }
@keyframes sa-blink { 50% { opacity: .3; } }
.somoy-notice .n-body { flex: 1; min-width: 0; overflow: hidden; }
.somoy-notice .n-text, .somoy-notice a { color: inherit !important; text-decoration: none; }
.somoy-notice a { border-bottom: 1px dashed currentColor; }
.somoy-notice a:hover { opacity: .85; }
.somoy-notice .n-close {
  flex-shrink: 0; width: 28px; height: 28px; border: 0; border-radius: 50%; cursor: pointer;
  background: rgba(255, 255, 255, .14); color: inherit; font-size: 18px; line-height: 1; transition: background .2s;
}
.somoy-notice .n-close:hover { background: rgba(255, 255, 255, .3); }
.somoy-notice.is-marquee .n-track { display: inline-block; white-space: nowrap; padding-left: 100%; animation: n-scroll 22s linear infinite; }
.somoy-notice.is-marquee:hover .n-track { animation-play-state: paused; }
@keyframes n-scroll { to { transform: translateX(-100%); } }

@media (max-width: 768px) {
  :root { --sa-height: 42px; }
  .sa-ticker-title { font-size: 15px; padding: 0 28px 0 14px; gap: 8px; }
  .sa-live-dot { width: 8px; height: 8px; }
  .sa-ticker-news-link { font-size: 14px; padding-right: 20px; margin-right: 20px; }
  .sa-news-bullet { width: 18px; height: 18px; margin-right: 8px; }
  .sa-news-bullet::before { border-top-width: 4px; border-bottom-width: 4px; border-left-width: 6px; }
  .somoy-notice { font-size: 13px; padding: 7px 10px; gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .sa-ticker-track, .sa-live-dot::after, .somoy-notice .n-dot { animation: none; }
  .sa-ticker-body { overflow-x: auto; }
  .somoy-notice.is-marquee .n-track { animation: none; padding-left: 0; white-space: normal; }
}
