/* ── CALCULAONLINE OVERRIDES ── */

/* Fuentes */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

/* Suavizado de fuentes */
html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Alpine.js x-cloak */
[x-cloak] { display: none !important; }

/* Transición suave entre temas */
html, body, div, section, article, header, footer, nav, aside,
h1, h2, h3, h4, h5, h6, p, a, span, label, input, button, select {
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

/* Anulamos transition en elementos interactivos para que se sientan ágiles */
input, button, select, textarea, a {
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease,
              transform 0.15s ease, box-shadow 0.15s ease;
}

/* Scrollbar personalizada */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #94a3b8;
  border-radius: 4px;
}
.dark ::-webkit-scrollbar-thumb {
  background: #475569;
}

/* Inputs numéricos: ocultar flechas nativas */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type=number] {
  -moz-appearance: textfield;
}

/* Focus visible accesible */
:focus-visible {
  outline: 2px solid #4f46e5;
  outline-offset: 2px;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: #4f46e5;
  color: white;
  padding: 8px 16px;
  z-index: 9999;
  transition: top 0.2s;
}
.skip-link:focus {
  top: 0;
}

/* Animaciones */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes pulse-soft {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}
.animate-fade-in {
  animation: fadeIn 0.4s ease both;
}
.animate-pulse-soft {
  animation: pulse-soft 0.3s ease;
}

/* Stagger para tarjetas */
.stagger-1 { animation-delay: 50ms; }
.stagger-2 { animation-delay: 100ms; }
.stagger-3 { animation-delay: 150ms; }
.stagger-4 { animation-delay: 200ms; }

/* Glassmorphism header */
.glass-header {
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.dark .glass-header {
  background: rgba(15,23,42,0.85);
}

/* Tooltip toast */
.toast-enter {
  animation: fadeIn 0.2s ease both;
}

/* Chart containers */
.chart-container {
  position: relative;
  height: 220px;
  width: 100%;
}

/* FAQ details styling */
details {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
}
.dark details {
  border-color: #334155;
}
summary {
  cursor: pointer;
  padding: 16px 20px;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
summary::-webkit-details-marker {
  display: none;
}
summary::after {
  content: '+';
  font-size: 20px;
  color: #6b7280;
  transition: transform 0.2s;
}
details[open] summary::after {
  content: '−';
}
details > div {
  padding: 0 20px 16px;
  color: #4b5563;
  line-height: 1.7;
}
.dark details > div {
  color: #94a3b8;
}
