/* ===========================
   cotizador.css — Estimado orientativo (solo tokens; claro y oscuro)
   =========================== */

.cotz-vh {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.cotz-hero { padding-bottom: 2.5rem; }
.cotz-hero .hero-sub { margin-inline: auto; text-align: center; max-width: 620px; }
.cotz-section { padding-top: 1rem; }
.cotz-container { max-width: 860px; }

.cotz {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 1.5rem;
}

/* --- Aviso permanente --- */
.cotz-notice {
  display: flex; gap: .75rem; align-items: flex-start;
  margin: 0 0 1.5rem; padding: .85rem 1rem;
  background: var(--blue-tint); border: 1px solid var(--blue-line);
  border-radius: var(--radius-sm);
  color: var(--text); font-size: .95rem; line-height: 1.5;
}
.cotz-notice svg { flex: none; margin-top: 2px; color: var(--accent-ink); }

/* --- Progreso --- */
.cotz-progress { margin-bottom: 1.75rem; }
.cotz-progress__count { margin: 0 0 .75rem; font-size: .9rem; color: var(--text-2); }
.cotz-progress__list {
  list-style: none; margin: 0 0 .75rem; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem;
}
.cotz-progress__list li {
  display: flex; align-items: center; gap: .5rem;
  font-size: .9rem; color: var(--text-3);
}
.cotz-progress__dot {
  flex: none; width: 28px; height: 28px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--blue-line); background: var(--surface);
  font-size: .85rem; color: var(--text-2);
}
.cotz-progress__list li.is-current { color: var(--text); }
.cotz-progress__list li.is-current .cotz-progress__dot,
.cotz-progress__list li.is-done .cotz-progress__dot {
  background: var(--navy-fill); border-color: var(--navy-fill); color: var(--on-fill);
}
.cotz-progress__bar { height: 6px; border-radius: 3px; background: var(--bg-3); overflow: hidden; }
.cotz-progress__bar span {
  display: block; height: 100%; width: 33.33%;
  background: var(--navy-fill); border-radius: 3px;
  transition: width .3s var(--ease);
}

/* --- Pasos --- */
.cotz-step { border: 0; margin: 0; padding: 0; min-width: 0; }
.cotz-step[hidden] { display: none; }
.cotz-step legend {
  padding: 0; margin: 0 0 1rem;
  font-size: clamp(1.25rem, 2.6vw, 1.6rem); color: var(--text); line-height: 1.3;
}
.cotz-step legend:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 4px; }
.cotz-hint { margin: 0 0 1rem; font-size: .95rem; color: var(--text-2); }
.cotz-error {
  margin: 1rem 0 0; padding: .6rem .85rem;
  background: var(--danger-tint); border: 1px solid var(--danger-line);
  border-radius: var(--radius-sm); color: var(--danger); font-size: .95rem;
}
.cotz-error[hidden] { display: none; }

.cotz-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; }
.cotz-grid--3 { grid-template-columns: repeat(3, 1fr); }
.cotz-group { margin-bottom: 1.5rem; }
.cotz-group__title { margin: 0 0 .6rem; font-size: 1rem; color: var(--text); }

.cotz-opt, .cotz-func--check {
  position: relative; display: flex; gap: .75rem; align-items: flex-start;
  padding: 1rem; min-height: 44px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}
.cotz-opt:hover, .cotz-func--check:hover { border-color: var(--navy); }
.cotz-opt:has(input:checked), .cotz-func--check:has(input:checked) {
  border-color: var(--navy-fill); background: var(--blue-tint);
  box-shadow: inset 0 0 0 1px var(--navy-fill);
}
.cotz-opt:has(input:focus-visible), .cotz-func--check:has(input:focus-visible) {
  outline: 3px solid var(--accent); outline-offset: 2px;
}
.cotz-opt input, .cotz-func--check input {
  flex: none; width: 20px; height: 20px; margin: 2px 0 0;
  accent-color: var(--navy-fill); cursor: pointer;
}
.cotz-opt__body, .cotz-func__text { display: flex; flex-direction: column; gap: .25rem; min-width: 0; }
.cotz-opt__title, .cotz-func__title { color: var(--text); font-size: 1.02rem; line-height: 1.35; }
.cotz-opt__help, .cotz-func__help { color: var(--text-2); font-size: .9rem; line-height: 1.5; }

.cotz-list { display: grid; gap: .75rem; margin-bottom: 1rem; }
.cotz-func {
  display: flex; gap: 1rem; align-items: center; justify-content: space-between;
  padding: 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
}
.cotz-func--check { align-items: flex-start; justify-content: flex-start; flex-wrap: nowrap; }
.cotz-func--check .cotz-func__text { flex: 1; }

.cotz-stepper { flex: none; display: inline-flex; align-items: center; gap: .25rem; }
.cotz-stepper__btn {
  width: 44px; height: 44px; border-radius: var(--radius-sm);
  border: 1px solid var(--blue-line); background: var(--surface); color: var(--text);
  font: inherit; font-size: 1.3rem; line-height: 1; cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}
.cotz-stepper__btn:hover { border-color: var(--navy); background: var(--blue-tint); }
.cotz-stepper input {
  width: 3.25rem; height: 44px; text-align: center;
  border: 1px solid var(--blue-line); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); font: inherit; font-size: 1.05rem;
  -moz-appearance: textfield; appearance: textfield;
}
.cotz-stepper input::-webkit-outer-spin-button,
.cotz-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.cotz-stepper__btn:focus-visible, .cotz-stepper input:focus-visible,
.cotz-btn-ghost:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* --- Navegación --- */
.cotz-nav { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1.75rem; }
.cotz-nav .btn { min-height: 48px; }
.cotz-nav [data-next] { margin-left: auto; }
.cotz-btn-ghost {
  background: transparent; color: var(--text); border-color: var(--blue-line); min-height: 44px;
}
.cotz-btn-ghost:hover { border-color: var(--navy); background: var(--blue-tint); }
.cotz-nav [hidden], .cotz-result [hidden] { display: none !important; }

/* --- Resultado --- */
.cotz-result__title {
  scroll-margin-top: calc(var(--nav-h, 72px) + 1rem);
  margin: 0 0 .75rem; font-size: clamp(1.25rem, 2.6vw, 1.6rem); color: var(--text);
}
.cotz-result__title:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 4px; }
.cotz-range {
  margin: 0; color: var(--text); line-height: 1.25;
  font-size: clamp(1.5rem, 4vw, 2.4rem);
}
.cotz-range strong { font-weight: 400; color: var(--accent-ink); white-space: nowrap; }
.cotz-range__w { font-size: .6em; color: var(--text-2); }
.cotz-range--text { font-size: clamp(1.25rem, 3vw, 1.7rem); }
.cotz-range__note { margin: .6rem 0 0; font-size: .95rem; color: var(--text-2); }

.cotz-summary {
  margin: 1.5rem 0; padding: 1rem 1.25rem;
  background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius);
}
.cotz-summary__title { margin: 0 0 .5rem; color: var(--text); font-size: 1rem; }
.cotz-summary ul { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; }
.cotz-summary li {
  padding: .3rem .75rem; font-size: .9rem; color: var(--text);
  background: var(--surface); border: 1px solid var(--blue-line); border-radius: 20px;
}

.cotz-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1.75rem; }
.cotz-card {
  padding: 1.25rem; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
}
.cotz-card h3 { margin: 0 0 .75rem; font-size: 1.05rem; color: var(--text); }
.cotz-card ul { margin: 0; padding-left: 1.1rem; display: grid; gap: .5rem; }
.cotz-card li { font-size: .95rem; line-height: 1.55; color: var(--text-2); }
.cotz-card strong { font-weight: 400; color: var(--text); }

.cotz-cta { display: flex; flex-wrap: wrap; gap: .75rem 1rem; }
.cotz-cta .btn-lg { flex: 1 1 18rem; justify-content: center; white-space: normal; text-align: center; }
.cotz-cta--minor { margin-top: .75rem; }
.cotz-status { min-height: 1.5rem; margin: .75rem 0 0; font-size: .92rem; color: var(--text-2); }
.cotz-urgency {
  margin: 1rem 0 0; padding-top: 1rem; border-top: 1px solid var(--border);
  font-size: 1rem; color: var(--text);
}

/* --- Cómo sigue --- */
.cotz-next {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; counter-reset: paso;
}
.cotz-next li {
  counter-increment: paso; padding: 1.25rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--text-2); font-size: .95rem; line-height: 1.55;
}
.cotz-next li::before {
  content: counter(paso); display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; margin-bottom: .75rem; border-radius: 50%;
  background: var(--navy-fill); color: var(--on-fill); font-size: .9rem;
}
.cotz-next strong { display: block; margin-bottom: .25rem; font-weight: 400; color: var(--text); font-size: 1.02rem; }

.cotz-noscript { margin: 1rem 0 0; color: var(--text-2); }

/* Sin JavaScript no se muestra el formulario, solo el enlace a la sesión */
html:not(.cotz-js) .cotz-form,
html:not(.cotz-js) .cotz-progress { display: none; }

@media (max-width: 720px) {
  .cotz { padding: 1rem; }
  .cotz-grid, .cotz-grid--3, .cotz-cols, .cotz-next { grid-template-columns: 1fr; }
  .cotz-progress__name { font-size: .8rem; }
  .cotz-progress__list li { flex-direction: column; align-items: flex-start; gap: .35rem; }
  .cotz-func:not(.cotz-func--check) { flex-wrap: wrap; }
  .cotz-nav .btn { flex: 1; }
  .cotz-cta .btn-lg { flex-basis: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .cotz-progress__bar span, .cotz-opt, .cotz-stepper__btn { transition: none; }
}
