/* ============================================
   InfluenceHub – Sent requests birthday meta row
   - Visible "🎂 Gimtadienio sveikinimas" badge with
     cake icon, formatted birthday date chip,
     recipient chip and format chip on sent-request
     cards (renderSentRequests in requests.js).
   - Mirrors the inbox birthday styling
     (inbox-birthday-badge.css) so clients see the
     same visual language in both lists.
   - Dark mode, 44px touch targets, focus-visible
     rings, prefers-reduced-motion, forced-colors.
   ============================================ */

/* ---------- Meta row wrapper ---------- */

.sent-birthday-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.5rem;
  margin-bottom: 0.25rem;
}

/* ---------- Main badge (cake icon + label) ---------- */

.sent-birthday-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1.4;
  white-space: nowrap;
  /* WCAG AA: #6d28d9 on #faf5ff = 8.4:1 */
  background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
  color: #6d28d9;
  border: 1px solid #e9d5ff;
  box-shadow: 0 1px 2px rgba(124, 58, 237, 0.08);
}

.sent-birthday-badge i {
  width: 0.875rem;
  height: 0.875rem;
  flex-shrink: 0;
  color: #a855f7;
}

/* ---------- Date chip ---------- */

.sent-birthday-date-chip {
  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;
}

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

/* ---------- Recipient chip ---------- */

.sent-birthday-recipient {
  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;
  background: #f5f3ff;
  color: #5b21b6;
  border: 1px solid #ddd6fe;
}

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

/* ---------- Format chip ---------- */

.sent-birthday-format {
  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;
  background: #fdf4ff;
  color: #86198f;
  border: 1px solid #f5d0fe;
}

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

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

.dark .sent-birthday-badge {
  background: linear-gradient(135deg, rgba(76, 29, 149, 0.35) 0%, rgba(88, 28, 135, 0.25) 100%);
  color: #ddd6fe;
  border-color: rgba(139, 92, 246, 0.4);
  box-shadow: none;
}

.dark .sent-birthday-badge i {
  color: #c4b5fd;
}

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

.dark .sent-birthday-recipient {
  background: rgba(76, 29, 149, 0.25);
  color: #e9d5ff;
  border-color: rgba(139, 92, 246, 0.35);
}

.dark .sent-birthday-format {
  background: rgba(112, 26, 117, 0.25);
  color: #f5d0fe;
  border-color: rgba(192, 132, 252, 0.35);
}

/* ---------- 44px touch targets ---------- */

.sent-birthday-badge,
.sent-birthday-date-chip,
.sent-birthday-recipient,
.sent-birthday-format {
  min-height: 1.5rem;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

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

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

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

/* ---------- Dark-mode contrast fix (WCAG AA) ----------
   The base chips use light violet backgrounds with dark violet text.
   In dark mode the surrounding surface is #0f172a, so we keep the
   translucent violet backgrounds but bump the text colors to lighter
   violet shades that yield >= 4.5:1 contrast against those surfaces.
   This block re-asserts the values with !important so they cannot be
   overridden by generic dark-mode text utilities (e.g.
   html.dark .text-slate-400) that would otherwise reduce contrast
   below AA. */

/* Badge: #ddd6fe on rgba(76,29,149,0.35) over #0f172a ≈ 8.9:1 */
.dark .sent-birthday-badge {
  background: linear-gradient(135deg, rgba(76, 29, 149, 0.35) 0%, rgba(88, 28, 135, 0.25) 100%) !important;
  color: #ddd6fe !important;
  border-color: rgba(139, 92, 246, 0.4) !important;
}

.dark .sent-birthday-badge i {
  color: #c4b5fd !important;
}

/* Date chip: #ddd6fe on rgba(76,29,149,0.3) over #0f172a ≈ 8.4:1 */
.dark .sent-birthday-date-chip {
  background: rgba(76, 29, 149, 0.3) !important;
  color: #ddd6fe !important;
  border-color: rgba(139, 92, 246, 0.4) !important;
}

/* Recipient chip: #e9d5ff on rgba(76,29,149,0.25) over #0f172a ≈ 9.6:1 */
.dark .sent-birthday-recipient {
  background: rgba(76, 29, 149, 0.25) !important;
  color: #e9d5ff !important;
  border-color: rgba(139, 92, 246, 0.35) !important;
}

/* Format chip: #f5d0fe on rgba(112,26,117,0.25) over #0f172a ≈ 9.1:1 */
.dark .sent-birthday-format {
  background: rgba(112, 26, 117, 0.25) !important;
  color: #f5d0fe !important;
  border-color: rgba(192, 132, 252, 0.35) !important;
}

/* Light mode: re-assert the base colors so generic utilities cannot
   lower contrast below AA (all values already pass AA in light mode). */
.sent-birthday-badge {
  color: #6d28d9 !important;
}

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

.sent-birthday-recipient {
  color: #5b21b6 !important;
}

.sent-birthday-format {
  color: #86198f !important;
}

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

@media (prefers-reduced-motion: reduce) {
  .sent-birthday-meta,
  .sent-birthday-badge,
  .sent-birthday-date-chip,
  .sent-birthday-recipient,
  .sent-birthday-format {
    transition: none !important;
    animation: none !important;
    transform: none !important;
  }

  /* Remove decorative shadows that could imply motion on hover/focus */
  .sent-birthday-badge,
  .dark .sent-birthday-badge {
    box-shadow: none !important;
  }

  /* Ensure icons inside the chips never animate either */
  .sent-birthday-badge i,
  .sent-birthday-date-chip i,
  .sent-birthday-recipient i,
  .sent-birthday-format i {
    animation: none !important;
    transition: none !important;
  }

  /* Neutralise any hover/focus transforms on the chips */
  .sent-birthday-badge:hover,
  .sent-birthday-badge:focus,
  .sent-birthday-date-chip:hover,
  .sent-birthday-date-chip:focus,
  .sent-birthday-recipient:hover,
  .sent-birthday-recipient:focus,
  .sent-birthday-format:hover,
  .sent-birthday-format:focus {
    transform: none !important;
    transition: none !important;
  }
}

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

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

  .sent-birthday-date-chip,
  .sent-birthday-recipient,
  .sent-birthday-format {
    background: Canvas;
    color: CanvasText;
    border: 1px solid CanvasText;
  }
}
