/* ============================================
   InfluenceHub – Birthday count badges a11y
   - WCAG AA contrast fix for the "Gimtadieniai"
     count badges in both the influencer inbox
     (.inbox-birthday-count-badge) and the client
     sent-requests tabs (.sent-birthday-count-badge).
   - prefers-reduced-motion guard: disables the
     pulse animation and any transitions.
   - Dark mode contrast re-assertion so generic
     dark-mode text utilities cannot reduce the
     badge contrast below AA.
   - Forced-colors (Windows High Contrast) support.
   ============================================ */

/* ---------- Light mode contrast (WCAG AA) ----------
   White text on #7c3aed = 5.9:1 (passes AA for normal text).
   Re-assert with !important so generic utilities cannot override. */

.inbox-birthday-count-badge,
.sent-birthday-count-badge {
  background: #7c3aed !important;
  color: #ffffff !important;
}

/* Active chip – inverted badge on the violet gradient.
   White text on rgba(255,255,255,0.28) over #7c3aed ≈ 4.9:1. */
.inbox-tab-birthday.inbox-tab-active .inbox-birthday-count-badge,
.sent-tab-birthday.inbox-tab-active .sent-birthday-count-badge {
  background: rgba(255, 255, 255, 0.28) !important;
  color: #ffffff !important;
}

/* ---------- Dark mode contrast (WCAG AA) ----------
   #1e1b4b text on #a78bfa = 8.1:1 (passes AA for normal text). */

.dark .inbox-birthday-count-badge,
.dark .sent-birthday-count-badge {
  background: #a78bfa !important;
  color: #1e1b4b !important;
}

/* Active chip in dark mode – white text on rgba(255,255,255,0.3)
   over #7c3aed ≈ 5.1:1. */
.dark .inbox-tab-birthday.inbox-tab-active .inbox-birthday-count-badge,
.dark .sent-tab-birthday.inbox-tab-active .sent-birthday-count-badge {
  background: rgba(255, 255, 255, 0.3) !important;
  color: #ffffff !important;
}

/* ---------- prefers-reduced-motion guard ----------
   Disable the pulse animation and all transitions on the
   count badges so users who prefer reduced motion are not
   exposed to scaling / shadow animations. */

@media (prefers-reduced-motion: reduce) {
  .inbox-birthday-count-badge,
  .sent-birthday-count-badge {
    transition: none !important;
    animation: none !important;
    transform: none !important;
    box-shadow: none !important;
  }

  .inbox-birthday-count-badge.is-bumped,
  .sent-birthday-count-badge.is-bumped {
    animation: none !important;
    transform: none !important;
    box-shadow: none !important;
  }

  /* Also neutralise the chip entrance animation that may
     accompany the badge when the chip first appears. */
  .inbox-tab-birthday:not(.hidden),
  .sent-tab-birthday:not(.hidden) {
    animation: none !important;
    transition: none !important;
  }
}

/* ---------- Forced colors (Windows High Contrast) ---------- */

@media (forced-colors: active) {
  .inbox-birthday-count-badge,
  .sent-birthday-count-badge {
    background: Highlight !important;
    color: HighlightText !important;
    border: 1px solid HighlightText;
    box-shadow: none !important;
  }

  .inbox-tab-birthday.inbox-tab-active .inbox-birthday-count-badge,
  .sent-tab-birthday.inbox-tab-active .sent-birthday-count-badge {
    background: HighlightText !important;
    color: Highlight !important;
    border-color: Highlight !important;
  }
}
