/* Announcements with an admin-chosen look (owner 2026-11-28). Classes come only from js/ann-style.js.
   Gentle motion only; none at all for "reduce motion" (system setting or the operator's own choice). */
.ann {
  --a-bg: #e8f0ff; --a-ink: #1e3a8a; --a-bar: #2563eb;
  position: relative; display: flex; align-items: center; gap: 10px; overflow: hidden;
  margin: 0 0 12px; padding: 11px 14px 11px 16px; border-radius: 12px;
  background: var(--a-bg); color: var(--a-ink); border-left: 5px solid var(--a-bar);
  box-shadow: 0 1px 2px rgba(15, 23, 42, .06); line-height: 1.5; overflow-wrap: anywhere;
}
.ann-c-blue   { --a-bg: #e8f0ff; --a-ink: #1e3a8a; --a-bar: #2563eb; }
.ann-c-green  { --a-bg: #e6f6ec; --a-ink: #14532d; --a-bar: #16a34a; }
.ann-c-yellow { --a-bg: #fff6d6; --a-ink: #713f12; --a-bar: #d97706; }
.ann-c-red    { --a-bg: #fdecec; --a-ink: #7f1d1d; --a-bar: #dc2626; }
.ann-c-purple { --a-bg: #f1eafe; --a-ink: #4c1d95; --a-bar: #7c3aed; }
.ann-s-s { font-size: .9rem; }
.ann-s-m { font-size: 1rem; }
.ann-s-l { font-size: 1.2rem; padding-top: 14px; padding-bottom: 14px; }
.ann-b { font-weight: 700; }
.ann-ico { flex: 0 0 auto; width: 1.15em; height: 1.15em; border-radius: 50%; background: var(--a-bar); position: relative; }
.ann-ico::after { content: "!"; position: absolute; inset: 0; color: #fff; font-weight: 800; font-size: .78em; display: grid; place-items: center; }
.ann-txt { flex: 1; min-width: 0; }
.ann-track { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; }
.ann-run { display: inline-block; padding-left: 100%; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .ann-c-blue   { --a-bg: #15254a; --a-ink: #c7d9ff; --a-bar: #60a5fa; }
  :root:not([data-theme="light"]) .ann-c-green  { --a-bg: #12301e; --a-ink: #b7f0cc; --a-bar: #4ade80; }
  :root:not([data-theme="light"]) .ann-c-yellow { --a-bg: #3a2b0c; --a-ink: #fde68a; --a-bar: #f59e0b; }
  :root:not([data-theme="light"]) .ann-c-red    { --a-bg: #3a1414; --a-ink: #fecaca; --a-bar: #f87171; }
  :root:not([data-theme="light"]) .ann-c-purple { --a-bg: #2a1a4a; --a-ink: #ddd0fe; --a-bar: #a78bfa; }
}
:root[data-theme="dark"] .ann-c-blue   { --a-bg: #15254a; --a-ink: #c7d9ff; --a-bar: #60a5fa; }
:root[data-theme="dark"] .ann-c-green  { --a-bg: #12301e; --a-ink: #b7f0cc; --a-bar: #4ade80; }
:root[data-theme="dark"] .ann-c-yellow { --a-bg: #3a2b0c; --a-ink: #fde68a; --a-bar: #f59e0b; }
:root[data-theme="dark"] .ann-c-red    { --a-bg: #3a1414; --a-ink: #fecaca; --a-bar: #f87171; }
:root[data-theme="dark"] .ann-c-purple { --a-bg: #2a1a4a; --a-ink: #ddd0fe; --a-bar: #a78bfa; }

@keyframes ann-slide { from { opacity: 0; transform: translateX(-24px); } to { opacity: 1; transform: none; } }
@keyframes ann-shake { 0%, 84%, 100% { transform: none; } 87% { transform: translateX(-3px) rotate(-.4deg); } 90% { transform: translateX(3px) rotate(.4deg); } 93% { transform: translateX(-2px); } 96% { transform: translateX(2px); } }
@keyframes ann-run { from { transform: translateX(0); } to { transform: translateX(-100%); } }
@keyframes ann-glow { 0%, 100% { box-shadow: 0 1px 2px rgba(15, 23, 42, .06); } 50% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--a-bar) 25%, transparent); } }

.ann-m-slide { animation: ann-slide .6s ease-out both; }
.ann-m-shake { animation: ann-shake 4s ease-in-out infinite, ann-glow 4s ease-in-out infinite; }
.ann-m-marquee .ann-run { animation: ann-run 16s linear infinite; }
.ann-m-marquee:hover .ann-run, .ann-m-marquee:focus-within .ann-run { animation-play-state: paused; }

@media (prefers-reduced-motion: reduce) {
  .ann, .ann .ann-run { animation: none !important; }
  .ann-track { white-space: normal; }
  .ann-run { padding-left: 0; }
}
:root[data-motion="reduce"] .ann, :root[data-motion="reduce"] .ann .ann-run { animation: none !important; }
:root[data-motion="reduce"] .ann-track { white-space: normal; }
:root[data-motion="reduce"] .ann-run { padding-left: 0; }
