/* What's new bell + panel (ADR 0041; canvas "What's new: announcement patterns", board A desktop, board D phone).
   Loaded by Views/Shared/Ui/_WhatsNew.cshtml only when the bell is on. */
.cg-wn { position: relative; display: inline-flex; }
.cg-wn [hidden] { display: none !important; }
.cg-wn__bell { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: var(--radius-round); background: var(--surface-soft); color: var(--ink); cursor: pointer; }
.cg-wn__bell:hover { background: var(--surface-warm-strong); }
.cg-wn__bell:focus-visible, .cg-wn__close:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.cg-wn__count { position: absolute; top: -3px; right: -4px; display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; border: 2px solid var(--ground); border-radius: var(--radius-pill); background: var(--accent); color: var(--on-accent); font-size: 11px; font-weight: 600; line-height: 1; box-sizing: content-box; }

/* Above the tab bar (1000), cookie notice and install bar (1100); below the login gate (2600) and toasts (2700). */
.cg-wn__backdrop[hidden], .cg-wn__panel[hidden] { display: none !important; }
.cg-wn__backdrop { position: fixed; inset: 0; z-index: 2500; background: transparent; }
.cg-wn__panel { position: absolute; top: calc(100% + 12px); right: 0; z-index: 2501; display: flex; flex-direction: column; width: 380px; max-height: min(640px, calc(100vh - 120px)); background: var(--surface); color: var(--ink); border-radius: var(--radius-l); box-shadow: var(--shadow-card); overflow: hidden; text-align: left; }
.cg-wn__grip { display: none; }
.cg-wn__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 16px 12px 24px; border-bottom: 1px solid var(--surface-divider); }
.cg-wn__title { margin: 0; color: var(--ink); font-family: var(--font-display); font-style: italic; font-weight: 400; font-size: 34px; line-height: 1.05; }
.cg-wn__close { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: var(--radius-round); background: transparent; color: var(--ink-muted); cursor: pointer; }
.cg-wn__close:hover { background: var(--surface-soft); }
.cg-wn__list { margin: 0; padding: 0; list-style: none; overflow-y: auto; }
.cg-wn__item { display: flex; flex-direction: column; gap: 6px; padding: 16px 24px; border-bottom: 1px solid var(--surface-divider); }
.cg-wn__item:last-child { border-bottom: 0; }
.cg-wn__meta { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-caption); }
.cg-wn__kind { padding: 3px 10px; border-radius: var(--radius-pill); background: var(--accent-tint); color: var(--link); font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.cg-wn__kind--improved { background: var(--surface-soft); color: var(--ink-muted); }
.cg-wn__item--read .cg-wn__kind { background: var(--surface-soft); color: var(--ink-muted); }
.cg-wn__name { margin: 0; color: var(--ink); font-family: var(--font-sans); font-size: 16px; font-weight: 600; line-height: 1.3; }
.cg-wn__text { margin: 0; font-size: 14px; line-height: 1.45; color: var(--ink-muted); }
.cg-wn__go { align-self: flex-start; font-size: 14px; font-weight: 600; color: var(--link); text-decoration: none; padding: 4px 0; }
.cg-wn__go:hover { text-decoration: underline; }
.cg-wn__foot { margin: 0; padding: 14px 24px; background: var(--surface-warm); font-size: 13px; color: var(--ink-muted); }
.cg-wn__foot a { color: var(--link); font-weight: 600; }

/* Phones without the V2 header: the unread count on the tab bar's "Me" (whatsnew.js meTab). It replaces the profile dot. */
.cg-tabs a.cg-wn-tabme { position: relative; }
.cg-tabs a.cg-wn-tabme .cg-tabdot { display: none; }
.cg-wn-tabcount { position: absolute; top: 4px; left: calc(50% + 4px); display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--radius-pill); background: var(--accent); color: var(--on-accent); font-size: 11px; font-weight: 600; line-height: 1; box-shadow: 0 0 0 2px var(--surface); box-sizing: border-box; }

/* Phones: a bottom sheet over a dimmed page (board D). */
@media (max-width: 900px) {
    .cg-wn__bell { width: 40px; height: 40px; background: transparent; }
    .cg-wn__count { top: -2px; right: -3px; }
    .cg-wn__backdrop { background: var(--scrim); opacity: .7; }
    .cg-wn__panel { position: fixed; top: auto; left: 0; right: 0; bottom: 0; width: auto; max-height: 82vh; border-radius: var(--radius-l) var(--radius-l) 0 0; box-shadow: var(--shadow-sheet); padding-bottom: env(safe-area-inset-bottom, 0px); }
    .cg-wn__grip { display: block; width: 40px; height: 4px; margin: 10px auto 0; border-radius: var(--radius-pill); background: var(--border); }
    .cg-wn__head { padding: 8px 8px 10px 16px; }
    .cg-wn__title { font-size: 30px; }
    .cg-wn__item { padding: 14px 16px; }
    .cg-wn__foot { padding: 14px 16px; }
    body.cg-wn-open { overflow: hidden; }
}
