/* Notification Center (nc-*) — macOS-style panel that slides in from the right
   edge, full height under the top bar. Opened by the bell (#alertsBellWrapper).
   Glass surface, white cards, coloured glyph on a white tile (never a fill). */
.nc {
    position: fixed; z-index: 58;
    top: calc(var(--stage-t, 64px) + 8px); right: 10px; bottom: 10px;
    width: min(384px, calc(100vw - 20px));
    display: flex; flex-direction: column;
    background: rgba(244, 244, 247, .82);
    -webkit-backdrop-filter: saturate(180%) blur(28px); backdrop-filter: saturate(180%) blur(28px);
    border: 1px solid rgba(255, 255, 255, .7);
    border-radius: 18px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.8), 0 1px 2px rgba(7,9,22,.06), 0 18px 48px -12px rgba(7,9,22,.28);
    font-family: var(--display, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
    color: var(--ink, #070916);
    transform: translateX(calc(100% + 24px));
    visibility: hidden; touch-action: pan-y;   /* horizontal drags close it (notif_center.js bindSwipe) */
    transition: transform .34s cubic-bezier(.22, .8, .24, 1), visibility 0s linear .34s;
}
.nc.open { transform: none; visibility: visible; transition: transform .34s cubic-bezier(.22, .8, .24, 1), visibility 0s; }
@media (prefers-reduced-motion: reduce) { .nc, .nc.open { transition: none; } }
@media (prefers-reduced-transparency: reduce) { .nc { background: #F4F4F7; } }
@media (max-width: 768px) { .nc { top: 8px; right: 8px; bottom: 8px; width: calc(100vw - 16px); } }

.nc-hd { display: flex; align-items: center; gap: 8px; padding: 14px 14px 8px 18px; }
.nc-title { font-size: 17px; font-weight: 700; letter-spacing: -.01em; flex: 1; }
.nc-ib { width: 28px; height: 28px; border-radius: 8px; border: 0; background: transparent; color: var(--grey-2, #94969E);
    display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.nc-ib:hover { background: rgba(7,9,22,.06); color: var(--ink, #070916); }
.nc-ib svg { width: 14px; height: 14px; display: block; margin: auto; }

.nc-bar { display: flex; align-items: center; gap: 8px; padding: 0 14px 10px 18px; }
.nc-seg { display: inline-flex; padding: 2px; background: rgba(7,9,22,.06); border-radius: 9px; }
.nc-seg button { border: 0; background: transparent; font: inherit; font-size: 12px; font-weight: 600; color: var(--grey, #4F5158);
    padding: 4px 11px; border-radius: 7px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.nc-seg button.on { background: #fff; color: var(--ink, #070916); box-shadow: 0 1px 2px rgba(7,9,22,.12); }
.nc-seg .nc-n { font-size: 10.5px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: #EB1414; color: #fff;
    display: inline-flex; align-items: center; justify-content: center; }
.nc-seg .nc-n:empty { display: none; }
.nc-link { margin-left: auto; border: 0; background: none; font: inherit; font-size: 12px; font-weight: 600; color: var(--red-acc, #EB1414); cursor: pointer; padding: 4px 2px; }
.nc-link:hover { text-decoration: underline; }
.nc-link[disabled] { color: var(--grey-2, #94969E); cursor: default; text-decoration: none; }

.nc-chips { display: flex; gap: 6px; padding: 0 14px 10px 18px; overflow-x: auto; scrollbar-width: none; }
.nc-chips::-webkit-scrollbar { display: none; }
.nc-chips:empty { display: none; }
.nc-chip { flex: 0 0 auto; border: 1px solid rgba(7,9,22,.08); background: rgba(255,255,255,.7); font: inherit; font-size: 11.5px; font-weight: 600;
    color: var(--grey, #4F5158); padding: 3px 10px; border-radius: 999px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.nc-chip:hover { background: #fff; }
.nc-chip.on { background: var(--ink, #070916); border-color: var(--ink, #070916); color: #fff; }
.nc-chip i, .nc-chip svg { font-size: 10px; width: 10px; height: 10px; }
.nc-chip b { font-weight: 600; opacity: .55; }

.nc-body { flex: 1; overflow-y: auto; padding: 2px 10px 14px; overscroll-behavior: contain; }
.nc-empty { text-align: center; color: var(--grey-2, #94969E); font-size: 13px; padding: 56px 16px; }
.nc-empty svg { width: 30px; height: 30px; display: block; margin: 0 auto 10px; opacity: .5; }

/* A stack = one alert type (macOS groups by app). */
.nc-grp { margin-bottom: 10px; }
.nc-gh { display: flex; align-items: center; gap: 6px; padding: 6px 6px 5px 8px; }
.nc-gt { font-size: 12px; font-weight: 700; color: var(--grey, #4F5158); }
.nc-gc { font-size: 11px; color: var(--grey-2, #94969E); font-weight: 600; flex: 1; }
.nc-gs { border: 0; background: rgba(7,9,22,.06); color: var(--grey, #4F5158); font: inherit; font-size: 11px; font-weight: 600;
    padding: 2px 9px; border-radius: 999px; cursor: pointer; }
.nc-gs:hover { background: rgba(7,9,22,.1); }
.nc-gh .nc-ib { width: 22px; height: 22px; border-radius: 50%; background: rgba(7,9,22,.06); }
.nc-gh .nc-ib svg { width: 10px; height: 10px; }

.nc-stack { position: relative; isolation: isolate; }
.nc-stack.collapsed { padding-bottom: 12px; }
.nc-ghost { position: absolute; left: 0; right: 0; height: 24px; border-radius: 14px; background: rgba(255,255,255,.75);
    box-shadow: 0 1px 2px rgba(7,9,22,.06); }
.nc-ghost.g1 { bottom: 5px; transform: scale(.955); z-index: 0; }
.nc-ghost.g2 { bottom: 0; transform: scale(.91); z-index: -1; opacity: .7; }
.nc-stack.collapsed .nc-card { z-index: 1; }

.nc-card { position: relative; display: flex; gap: 11px; padding: 11px 12px 11px 11px; margin-bottom: 6px;
    background: rgba(255,255,255,.92); border-radius: 14px; cursor: pointer;
    box-shadow: 0 1px 2px rgba(7,9,22,.06), 0 0 0 1px rgba(7,9,22,.035);
    transition: background .15s, transform .2s, opacity .2s, max-height .25s, margin .25s, padding .25s; max-height: 400px; }
.nc-card:hover { background: #fff; }
.nc-card.out { opacity: 0; transform: translateX(40px); max-height: 0; margin-bottom: 0; padding-top: 0; padding-bottom: 0; overflow: hidden; }
.nc-card.read { background: rgba(255,255,255,.6); }
.nc-card.read .nc-msg { color: var(--grey, #4F5158); }
.nc-ic { width: 32px; height: 32px; border-radius: 9px; background: #fff; box-shadow: 0 0 0 1px rgba(7,9,22,.07), 0 1px 2px rgba(7,9,22,.06);
    flex: 0 0 auto; display: flex; align-items: center; justify-content: center; font-size: 13px; }
.nc-ic svg { display: block; margin: auto; }
.nc-main { flex: 1; min-width: 0; }
.nc-top { display: flex; align-items: baseline; gap: 8px; }
.nc-type { font-size: 12.5px; font-weight: 700; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nc-time { font-size: 11px; color: var(--grey-2, #94969E); flex: 0 0 auto; }
.nc-msg { margin: 2px 0 0; font-size: 12.5px; line-height: 1.4; color: #2A2C31;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.nc-stack.collapsed .nc-msg { -webkit-line-clamp: 2; }
.nc-more { font-size: 11px; color: var(--grey-2, #94969E); margin-top: 4px; font-weight: 600; }
.nc-acts { display: flex; gap: 6px; margin-top: 8px; }
.nc-act { border: 1px solid rgba(7,9,22,.1); background: #fff; font: inherit; font-size: 11.5px; font-weight: 600; color: var(--ink, #070916);
    padding: 3px 10px; border-radius: 7px; cursor: pointer; }
.nc-act:hover { background: #F6F6F8; }
.nc-act.pri { background: var(--ink, #070916); color: #fff; border-color: var(--ink, #070916); }
.nc-act.pri:hover { background: #22242B; }

/* The hover button in the corner: × (mark read) on unread, ↺ (mark unread) in History. */
.nc-x { position: absolute; top: -6px; left: -6px; width: 20px; height: 20px; border-radius: 50%; border: 0; padding: 0;
    background: #fff; color: var(--grey, #4F5158); box-shadow: 0 0 0 1px rgba(7,9,22,.1), 0 1px 3px rgba(7,9,22,.15);
    display: flex; align-items: center; justify-content: center; cursor: pointer; opacity: 0; transform: scale(.8);
    transition: opacity .12s, transform .12s; z-index: 2; }
.nc-x svg { width: 9px; height: 9px; display: block; margin: auto; }
.nc-card:hover .nc-x, .nc-x:focus-visible { opacity: 1; transform: none; }
.nc-x:hover { color: var(--ink, #070916); }
.nc-stack.collapsed .nc-x { display: none; }

.nc-day { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--grey-2, #94969E); padding: 10px 8px 6px; }
.nc-foot { font-size: 11px; color: var(--grey-2, #94969E); text-align: center; padding: 8px 0 2px; }

/* No browser focus ring on click; a soft one for keyboard users only. */
.nc:focus, .nc button:focus { outline: none; }
.nc button:focus-visible { outline: 2px solid rgba(235,20,20,.35); outline-offset: 1px; }

/* Settings view (gear): back chevron replaces the tabs, gear hides. */
.nc-back { display: none; margin-left: -8px; }
.nc.nc-settings .nc-back { display: inline-flex; }
.nc.nc-settings .nc-gear, .nc.nc-settings .nc-bar, .nc.nc-settings .nc-chips { display: none; }
.nc-note { font-size: 12px; line-height: 1.45; color: var(--grey, #4F5158); margin: 0 8px 4px; }
.nc-prefs { background: rgba(255,255,255,.92); border-radius: 14px; box-shadow: 0 1px 2px rgba(7,9,22,.06), 0 0 0 1px rgba(7,9,22,.035); overflow: hidden; }
.nc-pref { display: flex; align-items: center; gap: 11px; padding: 10px 12px 10px 11px; cursor: pointer; }
.nc-pref + .nc-pref { border-top: 1px solid rgba(7,9,22,.06); }
.nc-pref.off .nc-ic, .nc-pref.off .nc-main { opacity: .5; }
.nc-desc { font-size: 11.5px; color: var(--grey-2, #94969E); line-height: 1.35; margin-top: 1px; }
.nc-pref .nc-ic { width: 28px; height: 28px; border-radius: 8px; font-size: 12px; }
.nc-sw { flex: 0 0 auto; width: 34px; height: 20px; border-radius: 999px; border: 0; padding: 0; background: rgba(7,9,22,.16);
    position: relative; cursor: pointer; transition: background .18s; }
.nc-sw i { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff;
    box-shadow: 0 1px 2px rgba(7,9,22,.25); transition: transform .18s; }
.nc-sw.on { background: #10A37F; }
.nc-sw.on i { transform: translateX(14px); }
.nc-sw[disabled] { opacity: .6; cursor: default; }
.nc-inl { border: 0; background: none; padding: 0; font: inherit; color: var(--red-acc, #EB1414); font-weight: 600; cursor: pointer; }
.nc-inl:hover { text-decoration: underline; }
.nc-settings .nc-foot { text-align: left; padding: 12px 8px 4px; line-height: 1.45; }
