/* ===== Reset básico ===== */
* {
  box-sizing: border-box;
}

:root {
  --app-width: 420px;
  --primary-dark: #0f172a;
  --secondary-slate: #1e293b;
  --text-main: #334155;
  --text-muted: #475569;
  --border-color: #e2e8f0;
  --success-green: #065f46;
}
body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f3f4f6;
  display: flex;
  justify-content: center;
  padding: 10px;
  color: #1f2937;
  /* Evitar que tape contenido */
  padding-bottom: 80px;
  overflow-x: hidden !important;
  width: 100%;
  position: relative;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  min-height: 100vh; 
}

/* ===== Contenedor principal ===== */
.container {
  width: 100%;
  max-width: var(--app-width);
}

/* ===== Acciones principales ===== */
.actions {
  display: flex;
  justify-content: center;
  gap: 14px; /* separación entre botones */
  margin-top: 10px;
}


/* ===== Card base (estilo FAQ) ===== */
.card {
  background-color: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
  margin-bottom: 10px;
  text-align: center;
  box-sizing: border-box;
}

/* ===== Tipografía ===== */
h1 {
  font-size: 26px;
  margin: 0 0 6px;
  color: #264653;
}

h2 {
  font-size: 20px;
  margin: 0 0 10px;
  color: #264653;
}

.description {
  font-size: 18px;
  color: #6b7280;
  margin-bottom: 10px;
  margin-top: 10px;
}

/* ===== Precio ===== */
.rate-box {
font-size: clamp(28px, 9vw, 42px);
  font-weight: 700;
  color: #2a9d8f;
}

/* ===== Botones ===== */
button,
.btn-link {
  background-color: #2a9d8f;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 16px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s ease;
}

button:hover,
.btn-link:hover {
  background-color: #21867a;
}

/* ===== boton invertir ===== */
.swap-icon {
  background: none;
  border: none;
  padding: 1px;
  font-size: 32px;
  cursor: pointer;
  line-height: 1;
  color: inherit;
  flex: 0 0 auto;
}

.swap-icon:hover {
 /* transform: rotate(180deg); */
  transition: transform 0.25s ease;
  background: transparent !important;
  border: none;
  box-shadow: none;
}

.swap-icon:active {
  transform: rotate(360deg);
}

.swap-icon:focus {
  outline: none;
}


/* ===== Convertidor ===== */
.converter {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 8px;
}

.converter input {
  padding: 8px;
  font-size: 17px;
  min-width: 0px;
  flex: 1 1 140px;   /* 👈 clave */
  border-radius: 6px;
  border: 1px solid #d1d5db;
}

.converter button {
  flex: 0 0 auto;
}

#conversion-result {
  margin-top: 10px;
  font-weight: bold;
  font-size: 18px;
  color: #264653;
}


/* ===== Gráfica ===== */
canvas {
  margin-top: 10px;
  width: 100% !important;
}

/* ===== FAQ ===== */
.info-box {
  margin-bottom: 20px;
}

.faq {
  background-color: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}

.info-box details + details {
  margin-top: 12px;
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq p {
  margin-top: 10px;
  font-size: 14px;
  color: #374151;
}

.arrow {
  color: #2a9d8f;
  transition: transform 0.2s ease;
}

details[open] .arrow {
  transform: rotate(180deg);
}

/* ===== Detalles ===== */
.detail-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 16px;
}

/* ===== Disclaimer ===== */
.disclaimer {
  background-color: #f3f4f6;
  border-left: 4px solid #2a9d8f;
  padding: 12px;
  border-radius: 8px;
  font-size: 12.5px;
  color: #4b5563;
}


/* ===== Footer ===== */
.site-footer {
  text-align: center;
  font-size: 14px;
  color: #6b7280;
  margin-top: 8px;
}

.site-footer a {
  color: #2a9d8f;
  text-decoration: none;
  font-weight: 600;
}


/* ===== Bottom navigation ===== */


.bottom-nav {
  position: fixed;
  bottom: 0px; /* flotante */
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 24px);
  max-width: var(--app-width);
  height: 64px;

  background-color: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);

  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1000;
}

/* Items */
.nav-item {
  text-decoration: none;
  color: #6b7280;
  font-size: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.nav-item.active {
  color: #2a9d8f;
  font-weight: 600;
}

.nav-item .icon {
  font-size: 24px;
  line-height: 1;
}



/* calculadora */
.swap-mini {
  background: transparent;
  border: 1px solid #d1d5db;
  color: #264653;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
}

.swap-mini:hover {
  background-color: #e5e7eb;
}

/* Banxico indicadores-financieros */
.banxico-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 10px;
}

.banxico-item {
  background: #ffffff;
  border-radius: 14px;
  padding: 12px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.banxico-item .name {
  font-size: 1.2rem;
  color: #21867a;
  font-weight: 700;
}

.banxico-item .value {
  font-size: 1.3rem;
  font-weight: 600;
  margin: 6px 0;
  color: #111;
}

.banxico-item .unit {
  font-size: 0.75rem;
  color: #777;
}

.banxico-item .date {
  font-size: 1.0rem;
  color: #999;
  margin-top: 4px;
}

.source {
  margin-top: 8px;
  font-size: 0.75rem;
  color: #777;
  text-align: right;
}


/* ===== PRO Upgrade (oculto) ===== */
.pro-upgrade {
  border: 2px dashed #cbd5e1;
  background: #f8fafc;
}

.pro-upgrade.hidden {
  display: none;
}

.pro-features {
  list-style: none;
  padding: 0;
  margin: 16px 0;
}

.pro-features li {
  margin: 8px 0;
  font-size: 14px;
}

.btn-pro {
  padding: 12px 20px;
  border-radius: 8px;
  border: none;
  background: #0f172a;
  color: #fff;
  font-weight: 600;
  opacity: 0.6;
  cursor: not-allowed;
}

.pro-note {
  font-size: 12px;
  color: #64748b;
  margin-top: 10px;
}

/* ===== PRO Paywall ===== */
.pro-paywall.hidden {
  display: none;
}

.pro-paywall {
  position: fixed;
  inset: 0;
  z-index: 9999;
}

.pro-paywall-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.pro-paywall-modal {
  position: relative;
  max-width: 420px;
  margin: 10vh auto;
  background: #ffffff;
  border-radius: 14px;
  padding: 20px;
  z-index: 1;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
  text-align: center;
}

.pro-close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
}

.pro-paywall .pro-features {
  list-style: none;
  padding: 0;
  margin: 16px 0;
}

.pro-paywall .pro-features li {
  margin: 8px 0;
  font-size: 14px;
}

.pro-paywall .btn-pro {
  width: 100%;
  padding: 12px;
  margin-top: 10px;
  background: #0f172a;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  opacity: 0.6;
  cursor: not-allowed;
}

.pro-paywall .pro-note {
  margin-top: 10px;
  font-size: 12px;
  color: #64748b;
}


/* ===== Info.html y Formulario ===== */
.card h1, .card h2 {
  font-weight: 600;
  margin-bottom: 10px;
}

.card p.description {
  color: #475569;
  font-size: 14px;
  line-height: 1.5;
}

.card ul {
  padding-left: 20;      /* Remueve la sangría de la lista */
  list-style: none;     /* Remueve el marcador (punto) */
  color: #334155;
  text-align: left;     /* Asegura alineación a la izquierda */
}

.card ul li {
  margin-bottom: 6px;
  font-size: 14px;
  text-align: left;     /* Alineación individual por ítem */
}
.card .actions {
  margin-top: 12px;
  text-align: center;
}

.card .actions button {
  background-color: #2a9d8f;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
/*/  width: 100%;
  max-width: 200px; */
}

.card .actions button:hover {
  background-color: #21867a;
}

/* Formulario */
#contact-form .field {
  margin-bottom: 12px;
}

#contact-form input[type="text"],
#contact-form input[type="email"],
#contact-form textarea {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  font-size: 14px;
  box-sizing: border-box;
}

#contact-form textarea {
  resize: vertical;
}

#contact-form button {
    width: 100%;
    max-width: 200px;  
    padding: 12px;
    font-weight: 600;
    border-radius: 8px;
    background-color: #2a9d8f;
    color: #fff;
    border: none;
    cursor: pointer;
    transition: background 0.2s ease;
}

#contact-form button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

#contact-form button:hover:not(:disabled) {
  background-color: #21867a;
}

#form-response {
  display: none;
  margin-top: 10px;
  font-weight: 500;
}

#form-response.success {
  color: #065f46;
}

#form-response.error {
  color: #7f1d1d;
}



/* Tarjetas Estilo Glassmorphism Suave */
.card {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 16px;
  box-shadow: 0 4px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.card h1, .card h2 {
  color: var(--primary-dark);
  align-items: center;
  /* font-size: 1.5rem;
  display: flex;
  gap: 10px; */
}

/* Listas Modernizadas (Sin marcador, alineadas a la izquierda) */
.card ul {
  padding-left: 0;
  list-style: none;
  margin: 16px 0;
}

.card ul li {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 10px;
  font-size: 14px;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 12px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.card ul li:hover {
  transform: translateX(4px);
  border-color: #cbd5e1;
}

/* Inputs del Formulario */
#contact-form input, #contact-form textarea {
  transition: all 0.3s ease;
  border: 1.5px solid var(--border-color);
}

#contact-form input:focus, #contact-form textarea:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

/* Botón de Envío */
#btn-submit {
  background: linear-gradient(to right, #2a9d8f, #2a9d8f);
  border-radius: 10px;
  padding: 14px;
  font-size: 15px;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
}

#btn-submit:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 15px rgba(15, 23, 42, 0.2);
}

/* Feedback del Formulario */
#form-response {
  border-radius: 8px;
  padding: 12px;
  font-size: 14px;
  text-align: center;
}

#form-response.success {
  background-color: #d1fae5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

#form-response.error {
  background-color: #fee2e2;
  color: #7f1d1d;
  border: 1px solid #fecaca;
}

/* CAPTCHA centrado sin romper layout */
.captcha-container {
  display: flex;
  justify-content: center;
  overflow: hidden;
}

/* Ajuste para evitar desbordamiento */
.g-recaptcha {
  transform: scale(0.65);
  transform-origin: center;
}

/* ===== Nivel 3 Privacy Enhancements ===== */

.small-muted {
  font-size: 12px;
  color: #64748b;
}

/* Animaciones suaves */
.fade-in {
  opacity: 0;
  transform: translateY(10px);
  animation: fadeInUp 0.6s ease forwards;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.privacy-header {
  text-align: center;
  background: linear-gradient(135deg, #ffffff 0%, #eef2f7 100%);
}

.legal-disclaimer {
  border-left: 4px solid #2a9d8f;
  background: #f8fafc;
}

/* chart head container  */

.chart-header {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-family: system-ui, -apple-system, sans-serif;
}

.pair {
  font-size: 14px;
  font-weight: 600;
  color: #666;
}

.price-value {
  font-size: 22px;
  font-weight: 700;
}

.price-change {
  font-size: 14px;
  font-weight: 600;
}

/* live dot cargando info */

.loading-status {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  color: #6b7280;
  margin-top: 12px;
}

.live-dot {
  width: 10px;
  height: 10px;
  background-color: #22c55e;
  border-radius: 50%;
  animation: pulse 1.4s infinite ease-in-out;
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 0.7; }
  50% { transform: scale(1.6); opacity: 1; }
  100% { transform: scale(1); opacity: 0.7; }
}