/* The notifications bell in the nav (assets/js/notify.js; migration 0016). Tokens only, logical properties (RTL).
   Wide screens: a panel under the bell. Phones (the nav wraps at 900px): a sheet under the nav, 16px from each side. */
.bell { position: relative; flex-shrink: 0; }
.bell[hidden] { display: none; }
.bell-btn {
  position: relative;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--tint);
  color: var(--text);
  cursor: pointer;
  display: grid; place-items: center;
}
.bell-btn:hover, .bell-btn[aria-expanded="true"] { background: var(--border); }
.bell-btn svg { width: 18px; height: 18px; }
.bell-count {
  position: absolute; top: -5px; inset-inline-end: -5px;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px;
  background: var(--danger); color: var(--on-danger);
  font: 600 11px/18px var(--font-body);
  text-align: center;
}
.bell-count[hidden] { display: none; }

.bell-panel {
  position: absolute; top: calc(100% + 10px); inset-inline-end: 0; z-index: 120;
  width: min(380px, calc(100vw - 32px));
  max-height: min(72vh, 600px); overflow: auto; overscroll-behavior: contain;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 12px 40px rgba(var(--shadow), 0.22);
  font-family: var(--font-body); font-size: 14px; line-height: 1.45;
  text-align: start;
}
.bell-panel[hidden] { display: none; }
@media (max-width: 900px) {
  .nav-cta:has(.bell:not([hidden])) { justify-content: flex-start; }   /* the bell next to the theme button (/account/ too) */
  .bell { position: static; }   /* the sheet is placed against the (fixed) nav */
  .bell-panel { top: calc(100% + 6px); inset-inline: 16px; width: auto; max-height: calc(100dvh - 150px - var(--season-h, 0px)); }   /* the season's banner makes the nav taller */
}

.bell-head {
  position: sticky; top: 0; z-index: 1;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px; background: var(--surface); border-bottom: 1px solid var(--line);
}
.bell-title { margin: 0; font: 600 16px/1.3 var(--font-body); color: var(--heading); }
.bell-link {
  border: none; background: none; padding: 4px 0; cursor: pointer;
  color: var(--gold-text); font: 500 13px var(--font-body); text-decoration: underline; text-underline-offset: 3px;
}
.bell-link[hidden] { display: none; }
.bell-status { margin: 0; padding: 0 16px; color: var(--muted); }
.bell-status:not(:empty) { padding-block: 14px; }

.bell-list { list-style: none; margin: 0; padding: 0; }
.bell-item + .bell-item { border-top: 1px solid var(--line); }
.bell-item a {
  display: grid; grid-template-columns: 10px 1fr; column-gap: 10px;
  padding: 12px 16px; color: inherit; text-decoration: none;
}
.bell-item a:hover, .bell-item a:focus-visible { background: var(--tint); }
.bell-dot { width: 8px; height: 8px; margin-top: 7px; border-radius: 50%; }
.bell-item[data-unread] .bell-dot { background: var(--gold); }
.bell-item[data-unread] .bell-line1 { font-weight: 600; }
.bell-line1 { grid-column: 2; color: var(--heading); overflow-wrap: anywhere; }
.bell-line2 { grid-column: 2; color: var(--text); overflow-wrap: anywhere; }
.bell-when { grid-column: 2; margin-top: 2px; color: var(--muted); font-size: 12px; }
.bell-item.skel { display: grid; grid-template-columns: 10px 1fr; column-gap: 10px; padding: 12px 16px; }   /* 0028: a row loading */

.bell-device, .bell-prefs { margin: 0; padding: 14px 16px; border-top: 1px solid var(--line); }
.bell-device[hidden] { display: none; }
.bell-device h3 { margin: 0 0 6px; font: 600 13px var(--font-body); color: var(--heading); }
.bell-device p { margin: 0 0 10px; color: var(--muted); }
.bell-device p:empty { display: none; }
.bell-device .btn-gold { white-space: normal; }
.bell-device-off { display: block; margin-top: 8px; }
.bell-prefs summary { cursor: pointer; font-weight: 600; color: var(--heading); }
.bell-prefs label { display: flex; align-items: flex-start; gap: 8px; margin-top: 10px; cursor: pointer; }
.bell-prefs input { margin-top: 3px; accent-color: var(--brand); width: 16px; height: 16px; flex: none; }
.bell-saved { margin: 8px 0 0; color: var(--muted); font-size: 12px; min-height: 1em; }
/* 0022: the Ramadan reminders' note and place, under their switch */
.bell-place { margin: 6px 0 0; padding-inline-start: 24px; }
.bell-place[hidden] { display: none; }
.bell-hint { margin: 0 0 8px; color: var(--muted); font-size: 12px; }
.bell-prefs .bell-place-label { display: block; margin: 0 0 4px; font-size: 13px; cursor: default; }
.bell-place .form-input { width: 100%; min-height: 40px; font-size: 14px; }

html[lang="ur"] .bell-panel { line-height: 1.9; }
