/* Custom overrides to fix platform-wide button text visibility issues */

/*
 * Override Tailwind's button reset which sets color: inherit
 * This was causing buttons to inherit white text from parent elements,
 * resulting in white-on-white invisible buttons throughout the platform.
 *
 * By setting a default text color here, we ensure all buttons are visible
 * unless they explicitly override with Tailwind utility classes (e.g., text-white)
 */
button {
  color: #1c1917; /* neutral-900 - dark text for visibility */
}

/*
 * For buttons with background colors, ensure text is white by default
 * This handles cases where bg- utility is used without text- utility
 */
button[class*="bg-primary"],
button[class*="bg-success"],
button[class*="bg-accent"],
button[class*="bg-blue"],
button[class*="bg-green"],
button[class*="bg-red"],
button[class*="bg-indigo"],
button[class*="bg-purple"],
button[class*="bg-pink"],
button[class*="bg-yellow"],
button[class*="bg-orange"] {
  color: white;
}

/*
 * For buttons with light/neutral backgrounds, ensure dark text
 */
button[class*="bg-neutral-50"],
button[class*="bg-neutral-100"],
button[class*="bg-neutral-200"],
button[class*="bg-gray-50"],
button[class*="bg-gray-100"],
button[class*="bg-gray-200"],
button[class*="bg-white"] {
  color: #1c1917; /* neutral-900 */
}

/*
 * Tailwind text utility classes should always take precedence
 * The !important is necessary to override the above default rules
 * when developers explicitly set text colors
 */
button[class*="text-"] {
  color: inherit !important;
}

/* Toast notification animations */
@keyframes slide-in {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.animate-slide-in {
  animation: slide-in 0.3s ease-out;
}

/* Print styles for PDF export */
@media print {
  /* Hide navigation, buttons, and non-content elements */
  nav,
  button,
  .no-print {
    display: none !important;
  }

  /* Ensure report content takes full width */
  #report-content {
    width: 100% !important;
    max-width: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  /* Page break settings */
  h2, h3, h4 {
    page-break-after: avoid;
    page-break-inside: avoid;
  }

  table {
    page-break-inside: avoid;
  }

  /* Ensure good contrast for printing */
  body {
    background: white;
    color: black;
  }

  /* Maintain table borders in print */
  table, th, td {
    border: 1px solid #ddd !important;
  }

  /* Better spacing for print */
  .prose {
    font-size: 11pt;
    line-height: 1.5;
  }
}
