/* Samriddh Gram — Notifications widget (see notifications.js) */
:root {
  --sgn-ink: #2e3a4e;
  --sgn-brand: #5b7fdb;
  --sgn-accent: #f5b301;
  --sgn-new: #e53935;
  --sgn-h: 44px;
}

body.sgn-has-bar { padding-bottom: var(--sgn-h); }
html.sgn-lock, html.sgn-lock body { overflow: hidden; }

/* ---------- ticker bar ---------- */
.sgn-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  height: var(--sgn-h);
  display: flex; align-items: stretch;
  background: var(--sgn-ink); color: #fff;
  font-family: Poppins, system-ui, sans-serif; font-size: 13.5px;
  box-shadow: 0 -4px 16px rgba(46, 58, 78, .18);
}
.sgn-bar[hidden] { display: none; }

.sgn-label {
  position: relative; flex: 0 0 auto;
  display: flex; align-items: center; gap: 8px;
  padding: 0 18px 0 16px; border: 0; margin: 0;
  background: var(--sgn-brand); color: #fff;
  font: inherit; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; font-size: 12px;
  cursor: pointer;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%);
  padding-right: 24px;
}
.sgn-label:hover { background: #4a6ec9; }
.sgn-dot {
  position: absolute; top: 9px; left: 26px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--sgn-accent); box-shadow: 0 0 0 2px var(--sgn-brand);
  animation: sgn-pulse 1.4s ease-in-out infinite;
}

.sgn-viewport {
  flex: 1 1 auto; min-width: 0; overflow: hidden; position: relative;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
}
.sgn-track {
  display: flex; width: max-content; height: 100%;
  animation: sgn-scroll 30s linear infinite;
}
.sgn-viewport:hover .sgn-track,
.sgn-viewport:focus-within .sgn-track { animation-play-state: paused; }
.sgn-group { display: flex; align-items: center; padding-right: 48px; }

.sgn-item {
  display: inline-flex; align-items: center; gap: 8px;
  margin-right: 48px; padding: 0; border: 0; background: none;
  color: #fff; font: inherit; text-decoration: none; white-space: nowrap; cursor: pointer;
}
.sgn-item:hover span:not(.sgn-new):not(.sgn-bullet),
.sgn-item:focus-visible span:not(.sgn-new):not(.sgn-bullet) { text-decoration: underline; text-underline-offset: 3px; }
.sgn-bullet { color: var(--sgn-accent); }

.sgn-new {
  display: inline-block; padding: 1px 6px; border-radius: 4px;
  background: var(--sgn-new); color: #fff;
  font-size: 10px; font-weight: 700; letter-spacing: .06em; line-height: 16px;
  animation: sgn-blink 1.1s steps(2, start) infinite;
}

.sgn-all {
  flex: 0 0 auto; border: 0; margin: 0; padding: 0 18px;
  background: rgba(255, 255, 255, .08); color: #fff;
  font: inherit; font-weight: 600; font-size: 12.5px; cursor: pointer;
  border-left: 1px solid rgba(255, 255, 255, .15);
}
.sgn-all:hover { background: rgba(255, 255, 255, .16); }

.sgn-bar :focus-visible, .sgn-modal :focus-visible { outline: 2px solid var(--sgn-accent); outline-offset: 2px; }

/* ---------- panel ---------- */
.sgn-modal {
  position: fixed; inset: 0; z-index: 250;
  display: flex; align-items: center; justify-content: center; padding: 16px;
  background: rgba(46, 58, 78, .6); backdrop-filter: blur(3px);
  font-family: Poppins, system-ui, sans-serif;
}
.sgn-modal[hidden] { display: none; }
.sgn-card {
  width: 100%; max-width: 600px; max-height: min(80vh, 640px);
  display: flex; flex-direction: column;
  background: #fff; color: var(--sgn-ink); border-radius: 18px; overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .25);
  animation: sgn-in .18s ease-out;
}
.sgn-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px; border-bottom: 1px solid #e6e8ee;
  background: linear-gradient(90deg, #eef2fc, #fff);
}
.sgn-head h2 { margin: 0; font-size: 18px; font-weight: 700; }
.sgn-close {
  width: 34px; height: 34px; border-radius: 50%; border: 0;
  background: #f1f3f7; color: var(--sgn-ink); font-size: 22px; line-height: 1; cursor: pointer;
}
.sgn-close:hover { background: #e4e7ee; }

.sgn-list { list-style: none; margin: 0; padding: 6px 22px 14px; overflow-y: auto; }
.sgn-row { padding: 16px 0; border-bottom: 1px solid #eef0f4; }
.sgn-row:last-child { border-bottom: 0; }
.sgn-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.sgn-date { font-size: 12px; color: #6b7487; font-weight: 500; }
.sgn-row-title { font-weight: 600; font-size: 15px; line-height: 1.45; }
.sgn-row-body { margin: 4px 0 0; font-size: 13.5px; line-height: 1.55; color: #4b5568; }
.sgn-link {
  display: inline-block; margin-top: 8px;
  color: var(--sgn-brand); font-weight: 600; font-size: 13.5px; text-decoration: none;
}
.sgn-link:hover { text-decoration: underline; }

/* ---------- motion ---------- */
@keyframes sgn-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes sgn-blink { to { visibility: hidden; } }
@keyframes sgn-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes sgn-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .sgn-track { animation: none; }
  .sgn-viewport { overflow-x: auto; }
  .sgn-new, .sgn-dot { animation: none; }
  .sgn-card { animation: none; }
}

/* ---------- small screens ---------- */
@media (max-width: 640px) {
  :root { --sgn-h: 42px; }
  .sgn-bar { font-size: 13px; }
  .sgn-label { padding-left: 14px; padding-right: 20px; }
  .sgn-label-text { display: none; }
  .sgn-dot { left: 22px; }
  .sgn-all { padding: 0 12px; font-size: 12px; }
  .sgn-card { max-height: 85vh; border-radius: 16px; }
  .sgn-head { padding: 16px 16px; }
  .sgn-list { padding: 4px 16px 10px; }
}

/* =================================================================
   Notification pop-up (auto-opens on visit; content from Admin > CMS >
   "Notification Popup")
   ================================================================= */
.sgp-overlay {
  position: fixed; inset: 0; z-index: 300;
  display: flex; align-items: center; justify-content: center; padding: 16px;
  background: rgba(46, 58, 78, .62); backdrop-filter: blur(4px);
  font-family: Poppins, system-ui, sans-serif;
  animation: sgp-fade .2s ease-out;
}
.sgp-overlay.sgp-out { animation: sgp-fade-out .18s ease-in forwards; }
.sgp-card {
  position: relative; width: 100%; max-width: 540px; max-height: calc(100vh - 32px);
  display: flex; flex-direction: column;
  background: #fff; color: var(--sgn-ink); border-radius: 22px; overflow: hidden;
  box-shadow: 0 30px 70px rgba(0, 0, 0, .3);
  animation: sgp-pop .28s cubic-bezier(.16, 1, .3, 1);
}
.sgp-close {
  position: absolute; top: 14px; right: 14px; z-index: 1;
  width: 36px; height: 36px; border-radius: 50%; border: 0;
  background: rgba(255, 255, 255, .22); color: #fff; font-size: 24px; line-height: 1; cursor: pointer;
}
.sgp-close:hover { background: rgba(255, 255, 255, .38); }
.sgp-head {
  flex: 0 0 auto; padding: 26px 64px 24px 28px; color: #fff;
  background-image: linear-gradient(135deg, #5b7fdb, #d9959c);
}
.sgp-eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; margin-bottom: 12px; border-radius: 999px;
  background: rgba(255, 255, 255, .2);
  font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
}
.sgp-heading { margin: 0; font-size: 22px; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.sgp-main { padding: 24px 28px 28px; overflow-y: auto; }
.sgp-img { display: block; width: 100%; height: auto; max-height: 50vh; object-fit: contain; border-radius: 12px; margin-bottom: 18px; background: #f6f7fa; }
.sgp-body { font-size: 15px; line-height: 1.65; color: #44506a; overflow-wrap: anywhere; }
.sgp-body > :first-child { margin-top: 0; }
.sgp-body p { margin: 0 0 12px; }
.sgp-body ul, .sgp-body ol { margin: 0 0 12px; padding-left: 22px; }
.sgp-body li { margin-bottom: 4px; }
.sgp-body a { color: var(--sgn-brand); font-weight: 600; }
.sgp-body b, .sgp-body strong { color: var(--sgn-ink); }
.sgp-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.sgp-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  padding: 12px 22px; border-radius: 999px; cursor: pointer;
  font: inherit; font-size: 14.5px; font-weight: 600; text-decoration: none;
  border: 1.5px solid var(--sgn-brand); background: #fff; color: var(--sgn-brand);
  transition: filter .15s, background .15s;
}
.sgp-btn:hover { background: #eef2fc; }
.sgp-btn-primary { border-color: transparent; color: #fff; background-image: linear-gradient(135deg, #5b7fdb, #d9959c); box-shadow: 0 6px 18px rgba(91, 127, 219, .3); }
.sgp-btn-primary:hover { filter: brightness(1.06); background-color: transparent; }
.sgp-overlay :focus-visible { outline: 2px solid var(--sgn-accent); outline-offset: 2px; }

@keyframes sgp-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes sgp-fade-out { to { opacity: 0; } }
@keyframes sgp-pop { from { opacity: 0; transform: scale(.94) translateY(16px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .sgp-overlay, .sgp-card, .sgp-overlay.sgp-out { animation: none; }
}
@media (max-width: 640px) {
  .sgp-head { padding: 22px 56px 20px 20px; }
  .sgp-heading { font-size: 19px; }
  .sgp-main { padding: 20px 20px 22px; }
  .sgp-body { font-size: 14.5px; }
  .sgp-actions { flex-direction: column; }
  .sgp-btn { width: 100%; }
}
