/* Bell notification dropdown — injected into .nav-right on every page */
.bell-wrap {
  position: relative;
  display: inline-flex; align-items: center;
}
.bell-btn {
  background: transparent;
  border: 1px solid var(--gray-border);
  color: var(--gray);
  width: 36px; height: 36px;
  font-size: 1rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: color 0.2s, border-color 0.2s;
  flex-shrink: 0;
}
.bell-btn:hover { border-color: var(--yellow); color: var(--yellow); }
.bell-btn .bell-icon { line-height: 1; font-size: 1.05rem; }

.bell-badge {
  position: absolute;
  top: -4px; right: -4px;
  background: var(--yellow);
  color: var(--badge-text);
  font-family: var(--sans);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 1px 5px;
  min-width: 16px; height: 16px;
  display: flex; align-items: center; justify-content: center;
  line-height: 1;
  pointer-events: none;
}
.bell-badge.hidden { display: none; }

.bell-panel {
  position: absolute;
  top: calc(100% + 10px); right: 0;
  width: min(360px, calc(100vw - 1rem));
  background: var(--card-bg);
  border: 1px solid var(--gray-border);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  z-index: 300;
  font-family: var(--sans);
  display: none;
}
.bell-panel.open { display: block; }

.bell-head {
  padding: 0.9rem 1rem 0.8rem;
  border-bottom: 1px solid var(--gray-border);
  display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
}
.bell-title {
  font-family: var(--serif); font-weight: 400; font-size: 1.05rem;
  color: var(--white); line-height: 1;
}
.bell-head-sub {
  font-size: 0.62rem; letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--yellow); font-weight: 600;
}

.bell-list {
  max-height: 400px; overflow-y: auto;
  display: flex; flex-direction: column;
}
.bell-empty {
  padding: 2rem 1rem; text-align: center;
  color: var(--gray); font-size: 0.88rem;
}

.bell-item {
  display: flex; flex-direction: column; gap: 0.25rem;
  padding: 0.8rem 1rem; cursor: pointer;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  text-decoration: none; color: inherit;
  transition: background 0.15s;
}
.bell-item:hover { background: rgba(245, 197, 24, 0.04); }
.bell-item.is-due { border-left: 2px solid var(--yellow); padding-left: calc(1rem - 2px); }

.bell-type {
  font-size: 0.58rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--yellow); font-weight: 700;
  display: flex; align-items: center; gap: 0.4rem;
}
.bell-type .bell-icon-sm {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--yellow);
}
.bell-item.is-upcoming .bell-type { color: var(--gray); }
.bell-item.is-upcoming .bell-type .bell-icon-sm { background: var(--gray); }

.bell-topic {
  font-family: var(--serif); font-weight: 400;
  font-size: 0.98rem; color: var(--white); line-height: 1.25;
}
.bell-meta {
  font-size: 0.72rem; color: var(--gray); line-height: 1.4;
}
.bell-meta .bell-stage {
  color: var(--yellow); font-weight: 600;
}

.bell-foot {
  padding: 0.55rem 1rem; text-align: center;
  border-top: 1px solid var(--gray-border);
  font-size: 0.68rem; color: var(--gray); letter-spacing: 0.06em;
}
.bell-foot a { color: var(--yellow); text-decoration: none; }
.bell-foot a:hover { text-decoration: underline; }

/* Mobile: pin the dropdown to the viewport so it never overflows off-screen
   (prior behaviour: position:absolute inside .bell-wrap caused the panel to
   leak beyond the right edge on narrow WebViews). */
@media (max-width: 768px) {
  .bell-panel {
    position: fixed !important;
    top: 64px !important;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%);
    width: calc(100vw - 16px) !important;
    max-width: 420px;
    max-height: calc(100vh - 96px);
  }
}
