/* ═══════════════════════════════════════════════════════════════════════════
   HRBP Action Queue - notification bell in the top nav + floating popover.
   Gives the HRBP a single-click view of pending HC approvals, coverage gaps,
   span outliers, flight risks, and recent changes. The button lives in #nav
   next to the identity avatar (conventional notification slot - Slack,
   GitHub, Linear all use the same pattern), grouped with the right-side
   cluster so notifications + identity feel like one unit.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Nav bell button ───────────────────────────────────────────────────── */
.nav-bell-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 28px;
  margin-right: 6px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--nav-muted);
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}
.nav-bell-btn:hover {
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(255, 255, 255, 0.28);
  color: #fff;
}
.nav-bell-btn:focus-visible {
  outline: none;
  border-color: var(--orange-bright);
  box-shadow: 0 0 0 3px rgba(255, 106, 19, 0.18);
}
.nav-bell-icon {
  font-size: 14px;
  line-height: 1;
  opacity: 0.85;
  transition: opacity 0.12s ease;
}
.nav-bell-btn:hover .nav-bell-icon { opacity: 1; }

/* Badge - absolute overlay on the top-right of the bell. Shown only when
   _refreshBadge() appends it (count > 0). High-urgency tint pulses to draw
   the eye to truly time-sensitive items. */
.hrq-badge {
  position: absolute;
  top: -5px;
  right: -6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 9px;
  background: #1565C0;
  color: #FFFFFF;
  font-size: 9.5px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.01em;
  /* Ring matches the nav gradient's top stop so the badge looks cut out of
     the bar rather than floating on top. */
  border: 1.5px solid #082F4E;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  transition: all 0.12s ease;
}
.hrq-badge-high {
  background: #DC2626;
  box-shadow: 0 1px 2px rgba(220, 38, 38, 0.45);
  animation: hrqBadgePulse 2.4s ease-in-out infinite;
}
@keyframes hrqBadgePulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.12); }
}

/* Mobile (≤840px) - bottom-tab nav owns navigation; hide bell here. The
   queue itself remains reachable from views that surface its items directly. */
@media (max-width: 840px) {
  .nav-bell-btn { display: none; }
}

/* ── Popover panel ─────────────────────────────────────────────────────── */
#hrq-popover {
  position: fixed;
  top: 96px;       /* Below the summary bar + toolbar */
  right: 16px;
  width: 380px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 120px);
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  box-shadow: 0 20px 50px -12px rgba(15, 23, 42, 0.35),
              0 0 0 1px rgba(15, 23, 42, 0.04);
  z-index: 1100;
  display: flex;
  flex-direction: column;
  font-family: 'IBM Plex Sans', sans-serif;
  color: #111827;
  animation: hrqPopIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}
#hrq-popover.hidden { display: none; }
@keyframes hrqPopIn {
  from { opacity: 0; transform: translateY(-8px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Subtle accent stripe at top - same idiom as the v2 modal */
#hrq-popover::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #1565C0 0%, #7C3AED 100%);
  border-radius: 12px 12px 0 0;
}

/* ── Header ────────────────────────────────────────────────────────────── */
.hrq-head {
  padding: 16px 20px 12px;
  border-bottom: 1px solid #F3F4F6;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex: 0 0 auto;
}
.hrq-head-title {
  font-size: 14px;
  font-weight: 800;
  color: #111827;
  letter-spacing: -0.01em;
}
.hrq-head-sub {
  font-size: 11px;
  color: #6B7280;
  margin-top: 2px;
  font-weight: 600;
}
.hrq-close {
  background: transparent;
  border: 1px solid transparent;
  color: #6B7280;
  font-size: 18px;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  transition: all 0.12s ease;
}
.hrq-close:hover {
  background: #F3F4F6;
  color: #111827;
  border-color: #E5E7EB;
}

/* ── Body ──────────────────────────────────────────────────────────────── */
.hrq-body {
  overflow-y: auto;
  padding: 8px 0 14px;
  flex: 1 1 auto;
}

/* ── Section ───────────────────────────────────────────────────────────── */
.hrq-section {
  padding: 0 8px;
  margin-bottom: 10px;
}
.hrq-section-head {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px 6px;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #4B5563;
  border-bottom: 1px solid #F3F4F6;
  margin: 0 4px 6px;
}
.hrq-section-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 3px;
  background: var(--accent, #6B7280);
  color: #FFFFFF;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  flex: 0 0 16px;
}
.hrq-section-label {
  flex: 1;
  color: #111827;
}
.hrq-section-count {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 1px 7px;
  border-radius: 9px;
  background: var(--accent, #6B7280);
  color: #FFFFFF;
}
.hrq-section-empty {
  padding: 6px 14px 10px;
  font-size: 11px;
  color: #9CA3AF;
  font-style: italic;
}

/* ── Item ──────────────────────────────────────────────────────────────── */
.hrq-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: calc(100% - 8px);
  padding: 8px 12px;
  margin: 0 4px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.12s ease;
  text-align: left;
  font-family: inherit;
  color: inherit;
}
.hrq-item:hover {
  background: #F9FAFB;
  border-color: #E5E7EB;
}
.hrq-item:focus-visible {
  outline: none;
  border-color: #1565C0;
  box-shadow: 0 0 0 2px rgba(21, 101, 192, 0.18);
}
.hrq-item-body {
  flex: 1;
  min-width: 0;
}
.hrq-item-title {
  font-size: 12px;
  font-weight: 700;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hrq-item-sub {
  font-size: 10.5px;
  color: #6B7280;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hrq-item-meta {
  flex: 0 0 auto;
  font-size: 10px;
  font-weight: 700;
  color: #9CA3AF;
  padding: 2px 6px;
  border-radius: 9px;
  background: #F3F4F6;
}
.hrq-item-arrow {
  flex: 0 0 auto;
  font-size: 14px;
  color: #D1D5DB;
  transition: color 0.12s ease, transform 0.12s ease;
}
.hrq-item:hover .hrq-item-arrow {
  color: #6B7280;
  transform: translateX(2px);
}

/* ── Urgency badge on item (left-side dot) ─────────────────────────────── */
.hrq-urg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  flex: 0 0 16px;
}
.hrq-urg-high {
  background: #FEE2E2;
  color: #991B1B;
}
.hrq-urg-med {
  background: #FEF3C7;
  color: #92400E;
}

/* ── Empty state (zero items overall) ──────────────────────────────────── */
.hrq-empty-all {
  text-align: center;
  padding: 36px 20px 32px;
  color: #6B7280;
}
.hrq-empty-icon {
  font-size: 36px;
  margin-bottom: 10px;
  color: #059669;
}
.hrq-empty-msg {
  font-size: 13px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 4px;
}
.hrq-empty-sub {
  font-size: 11px;
  color: #9CA3AF;
  max-width: 280px;
  margin: 0 auto;
  line-height: 1.5;
}

/* ── Mobile ────────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  #hrq-popover {
    top: 70px;
    right: 8px;
    left: 8px;
    width: auto;
    max-width: none;
  }
}
