@tailwind base;
@tailwind components;
@tailwind utilities;

@layer base {
  html {
    scroll-behavior: smooth;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: #0f172a;
    background-color: #ffffff;
  }
}

/* Custom Water Blue Energetic Animations & Pulsing Effects */
@keyframes hydroPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(6, 182, 212, 0.7); }
  50% { transform: scale(1.02); box-shadow: 0 0 0 12px rgba(6, 182, 212, 0); }
}

@keyframes callPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.7); }
  50% { transform: scale(1.03); box-shadow: 0 0 0 14px rgba(220, 38, 38, 0); }
}

.btn-pulse-hydro {
  animation: hydroPulse 2.5s infinite;
}

.btn-pulse-call {
  animation: callPulse 2s infinite;
}

/* Specificity Overrides for Prose & Dynamic Cards */
.prose .bg-slate-900 h1,
.prose .bg-slate-900 h2,
.prose .bg-slate-900 h3,
.prose .bg-slate-900 h4,
.prose .bg-slate-950 h1,
.prose .bg-slate-950 h2,
.prose .bg-slate-950 h3,
.prose .bg-slate-950 h4,
.prose .bg-ocean-dark h1,
.prose .bg-ocean-dark h2,
.prose .bg-ocean-dark h3,
.prose .bg-ocean-dark h4 {
  color: #ffffff !important;
}

.prose .bg-slate-900 p,
.prose .bg-slate-950 p,
.prose .bg-ocean-dark p {
  color: #bae6fd !important;
}

.prose .bg-slate-900 strong,
.prose .bg-slate-950 strong,
.prose .bg-ocean-dark strong {
  color: #ffffff !important;
}

/* Light Card Specificity Safeguards */
.prose a.bg-slate-50,
.prose a.bg-white,
.prose a.bg-hydro-50,
.prose a.bg-hydro-100 {
  color: #0f172a !important;
  text-decoration: none !important;
  font-weight: 700 !important;
}

.prose a.bg-slate-50:hover,
.prose a.bg-white:hover,
.prose a.bg-hydro-50:hover {
  color: #0284c7 !important;
  border-color: #06b6d4 !important;
}

.prose a.bg-slate-50 *,
.prose a.bg-white *,
.prose a.bg-hydro-50 * {
  color: inherit !important;
}

/* Button Text Safeguards */
.prose a.bg-hydro-600,
.prose a.bg-cyan-500,
.prose a.bg-alert-red,
.prose a.btn-pulse-hydro,
.prose a.btn-pulse-call {
  color: #ffffff !important;
  text-decoration: none !important;
  font-weight: 700 !important;
}

/* Table High-Contrast Styling */
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
}

.prose thead th {
  background-color: #0c4a6e !important;
  color: #ffffff !important;
  font-weight: 800 !important;
  padding: 0.75rem 1rem;
  text-align: left;
  border: 1px solid #0284c7;
}

.prose tbody td {
  padding: 0.75rem 1rem;
  border: 1px solid #e0f2fe;
  color: #0f172a !important;
}

.prose tbody tr:nth-child(even) {
  background-color: #f0f9ff;
}
