*, *::before, *::after { box-sizing: border-box; }

html {
  font-size: 100%;                 /* respeta la preferencia de tamaño del usuario */
  -webkit-text-size-adjust: 100%;
  background: var(--color-page);
}

body {
  margin: 0;
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  color: var(--color-text);
  line-height: 1.5;
}

/* ---------- Contenedor de consulta ----------
   Los puntos de quiebre (@container) miden el ancho de ESTE bloque, no el de la ventana:
   el formulario se acomoda igual dentro de un iframe angosto, una columna del sitio del cliente o a pantalla completa. */
.cotizador {
  container-type: inline-size;
  container-name: cotizador;
}

/* ---------- Header (solo en modo independiente; embebido se oculta) ---------- */
.topbar {
  background: var(--color-primary);
  box-shadow: var(--shadow-header);
  position: relative;
  z-index: 2;
}
.topbar__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.875rem 1rem;
  display: flex;
  justify-content: center;
}
.brand { display: flex; align-items: center; gap: 0.625rem; }
.brand img { display: block; width: auto; max-width: 100%; }
.brand__icon { height: 2.1875rem; }
.brand__text { height: 2.25rem; }

/* ---------- Contenido ---------- */
.container {
  max-width: none;
  margin: 0 50px;
  padding: 1rem 0 2rem;
}

.card {
  background: transparent;
  border: 0;
  border-radius: var(--radius);
  box-shadow: none;
}

/* ---------- Modo embebido ---------- */
.is-embedded,
.is-embedded body { background: transparent; }
.is-embedded .topbar { display: none; }
.is-embedded .container {
  max-width: none;
  margin: 0 50px;
  padding: 0.5rem 0 0.75rem;
}

@container cotizador (max-width: 48rem) {
  .container,
  .is-embedded .container {
    margin: 0 1rem;
  }
}

/* ---------- Carga / error inicial ---------- */
.loading, .load-error {
  padding: 3rem 1rem;
  text-align: center;
  color: var(--color-muted);
}
.spinner {
  display: inline-block;
  width: 1.125rem;
  height: 1.125rem;
  border: 0.125rem solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  vertical-align: -0.25rem;
  margin-right: 0.5rem;
}
@keyframes spin { to { transform: rotate(360deg); } }

.hidden { display: none !important; }

/* Oculto para personas, presente en el DOM (campo trampa anti-bots) */
.hp {
  position: absolute;
  inline-size: 0.0625rem;
  block-size: 0.0625rem;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  .spinner { animation-duration: 2.4s; }
  * { transition: none !important; }
}
