/* Announcements with the new main menu (inc/announce.php): the island above the header bar and the bell in the bar.
   Collapsed, the island shows one announcement at a time with "1 of N"; expanded, it lists them all. The bell keeps its
   red count badge while announcements are live, and opens the island (floating under the pinned pill once scrolled). */
:root { --nmi-dark: rgba(24, 24, 28, .88); --nmi-font: var(--nmm-font, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif);
  --nmi-edge: inset 0 0 0 1px rgba(255, 255, 255, .08), inset 1.8px 3px 0 -2px rgba(255, 255, 255, .5), inset -2px -2px 0 -2px rgba(255, 255, 255, .4),
    inset -3px -8px 1px -6px rgba(255, 255, 255, .25), inset 0 3px 4px -2px rgba(0, 0, 0, .35); }

/* ---------- the island ---------- */
/* above everything, the mega menu's veil (9990) and panel / phone sheet (9991) included */
.nmi-top { position: relative; z-index: 9995; height: 60px; }
/* the old banner's module wrapper leaves a <p> (holding only its <style>) whose margin would push the island strip down */
.custom:has(> .nmi-top) > p { margin: 0; }
.nmi-island { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); z-index: 60; margin: 0; width: 340px; max-width: calc(100vw - 32px);
  color: #fff; font-family: var(--nmi-font); background: var(--nmi-dark); -webkit-backdrop-filter: blur(10px) saturate(150%); backdrop-filter: blur(10px) saturate(150%);
  border-radius: 22px; overflow: hidden;
  /* deep, layered shadow: it floats on top of the page */
  box-shadow: var(--nmi-edge), 0 4px 10px rgba(0, 0, 0, .22), 0 18px 40px -8px rgba(0, 0, 0, .5), 0 34px 70px -24px rgba(0, 0, 0, .45);
  transition: width .5s cubic-bezier(.3, 1.3, .5, 1), border-radius .45s cubic-bezier(.3, 1.2, .5, 1), box-shadow .3s; }
.nmi-island.is-open { width: 520px; border-radius: 28px;
  box-shadow: var(--nmi-edge), 0 6px 14px rgba(0, 0, 0, .25), 0 28px 60px -10px rgba(0, 0, 0, .55), 0 50px 100px -30px rgba(0, 0, 0, .5); }
.nmi-pillrow { display: flex; align-items: center; gap: 10px; width: 100%; height: 40px; padding: 0 16px; border: 0; background: none; color: inherit;
  font: 500 14px/1 var(--nmi-font); cursor: pointer; text-align: left; }
.nmi-pillrow:focus-visible { outline: 2px solid #fff; outline-offset: -4px; border-radius: 20px; }
.nmi-line { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: opacity .2s, filter .2s; }
.nmi-line.is-out { opacity: 0; filter: blur(4px); }
.nmi-tag { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: rgba(255, 255, 255, .6); margin-right: 6px; }
.nmi-count { flex: none; padding: 3px 8px; border-radius: 999px; background: rgba(255, 255, 255, .14); color: rgba(255, 255, 255, .85);
  font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; }
.nmi-chev { flex: none; width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; opacity: .6; transition: transform .3s; }
.nmi-island.is-open .nmi-chev { transform: rotate(180deg); }
.nmi-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: #ff4d57; box-shadow: 0 0 0 0 rgba(255, 77, 87, .6); animation: nmi-pulse 2s infinite; }
.nmi-dot.is-info { background: #f2c14e; box-shadow: 0 0 0 0 rgba(242, 193, 78, .6); animation-name: nmi-pulse-gold; }
@keyframes nmi-pulse { 70% { box-shadow: 0 0 0 7px rgba(255, 77, 87, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 77, 87, 0); } }
@keyframes nmi-pulse-gold { 70% { box-shadow: 0 0 0 7px rgba(242, 193, 78, 0); } 100% { box-shadow: 0 0 0 0 rgba(242, 193, 78, 0); } }

/* expanded: every announcement, one under the other */
.nmi-card { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .45s cubic-bezier(.3, 1.1, .5, 1); }
.nmi-island.is-open .nmi-card { grid-template-rows: 1fr; }
.nmi-card > div { overflow: hidden; }
.nmi-cardin { padding: 4px 22px 8px; opacity: 0; transform: translateY(-6px); transition: opacity .25s, transform .3s; }
.nmi-island.is-open .nmi-cardin { opacity: 1; transform: none; transition-delay: .12s; }
.nmi-lhead { font-size: 12px; font-weight: 600; color: rgba(255, 255, 255, .5); padding: 2px 0 6px; }
.nmi-li { display: flex; gap: 12px; padding: 14px 0; }
.nmi-li + .nmi-li { border-top: 1px solid rgba(255, 255, 255, .1); }
.nmi-li > .nmi-dot { margin-top: 4px; animation: none; }
.nmi-label { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #ff7a82; }
.nmi-label.is-info { color: #f2c14e; }
.nmi-title { font: 700 18px/1.25 var(--nmi-font); letter-spacing: -.01em; margin: 4px 0; color: #fff; }
.nmi-desc { font-size: 14px; line-height: 1.5; color: rgba(255, 255, 255, .72); margin: 0 0 12px; }
.nmi-cta { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 999px; background: #fff; color: #1d1d1f !important;
  font-weight: 600; font-size: 13px; text-decoration: none !important; }
.nmi-cta:hover, .nmi-cta:focus-visible { background: #f0f0f2; }
.nmi-cta svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* opened from the bell after scrolling: drops in under the pinned pill */
.nmi-top.is-float .nmi-island { position: fixed; top: var(--nmi-ft, 100px); animation: nmi-float-in .5s cubic-bezier(.3, 1.3, .5, 1); }
@keyframes nmi-float-in { from { opacity: 0; transform: translate(-50%, -16px) scale(.9); } to { opacity: 1; transform: translate(-50%, 0); } }
@media (max-width: 600px) { .nmi-title { font-size: 16px; } .nmi-desc { font-size: 13px; } }

/* ---------- the bell in the bar ---------- */
.nmi-bell { position: relative; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; margin-left: 2px;
  border: 0; border-radius: 999px; background: none; color: #fff; cursor: pointer; transition: background .2s; }
.nmi-bell:hover, .nmi-bell[aria-expanded="true"] { background: rgba(255, 255, 255, .14); }
.nmi-bell:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.nmi-bell svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.nmi-badge { position: absolute; top: 6px; right: 6px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: #ff3b30; color: #fff;
  font: 700 10px/16px var(--nmi-font); text-align: center; box-shadow: 0 0 0 2px rgba(24, 24, 28, .9); }
.nmi-bell.is-ping svg { animation: nmi-ring .6s; transform-origin: 50% 10%; }
@keyframes nmi-ring { 20% { transform: rotate(14deg); } 40% { transform: rotate(-12deg); } 60% { transform: rotate(8deg); } 80% { transform: rotate(-4deg); } }
.nmi-bell-m { display: none; }
@media (max-width: 1099px) { .nmi-bell-m { display: flex; position: absolute; right: 112px; top: 50%; transform: translateY(-50%); } }

@media (prefers-reduced-motion: reduce) { .nmi-island, .nmi-card, .nmi-cardin, .nmi-dot, .nmi-line, .nmi-bell svg { transition: none !important; animation: none !important; } }
