/* Hari Villa — v0.10.0 notifications: the top-bar bell and the full page.
 * Own file, linked from base.html. style.css stays untouched.
 * Tokens only: --navy --gold --paper --ink --muted --line --green --amber --red.
 *
 * Severity follows the renewals chips: overdue = red, urgent = amber,
 * soon = green. Saffron/slate stay reserved (celebration / remembrance).
 */

/* ---------- the bell ---------- */
.hv-bell { position: relative; }

.hv-bell-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0 0.3rem;
  background: none;
  border: 0;
  cursor: pointer;
  color: inherit;
}
.hv-bell-ico {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--navy);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.hv-bell-btn:hover .hv-bell-ico { stroke: var(--gold); }

.hv-bell-count {
  position: absolute;
  top: 4px;
  right: 2px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: 0.66rem;
  font-weight: 800;
  line-height: 17px;
  text-align: center;
  box-shadow: 0 0 0 2px var(--paper);
}
.hv-bell-count[hidden] { display: none; }

/* ---------- the dropdown ---------- */
.hv-bell-menu {
  position: absolute;
  z-index: 60;
  right: 0;
  top: calc(100% + 6px);
  width: min(22rem, calc(100vw - 1.5rem));
  background: #fff;
  border: 1px solid var(--line);
  border-top: 2px solid var(--gold);
  border-radius: 4px;
  box-shadow: 0 12px 28px rgba(15, 36, 64, 0.16);
  padding: 0.3rem 0;
}
.hv-bell-menu[hidden] { display: none; }

.hv-bell-head {
  padding: 0.55rem 0.85rem 0.35rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
}
.hv-bell-list { max-height: 60vh; overflow-y: auto; }

.hv-bell-empty {
  margin: 0;
  padding: 1rem 0.85rem;
  font-size: 0.86rem;
  color: var(--muted);
}

.hv-bell-all {
  display: block;
  min-height: 44px;
  line-height: 44px;
  padding: 0 0.85rem;
  border-top: 1px solid var(--line);
  text-align: center;
  text-decoration: none;
  color: var(--navy);
  font-size: 0.84rem;
  font-weight: 700;
}
.hv-bell-all:hover { background: #F4F7FB; }

/* ---------- a notification row (shared: dropdown + page) ---------- */
.notif-row {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.6rem 0.85rem;
  border-bottom: 1px solid var(--line);
  border-left: 3px solid transparent;
}
.notif-row:last-child { border-bottom: 0; }
.notif-row.is-unseen { border-left-color: var(--gold); background: #FCFAF2; }

.notif-ico {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin-top: 0.15rem;
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.notif-ico-bill { stroke: var(--amber); }
.notif-ico-health { stroke: var(--red); }
.notif-ico-renewal { stroke: var(--navy); }

.notif-main {
  flex: 1 1 auto;
  min-width: 0;
  text-decoration: none;
  color: var(--ink);
}
.notif-title {
  font-size: 0.9rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.notif-sub {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-top: 0.2rem;
  font-size: 0.76rem;
  color: var(--muted);
}
.notif-sev {
  flex: 0 0 auto;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.notif-sev-overdue { color: var(--red); }
.notif-sev-urgent { color: var(--amber); }
.notif-sev-soon { color: var(--green); }
.notif-when {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-transform: capitalize;
}

.notif-dismiss {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  margin: -0.2rem -0.3rem 0 0;
  background: none;
  border: 0;
  cursor: pointer;
  color: var(--muted);
  font-size: 1.3rem;
  line-height: 1;
  border-radius: 4px;
}
.notif-dismiss:hover { background: #F4F7FB; color: var(--red); }

/* ---------- the full page ---------- */
.notif-page {
  max-width: 44rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}
.notif-page .notif-row { padding: 0.85rem 1rem; }
.notif-empty { max-width: 44rem; }

@media (min-width: 900px) {
  .hv-bell-btn { min-width: 40px; min-height: 32px; }
  .hv-bell-count { box-shadow: 0 0 0 2px #fff; }
  /* touch targets can relax on desktop, per the house rule */
  .hv-bell-all { min-height: 36px; line-height: 36px; }
}
