/* TaTasque — THE NOTICE STRIP (public/core/notice.js). Copyright Rapid Surveys Pty Ltd. Namespaced .th-notice.
 * The strip is fixed at the very top and takes its OWN space: notice.js writes its measured height to --th-notice-h on <html>; the body moves
 * down by it, the top bar sticks under it (core.css .topbar), and everything placed under the top bar reads --th-top (shared/bars). It sits
 * above the page's bars and panels (z 49) and below sheets / dialogs (.overlay 50 and up), which dim it like the rest of the page.
 * Colours are tokens (light + dark); each kind also says itself in words — never colour alone. */
:root {
  --th-notice-info-bg: #5b21b6; --th-notice-info-ink: #fff;           /* 9.1:1 */
  --th-notice-warn-bg: #fef3c7; --th-notice-warn-ink: #78350f;        /* 8.4:1 */
  --th-notice-danger-bg: #b91c1c; --th-notice-danger-ink: #fff;       /* 6.5:1 */
  --th-notice-line: rgba(0, 0, 0, .12);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --th-notice-info-bg: #2e1065; --th-notice-info-ink: #ede9fe;      /* 14:1 */
    --th-notice-warn-bg: #451a03; --th-notice-warn-ink: #fde68a;      /* 12:1 */
    --th-notice-danger-bg: #7f1d1d; --th-notice-danger-ink: #fee2e2;  /* 9.6:1 */
    --th-notice-line: rgba(255, 255, 255, .14);
  }
}
:root[data-theme="dark"] {
  --th-notice-info-bg: #2e1065; --th-notice-info-ink: #ede9fe;
  --th-notice-warn-bg: #451a03; --th-notice-warn-ink: #fde68a;
  --th-notice-danger-bg: #7f1d1d; --th-notice-danger-ink: #fee2e2;
  --th-notice-line: rgba(255, 255, 255, .14);
}
body { padding-top: var(--th-notice-h, 0px); }
html.th-has-notice { --th-safe-top: 0px; }   /* the strip carries the notch now (below), so the top bar doesn't pad for it twice */
.th-notices { position: fixed; top: 0; left: 0; right: 0; z-index: 49; padding-top: env(safe-area-inset-top);
  background: var(--th-notice-info-bg); }   /* the notch area takes the first notice's look (info is the common one) */
.th-notices[hidden] { display: none !important; }
.th-notice { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 12px; min-height: 30px;
  padding: 6px max(12px, env(safe-area-inset-right)) 6px max(12px, env(safe-area-inset-left));
  font: 600 13px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; text-align: center; overflow-wrap: anywhere; }
.th-notice + .th-notice { border-top: 1px solid var(--th-notice-line); }
.th-notice-info { background: var(--th-notice-info-bg); color: var(--th-notice-info-ink); }
.th-notice-warn { background: var(--th-notice-warn-bg); color: var(--th-notice-warn-ink); }
.th-notice-danger { background: var(--th-notice-danger-bg); color: var(--th-notice-danger-ink); }
.th-notice-t { min-width: 0; }
.th-notice-a { color: inherit; text-decoration: underline; }
.th-notice-x { flex: none; width: 32px; height: 32px; margin: -4px 0; padding: 0; display: inline-flex; align-items: center; justify-content: center;
  background: transparent; color: inherit; border: 1px solid currentColor; border-radius: 8px; font-size: 18px; line-height: 1; cursor: pointer; }
.th-notice-x:hover { background: var(--th-notice-line); }
.th-notice-a:focus-visible, .th-notice-x:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
@media (pointer: coarse) { .th-notice-x { width: 44px; height: 44px; margin: -8px 0; } }
