/* =============================================================
   wh_feed.css — notification bell, new-comment dots
   Linked globally from base.html (after ec_cards.css).
   ============================================================= */

/* The bar itself, its menus and the command palette are styled in nav.css. */

[hidden].wh-dot, [hidden].wh-badge, [hidden].wh-panel { display: none !important; }

/* ── New-comment dot beside a nav label ── */
.wh-dot {
  display: inline-block; width: 8px; height: 8px; margin-left: .3rem; vertical-align: middle;
  border-radius: 50%; background: var(--msp-red, #e61873);
}

/* ── Bell ── */
.wh-bell { position: relative; }
.wh-bell__btn {
  position: relative; width: 40px; height: 40px; display: grid; place-items: center;
  border: 0; border-radius: 50%; background: transparent; color: rgba(255, 255, 255, .85);
  font-size: 1.2rem; transition: background .15s ease, color .15s ease;
}
.wh-bell__btn:hover, .wh-bell__btn[aria-expanded="true"] { background: rgba(255, 255, 255, .12); color: #fff; }
.wh-bell__btn:focus-visible { outline: 2px solid var(--msp-blue, #2daae1); outline-offset: 2px; }
.wh-badge {
  position: absolute; top: 3px; right: 1px; min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 9px; background: var(--msp-red, #e61873); color: #fff; text-align: center;
  font: 700 .65rem/17px Roboto, sans-serif; box-shadow: 0 0 0 2px var(--bs-tertiary-bg, #2b3035);
}
/* Only comments are new: a quiet blue dot instead of a red count. */
.wh-badge--dot { min-width: 9px; width: 9px; height: 9px; padding: 0; top: 7px; right: 7px; background: var(--msp-blue, #2daae1); }

/* ── Panel ── */
.wh-panel {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 1080;
  display: flex; flex-direction: column; width: min(26rem, 92vw); max-height: min(70vh, 34rem);
  overflow: hidden; border-radius: 14px; border: 1px solid rgba(15, 23, 42, .1);
  background: #fff; color: #0f172a; box-shadow: 0 18px 48px rgba(2, 6, 23, .28);
  font-size: .86rem; text-align: left;
}
body.dark-mode .wh-panel { background: #181b20; color: #e9eef5; border-color: rgba(255, 255, 255, .1); }
@media (max-width: 575.98px) {
  .wh-panel { position: fixed; left: 8px; right: 8px; top: var(--wh-panel-top, 60px); width: auto; }
}

.wh-tabs { display: flex; border-bottom: 1px solid rgba(100, 116, 139, .25); }
.wh-tab {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .75rem .5rem; border: 0; border-bottom: 2px solid transparent; background: none;
  color: #64748b; font-weight: 600;
}
.wh-tab[aria-selected="true"] { color: inherit; border-bottom-color: var(--msp-blue, #2daae1); }
.wh-tab:focus-visible, .wh-item:focus-visible, .wh-link:focus-visible, .wh-item__x:focus-visible {
  outline: 2px solid var(--msp-blue, #2daae1); outline-offset: -2px;
}
.wh-count {
  min-width: 1.35rem; padding: 0 .4rem; border-radius: 999px; text-align: center;
  background: var(--msp-red, #e61873); color: #fff; font-size: .7rem; font-weight: 700; line-height: 1.35rem;
}

.wh-list { flex: 1; overflow-y: auto; overscroll-behavior: contain; }
.wh-row { position: relative; }
.wh-item {
  position: relative; display: block; padding: .7rem 2.4rem .7rem 1.25rem;
  border-bottom: 1px solid rgba(100, 116, 139, .18); color: inherit; text-decoration: none;
}
a.wh-item:hover { background: rgba(45, 170, 225, .09); color: inherit; }
.wh-item.is-new::before {
  content: ''; position: absolute; left: .5rem; top: 1.15rem; width: 7px; height: 7px;
  border-radius: 50%; background: var(--msp-red, #e61873);
}
.wh-item__sub, .wh-item__meta { color: #64748b; font-size: .76rem; }
.wh-item__quote { margin-top: .1rem; overflow-wrap: anywhere; }
.wh-item__meta { margin-top: .15rem; }
.wh-item__x {
  position: absolute; right: .45rem; top: .5rem; width: 28px; height: 28px; display: grid; place-items: center;
  border: 0; border-radius: 50%; background: none; color: #94a3b8; font-size: .8rem;
}
.wh-item__x:hover { background: rgba(100, 116, 139, .18); color: inherit; }
.wh-group {
  display: flex; align-items: center; gap: .45rem; padding: .55rem 1rem .3rem;
  color: #64748b; font-weight: 600; font-size: .8rem;
}
.wh-empty { padding: 2.2rem 1.25rem; text-align: center; color: #64748b; }
.wh-empty strong { display: block; color: inherit; margin-bottom: .2rem; }

.wh-foot {
  display: flex; flex-wrap: wrap; gap: .4rem 1rem; align-items: center; justify-content: space-between;
  padding: .6rem 1rem; border-top: 1px solid rgba(100, 116, 139, .25); font-size: .8rem;
}
.wh-link { padding: 0; border: 0; background: none; color: var(--msp-dark-blue, #1c6b92); font: inherit; font-weight: 600; text-decoration: none; }
.wh-link:hover { text-decoration: underline; }
body.dark-mode .wh-link { color: var(--msp-blue, #2daae1); }

@media (prefers-reduced-motion: reduce) {
  .wh-bell__btn { transition: none; }
}
