/* 🔔 Notifications (task T7): the header bell + badge, the desktop dropdown, /me/notifications and the
   "The Mess Hall + you" switches on /me/alerts. Built to the approved T0 board (nt- classes); site tokens only. */

/* ── header bell (js/notify.js shows it for signed-in members) ── */
.top .btn.ghost.nt-bell { position: relative; display: inline-flex; align-items: center; justify-content: center; padding: 6px 9px; font-size: 17px; line-height: 1; }
.top .btn.ghost.nt-bell[hidden] { display: none; }
.top .btn.ghost.nt-bell[aria-expanded="true"] { background: rgb(255 255 255 / .18); }
.nt-badge { position: absolute; top: -6px; right: -6px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 99px; background: var(--mustard); color: #2b1d00;
  font: 800 11.5px/19px var(--body); text-align: center; box-shadow: 0 0 0 2px var(--ketchup); pointer-events: none; }
.nt-badge[hidden] { display: none; }
:root[data-night] .nt-badge { background: var(--neon-pink); color: #fff; box-shadow: 0 0 0 2px #070a18, 0 0 10px rgb(255 62 165 / .7); }
@media (max-width: 860px) { .top .btn.ghost.nt-bell:not([hidden]) { display: inline-flex; } }   /* phones hide other ghost buttons, not this one */
@media (max-width: 400px) { .top .btn.ghost.nt-bell { padding: 6px 7px; font-size: 16px; } }
/* The bell (+53 px) only shows for members, next to their name chip, so a signed-in header needs more room than
   style.css budgets for (its inline links fit from 1,241 px signed out). With the bell showing, the ☰ drawer takes the
   links up to 1,400 px, and up to 1,540 px the links sit closer and "+ Add a spot" shortens to "+ Add". Browsers without
   :has() keep style.css's breakpoints. (R1 browser check 2026-11-16: the signed-in home header ran 44-71 px off screen.) */
@media (min-width: 1241px) and (max-width: 1400px) {
  .top:has(.nt-bell:not([hidden])) .main-nav { display: none; }
  .top:has(.nt-bell:not([hidden])) .btn.nav-toggle, .top:has(.nt-bell:not([hidden])) .btn.find-btn { display: inline-flex; }
}
@media (min-width: 1401px) and (max-width: 1540px) {
  .top:has(.nt-bell:not([hidden])) .main-nav { gap: 0; margin-left: 4px; }
  .top:has(.nt-bell:not([hidden])) .main-nav a { padding: 8px 8px; font-size: 14px; }
  .top:has(.nt-bell:not([hidden])) .wide-only { display: none; }
}

/* ── rows (the page and the dropdown) ── */
.nt-page { max-width: 720px; }
.nt-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.nt-head h1 { margin: 0; }
.nt-head .btn { margin-left: auto; }
.nt-lede { margin: 4px 0 0; }
.nt-list { list-style: none; margin: 0; padding: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.nt-day { margin: 18px 0 8px; font: 800 13px var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.nt-li { position: relative; border-top: 1px solid var(--line); }
.nt-list .nt-li:first-child { border-top: 0; }
.nt { position: relative; display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px 12px 16px; text-decoration: none; color: var(--ink); }
.nt:hover { background: var(--bun); }
.nt.has-btn { padding-right: 118px; }
.nt.is-new { background: var(--soon-bg); }
:root[data-night] .nt.is-new { background: #161d45; }
.nt.is-new::before { content: ""; position: absolute; left: 5px; top: 50%; width: 7px; height: 7px; margin-top: -4px; border-radius: 50%; background: var(--ketchup); }
:root[data-night] .nt.is-new::before { background: var(--neon-pink); box-shadow: 0 0 8px var(--neon-pink); }
.nt-pics { position: relative; width: 46px; height: 46px; flex: none; }
.nt-pics img { position: absolute; width: 34px; height: 34px; border-radius: 50%; object-fit: cover; background: var(--mustard); box-shadow: 0 0 0 2px var(--card); }
.nt-pics img:first-child { left: 0; top: 0; }
.nt-pics img:nth-child(2) { right: 0; bottom: 0; }
.nt-pics img:only-of-type { width: 46px; height: 46px; }
.nt-pics img.is-spot { border-radius: 9px; box-shadow: 0 0 0 2px var(--open); }
.nt-pics .nt-ic { position: absolute; right: -4px; bottom: -4px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--card); font-size: 13px; font-weight: 800; color: var(--ink); box-shadow: 0 0 0 1px var(--line); }
.nt-tx { flex: 1; min-width: 0; font-size: 14.5px; line-height: 1.38; overflow-wrap: anywhere; }
.nt-p { display: block; }
.nt-tx q { color: var(--muted); quotes: "“" "”"; }
.nt-tx small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.nt-th { width: 52px; height: 52px; border-radius: 9px; object-fit: cover; flex: none; background: var(--bun); }
.nt-fb { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); }
.nt-fb.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.nt-owner { display: inline-block; color: #fff; background: var(--open); border-radius: 4px; padding: 0 5px; font: 800 11px/17px var(--body); vertical-align: 1px; }
:root[data-night] .nt-owner { color: #04121a; }
.nt-empty { display: flex; gap: 16px; align-items: center; justify-content: center; padding: 30px 16px; color: var(--muted); text-align: left; }
.nt-empty img { flex: none; height: 110px; width: auto; }
.nt-empty b { color: var(--ink); font: 800 18px var(--head); }
.nt-more, .nt-end { text-align: center; margin: 16px 0; }
@media (max-width: 520px) {
  .nt { gap: 10px; padding: 11px 10px 11px 14px; }
  .nt.has-btn { padding-right: 14px; padding-bottom: 48px; }
  .nt-fb { top: auto; bottom: 10px; transform: none; left: 70px; right: auto; }
  .nt-th { width: 44px; height: 44px; }
  .nt-tx { font-size: 14px; }
}

/* ── the desktop dropdown (wider than 860 px; phones go straight to /me/notifications) ── */
.nt-drop { position: fixed; top: 62px; right: 14px; z-index: 1001; width: min(400px, calc(100vw - 28px)); max-height: 76vh; display: grid; grid-template-rows: auto minmax(0, 1fr) auto;
  background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 20px 50px rgb(40 20 0 / .3); overflow: hidden; }
.nt-drop[hidden] { display: none; }
.nt-drop header { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.nt-drop header b { font: 800 18px var(--head); }
.nt-drop .nt-scroll { overflow-y: auto; overscroll-behavior: contain; }
.nt-drop .nt-day { margin: 10px 14px 6px; }
.nt-drop .nt-list { border: 0; border-radius: 0; box-shadow: none; }
.nt-drop footer { padding: 10px 14px; border-top: 1px solid var(--line); text-align: center; font: 700 14px var(--body); }
.nt-drop footer a { color: var(--ink); }
.nt-drop .nt-empty { flex-direction: column; text-align: center; }
.nt-drop .nt-empty img { height: 80px; }
.nt-lnk { border: 0; background: none; color: var(--muted); font: 700 13px var(--body); padding: 4px 6px; cursor: pointer; border-radius: 6px; }
.nt-lnk:hover { color: var(--ink); background: var(--bun); }
.nt-lnk[disabled] { opacity: .5; cursor: default; }
:root[data-night] .nt-drop { box-shadow: 0 0 0 1px var(--neon-cyan), 0 20px 50px rgb(0 0 0 / .6); }

/* ── /me/alerts: The Mess Hall + you ── */
.alerts-sub { margin: 14px 0 2px; font: 800 13px var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.alerts-card .alerts-sub { margin: 14px 0 2px; }
.nt-newtag { font: 800 10.5px var(--body); background: var(--relish); color: #fff; border-radius: 4px; padding: 1px 6px; margin-left: 6px; vertical-align: 2px; letter-spacing: 0; }
.nt-fine { font-size: 12.5px; color: var(--muted); margin: 6px 0 0; }
.alerts-card .nt-fine { margin: 6px 0 0; }
.nt-prefs .alerts-msg:empty { display: none; }
.alerts-topics .nt-subli { padding: 0; }
.alerts-topics .nt-subli + li .alerts-row { border-top: 0; }
