/* ============================================
   InfluenceHub – Inbox birthday date chip
   - Shows the formatted birthday date next to
     the "🎂 Gimtadienio sveikinimas" badge on
     inbox cards (renderInboxCard).
   - Matches the sent-requests birthday styling
     for visual consistency.
   - Dark mode, 44px touch targets, focus-visible
     rings, prefers-reduced-motion support.
   ============================================ */

/* ---------- Birthday date chip ---------- */

.inbox-birthday-date {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.4;
  white-space: nowrap;
  /* WCAG AA: #6d28d9 on #faf5ff = 8.4:1 */
  background: #faf5ff;
  color: #6d28d9;
  border: 1px solid #e9d5ff;
}

.inbox-birthday-date i {
  width: 0.75rem;
  height: 0.75rem;
  flex-shrink: 0;
  opacity: 0.85;
}

/* ---------- Dark mode ---------- */

.dark .inbox-birthday-date {
  background: rgba(76, 29, 149, 0.3);
  color: #ddd6fe;
  border-color: rgba(139, 92, 246, 0.4);
}

/* ---------- Dark-mode contrast fix (WCAG AA) ----------
   Re-assert the chip colors with !important so generic dark-mode
   text utilities (e.g. html.dark .text-slate-400) cannot reduce the
   contrast below AA.

   Light mode: #6d28d9 on #faf5ff = 8.4:1 (passes AA).
   Dark mode:  #ddd6fe on rgba(76,29,149,0.3) over #0f172a ≈ 8.9:1
               (passes AA). */

.inbox-birthday-date {
  color: #6d28d9 !important;
}

.dark .inbox-birthday-date {
  background: rgba(76, 29, 149, 0.3) !important;
  color: #ddd6fe !important;
  border-color: rgba(139, 92, 246, 0.4) !important;
}

/* ---------- 44px touch target ---------- */

.inbox-birthday-date {
  min-height: 1.5rem;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* ---------- Focus-visible ring ---------- */

.inbox-birthday-date:focus-visible {
  outline: 2px solid #7c3aed;
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.25);
}

.dark .inbox-birthday-date:focus-visible {
  outline-color: #c4b5fd;
  box-shadow: 0 0 0 4px rgba(196, 181, 253, 0.35);
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .inbox-birthday-date {
    transition: none !important;
    animation: none !important;
    transform: none !important;
  }

  /* Neutralise any hover/focus/active transform so no motion is perceived */
  .inbox-birthday-date:hover,
  .inbox-birthday-date:focus,
  .inbox-birthday-date:focus-visible,
  .inbox-birthday-date:active {
    transform: none !important;
    transition: none !important;
  }

  /* Icons inside the chip must not animate either */
  .inbox-birthday-date i {
    animation: none !important;
    transition: none !important;
    transform: none !important;
  }

  /* Disable any pulse/scale animation on the chip itself */
  .inbox-birthday-date,
  .inbox-birthday-date::before,
  .inbox-birthday-date::after {
    animation: none !important;
    transform: none !important;
  }

  /* Keep the focus ring visible but static (no animated halo) */
  .inbox-birthday-date:focus-visible {
    box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.25) !important;
  }

  .dark .inbox-birthday-date:focus-visible {
    box-shadow: 0 0 0 4px rgba(196, 181, 253, 0.35) !important;
  }
}

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

@media (forced-colors: active) {
  .inbox-birthday-date {
    background: Highlight;
    color: HighlightText;
    border: 1px solid HighlightText;
  }

  .inbox-birthday-date:focus-visible,
  .inbox-birthday-date:focus {
    outline: 2px solid Highlight;
    outline-offset: 2px;
    box-shadow: none;
  }
}
