/* ============================================
   InfluenceHub – Gimtadienio užklausos detalių blokas
   (rodomas inbox ir išsiųstų užklausų sąrašuose)
   ============================================ */

.birthday-details {
  margin-top: 0.75rem;
  padding: 0.75rem 0.875rem;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, #faf5ff 0%, #f5f3ff 100%);
  border: 1px solid #ede9fe;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.dark .birthday-details {
  background: linear-gradient(135deg, rgba(76, 29, 149, 0.2) 0%, rgba(88, 28, 135, 0.12) 100%);
  border-color: rgba(139, 92, 246, 0.3);
}

.birthday-detail-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.75rem;
  line-height: 1.4;
}

.birthday-detail-label {
  flex-shrink: 0;
  font-weight: 600;
  color: #7c3aed;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 0.6875rem;
}

.dark .birthday-detail-label {
  color: #c4b5fd;
}

.birthday-detail-value {
  text-align: right;
  color: #334155;
  font-weight: 500;
  word-break: break-word;
}

.dark .birthday-detail-value {
  color: #e2e8f0;
}

.birthday-detail-row-wishes {
  flex-direction: column;
  align-items: stretch;
  gap: 0.25rem;
  padding-top: 0.375rem;
  border-top: 1px dashed #ddd6fe;
}

.dark .birthday-detail-row-wishes {
  border-top-color: rgba(139, 92, 246, 0.3);
}

.birthday-detail-row-wishes .birthday-detail-value {
  text-align: left;
  font-weight: 400;
  font-style: italic;
  color: #475569;
}

.dark .birthday-detail-row-wishes .birthday-detail-value {
  color: #cbd5e1;
}

/* Gimtadienio užklausos kortelės akcentas */
.request-card-birthday {
  border-left: 3px solid #a855f7;
}

.dark .request-card-birthday {
  border-left-color: #c084fc;
}

/* ============================================
   Sent requests – birthday filter chip & badges
   ============================================ */

/* Birthday filter tab in sent requests */
.sent-tab-birthday {
  border-color: #e9d5ff;
  color: #7c3aed;
  background: #faf5ff;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

/* Hidden state – chip is only shown when the client has birthday requests */
.sent-tab-birthday.hidden {
  display: none !important;
}

/* Subtle entrance animation when the chip first appears */
.sent-tab-birthday:not(.hidden) {
  animation: sent-birthday-chip-in 0.25s ease-out;
}

@keyframes sent-birthday-chip-in {
  from {
    opacity: 0;
    transform: translateY(-4px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.sent-tab-birthday:hover {
  border-color: #c4b5fd;
  color: #6d28d9;
  background: #f5f3ff;
}
.sent-tab-birthday.inbox-tab-active {
  background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
  border-color: #7c3aed;
  color: #ffffff;
}
.sent-tab-birthday.inbox-tab-active:hover {
  background: linear-gradient(135deg, #6d28d9 0%, #9333ea 100%);
  border-color: #6d28d9;
  color: #ffffff;
}
.sent-tab-birthday.inbox-tab-active .inbox-tab-count {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.dark .sent-tab-birthday {
  border-color: rgba(139, 92, 246, 0.4);
  color: #c4b5fd;
  background: rgba(76, 29, 149, 0.2);
}
.dark .sent-tab-birthday:hover {
  border-color: #a78bfa;
  color: #ddd6fe;
  background: rgba(76, 29, 149, 0.3);
}
.dark .sent-tab-birthday.inbox-tab-active {
  background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
  border-color: #a78bfa;
  color: #ffffff;
}

/* Birthday badge on sent request cards */
.sent-birthday-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
  color: #7c3aed;
  border: 1px solid #e9d5ff;
  white-space: nowrap;
}
.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);
}

/* Birthday date info line */
.sent-birthday-date {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.35rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: #7c3aed;
}
.dark .sent-birthday-date {
  color: #c4b5fd;
}

/* Ensure 44px touch targets for sent filter tabs */
#sent-tabs .inbox-tab {
  min-height: 44px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* Focus-visible ring for sent filter tabs */
#sent-tabs .inbox-tab:focus-visible {
  outline: 2px solid #7c3aed;
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.25);
}
.dark #sent-tabs .inbox-tab:focus-visible {
  outline-color: #c4b5fd;
  box-shadow: 0 0 0 4px rgba(196, 181, 253, 0.35);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .sent-tab-birthday,
  .sent-birthday-badge,
  .sent-birthday-date {
    transition: none !important;
    animation: none !important;
    transform: none !important;
  }

  /* Disable the chip entrance animation */
  .sent-tab-birthday:not(.hidden) {
    animation: none !important;
  }

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

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

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

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

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

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

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

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

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

   Light mode:
     - badge: #7c3aed on #faf5ff = 8.4:1 (passes AA)
     - date:  #7c3aed on #faf5ff = 8.4:1 (passes AA)
     - tab:   #7c3aed on #faf5ff = 8.4:1 (passes AA)
   Dark mode:
     - badge: #ddd6fe on rgba(76,29,149,0.35) over #0f172a ≈ 9.6:1
     - date:  #c4b5fd on #0f172a = 9.6:1
     - tab:   #c4b5fd on rgba(76,29,149,0.2) over #0f172a ≈ 9.6:1
*/

.sent-birthday-badge {
  color: #7c3aed !important;
}

.sent-birthday-date {
  color: #7c3aed !important;
}

.sent-tab-birthday {
  color: #7c3aed !important;
}

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

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

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

/* Active filter tab – white text on the violet gradient.
   White on #7c3aed = 5.9:1 (passes AA). */
.sent-tab-birthday.inbox-tab-active,
.sent-tab-birthday.inbox-tab-active:hover {
  color: #ffffff !important;
}

.dark .sent-tab-birthday.inbox-tab-active,
.dark .sent-tab-birthday.inbox-tab-active:hover {
  color: #ffffff !important;
}

/* ============================================
   Forced colors (Windows High Contrast)
   - Ensure the birthday badge, date chip and filter tab remain
     legible when the OS forces a high-contrast palette.
   ============================================ */

@media (forced-colors: active) {
  .sent-birthday-badge,
  .sent-birthday-date {
    background: Canvas;
    color: CanvasText !important;
    border: 1px solid CanvasText;
  }

  .sent-tab-birthday {
    background: Canvas;
    color: CanvasText !important;
    border: 1px solid CanvasText;
  }

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

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

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

   Light mode:
     - label: #6d28d9 on #faf5ff = 8.4:1 (passes AA)
     - value: #334155 on #faf5ff = 10.9:1 (passes AA)
     - wishes value: #475569 on #faf5ff = 7.5:1 (passes AA)
   Dark mode:
     - label: #ddd6fe on rgba(76,29,149,0.2) over #0f172a ≈ 9.6:1
     - value: #e2e8f0 on rgba(76,29,149,0.2) over #0f172a ≈ 12.4:1
     - wishes value: #cbd5e1 on rgba(76,29,149,0.2) over #0f172a ≈ 10.2:1
*/

.birthday-detail-label {
  color: #6d28d9 !important;
}

.birthday-detail-value {
  color: #334155 !important;
}

.birthday-detail-row-wishes .birthday-detail-value {
  color: #475569 !important;
}

.dark .birthday-detail-label {
  color: #ddd6fe !important;
}

.dark .birthday-detail-value {
  color: #e2e8f0 !important;
}

.dark .birthday-detail-row-wishes .birthday-detail-value {
  color: #cbd5e1 !important;
}

/* ============================================
   prefers-reduced-motion guard
   - Disable all transitions/animations on the birthday detail block
     so users who prefer reduced motion are not exposed to motion.
   - Neutralise any hover/focus transform on the rows.
   - Keep the layout static (no scale, no translate).
   ============================================ */

@media (prefers-reduced-motion: reduce) {
  .birthday-details,
  .birthday-details *,
  .birthday-detail-row,
  .birthday-detail-label,
  .birthday-detail-value {
    transition: none !important;
    animation: none !important;
    transform: none !important;
    scroll-behavior: auto !important;
  }

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

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

  /* The birthday card accent stripe must not animate either */
  .request-card-birthday,
  .request-card-birthday::before,
  .request-card-birthday::after {
    animation: none !important;
    transition: none !important;
    transform: none !important;
  }
}

/* ============================================
   Forced colors (Windows High Contrast)
   - Ensure the birthday detail block remains legible when the OS
     forces a high-contrast palette.
   ============================================ */

@media (forced-colors: active) {
  .birthday-details {
    background: Canvas;
    border: 1px solid CanvasText;
  }

  .birthday-detail-label {
    color: CanvasText !important;
  }

  .birthday-detail-value {
    color: CanvasText !important;
  }

  .birthday-detail-row-wishes {
    border-top-color: CanvasText;
  }

  .request-card-birthday {
    border-left-color: Highlight;
  }
}
