/*
 * ASTAXI - Cotizador de seguro para taxi
 * Extiende astaxi.css: mismas variables (.axi), radios, botones y tipografia.
 */

.axi-cq-sr {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Columna de requisitos ---------- */

.axi-cq-reqs {
  display: grid;
  gap: 12px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.axi-cq-reqs li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.axi-cq-reqs__icon {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--axi-red);
  color: var(--axi-white);
}

.axi-cq-reqs__icon svg { width: 22px; height: 22px; }

.axi-cq-reqs strong {
  display: block;
  color: var(--axi-white);
  font-size: 16px;
  font-weight: 900;
  line-height: 1.3;
}

.axi-cq-reqs__sub {
  display: block;
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  line-height: 1.4;
}

/* ---------- Stepper ---------- */

.axi-cq__stepper {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}

.axi-cq__stepper-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 0;
  text-align: center;
}

.axi-cq__stepper-item + .axi-cq__stepper-item::before {
  content: "";
  position: absolute;
  top: 18px;
  left: calc(-50% + 24px);
  right: calc(50% + 24px);
  height: 2px;
  border-radius: 2px;
  background: var(--axi-border);
}

.axi-cq__stepper-item.is-done + .axi-cq__stepper-item::before,
.axi-cq__stepper-item.is-done + .axi-cq__stepper-item.is-current::before { background: var(--axi-black); }

.axi-cq__dot {
  position: relative;
  z-index: 1;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 2px solid #d9d9d9;
  background: var(--axi-white);
  color: var(--axi-muted);
  font-size: 15px;
  font-weight: 900;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.axi-cq__stepper-label {
  max-width: 100%;
  overflow: hidden;
  color: var(--axi-muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.axi-cq__stepper-item.is-current .axi-cq__dot {
  background: var(--axi-red);
  border-color: var(--axi-red);
  color: var(--axi-white);
  box-shadow: 0 0 0 5px rgba(214, 0, 0, 0.12);
}

.axi-cq__stepper-item.is-current .axi-cq__stepper-label { color: var(--axi-black); }

.axi-cq__stepper-item.is-done .axi-cq__dot {
  background: var(--axi-black);
  border-color: var(--axi-black);
  color: var(--axi-white);
}

.axi-cq__progress {
  margin: 14px 0 22px;
  color: var(--axi-muted);
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}

/* ---------- Pasos y campos ---------- */

.axi-cq__step {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.axi-cq__legend {
  float: left;
  width: 100%;
  margin: 0 0 18px;
  padding: 0;
  color: var(--axi-black);
  font-size: 22px;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.axi-cq__legend + * { clear: both; }
.axi-cq__legend:focus { outline: none; }

.axi-cq .axi__form-grid { align-items: start; }

.axi-cq .axi__field input:not([type="checkbox"]),
.axi-cq .axi__field select {
  min-height: 50px;
  font-size: 16px; /* 16px evita el zoom automatico de iOS */
}

.axi-cq .axi__field select {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 42px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 15px center;
  background-size: 16px;
}

.axi-cq .axi__field input[type="date"] { -webkit-appearance: none; appearance: none; display: block; }
.axi-cq .axi__field input::placeholder { color: #9a9a9a; }

.axi-cq .axi__field [aria-invalid="true"] {
  border-color: #c40000;
  background: #fff7f7;
}

.axi-cq__opt { color: var(--axi-muted); font-weight: 700; }

.axi-cq__hint {
  margin: 0;
  color: var(--axi-muted);
  font-size: 13px;
  line-height: 1.45;
}

.axi-cq__error {
  display: flex;
  gap: 6px;
  margin: 0;
  color: #b00000;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}

.axi-cq__error::before { content: "\26A0\FE0E"; flex: 0 0 auto; }
.axi-cq__error[hidden] { display: none; }

.axi-cq__note {
  margin: 18px 0 0;
  padding: 14px 16px;
  border-radius: 14px;
  background: #fff8e6;
  border: 1px solid #edd08a;
  color: #5c4400;
  font-size: 14px;
  line-height: 1.5;
}

.axi-cq__alert {
  margin: 0 0 18px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(214, 0, 0, 0.08);
  border: 1px solid rgba(214, 0, 0, 0.35);
  color: #a00000;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.45;
}

.axi-cq__alert:focus { outline: none; }

/* ---------- Privacidad ---------- */

.axi-cq__info {
  margin: 22px 0 16px;
  padding: 16px 18px;
  border-radius: 16px;
  background: var(--axi-soft);
  border: 1px solid var(--axi-border);
  color: var(--axi-muted);
  font-size: 13px;
  line-height: 1.5;
}

.axi-cq__info-title { margin: 0 0 8px; color: var(--axi-black); font-weight: 900; }

.axi-cq__info dl {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 4px 12px;
  margin: 0;
}

.axi-cq__info dt { color: var(--axi-black); font-weight: 800; }
.axi-cq__info dd { margin: 0; }
.axi-cq__info a { color: var(--axi-red); }

.axi-cq .axi__privacy input { width: 22px; height: 22px; margin-top: 0; }
.axi-cq .axi__privacy span { color: var(--axi-text); font-size: 14px; font-weight: 600; line-height: 1.5; }

/* ---------- Navegacion ---------- */

.axi-cq__nav {
  display: flex;
  gap: 12px;
  margin-top: 26px;
}

.axi-cq__nav .axi__submit { flex: 1 1 auto; }
.axi-cq__nav [hidden] { display: none; }

.axi-cq__back {
  flex: 0 0 auto;
  min-height: 54px;
  padding: 0 28px;
  border-radius: 999px;
  border: 1px solid #d6d6d6;
  background: var(--axi-white);
  color: var(--axi-black);
  font-family: inherit;
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.axi-cq__back:hover { background: var(--axi-black); border-color: var(--axi-black); color: var(--axi-white); }

.axi-cq .axi__submit[aria-disabled="true"] {
  opacity: 0.72;
  cursor: progress;
  transform: none;
}

.axi-cq button:focus-visible,
.axi-cq a:focus-visible,
.axi-cq input[type="checkbox"]:focus-visible,
.axi-cq-page button:focus-visible,
.axi-cq-page a:focus-visible,
.axi-cq-page input:focus-visible,
.axi-cq__legend:focus-visible {
  outline: 3px solid var(--axi-red);
  outline-offset: 3px;
}

/* Sin JS: todo el formulario visible, sin stepper */
.axi-cq:not(.is-js) .axi-cq__stepper,
.axi-cq:not(.is-js) .axi-cq__progress { display: none; }
.axi-cq:not(.is-js) .axi-cq__step + .axi-cq__step { margin-top: 34px; }

/* ---------- Pagina de confirmacion ---------- */

.axi-cq-page .axi-cq-hero:only-child { min-height: calc(100vh - 320px); display: flex; align-items: center; }
.axi-cq-page .axi-cq-hero:only-child > .axi__container { width: min(1180px, calc(100% - 40px)); }

.axi-cq-hero .axi__h1 {
  font-size: clamp(36px, 5.2vw, 60px);
  line-height: 1.02;
}

.axi-cq-check {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  border-radius: 50%;
  background: var(--axi-red);
  color: var(--axi-white);
  box-shadow: 0 14px 36px rgba(214, 0, 0, 0.35);
}

.axi-cq-check svg { width: 34px; height: 34px; stroke-width: 2.6; }

.axi-cq-ref {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 26px 0 0;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.84);
  font-size: 14px;
  font-weight: 700;
}

.axi-cq-ref strong { color: var(--axi-white); letter-spacing: 0.02em; }

.axi-cq-int { max-width: 780px; margin: 0 auto; }

.axi-cq-int__card {
  padding: 40px;
  border-radius: 28px;
  background: var(--axi-white);
  border: 1px solid var(--axi-border);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.06);
}

.axi-cq-int__card h2 {
  margin: 0 0 12px;
  color: var(--axi-black);
  font-size: clamp(28px, 3.4vw, 40px);
  font-weight: 900;
  line-height: 1.06;
  letter-spacing: -0.04em;
}

.axi-cq-int__card > p { margin: 0; color: var(--axi-muted); font-size: 16px; line-height: 1.65; }

.axi-cq-int__options {
  display: grid;
  gap: 14px;
  margin: 26px 0 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.axi-cq-opt {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px;
  border-radius: 20px;
  border: 1.5px solid var(--axi-border);
  background: var(--axi-white);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.axi-cq-opt:hover { border-color: rgba(214, 0, 0, 0.45); }

.axi-cq-opt:has(input:checked) {
  border-color: var(--axi-red);
  background: rgba(214, 0, 0, 0.04);
  box-shadow: 0 0 0 3px rgba(214, 0, 0, 0.1);
}

.axi-cq-opt input {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  margin: 1px 0 0;
  accent-color: var(--axi-red);
  cursor: pointer;
}

.axi-cq-opt strong {
  display: block;
  margin-bottom: 4px;
  color: var(--axi-black);
  font-size: 17px;
  font-weight: 900;
  line-height: 1.3;
}

.axi-cq-opt strong + span {
  display: block;
  color: var(--axi-muted);
  font-size: 14px;
  line-height: 1.5;
}

.axi-cq-int .axi-cq__error { margin-top: 12px; }

.axi-cq-int__note {
  margin: 18px 0 0 !important;
  color: var(--axi-muted);
  font-size: 13px !important;
  line-height: 1.5 !important;
}

.axi-cq-int__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
  margin-top: 26px;
}

.axi-cq-int__actions .axi__submit { flex: 1 1 280px; width: auto; padding: 0 30px; }

.axi-cq-int .axi__submit[aria-disabled="true"] { opacity: 0.72; cursor: progress; transform: none; }

.axi-cq-skip {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--axi-text);
  font-size: 15px;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.axi-cq-skip:hover { color: var(--axi-red); }

.axi-cq-done { text-align: center; }
.axi-cq-done .axi-cq-check { margin: 0 auto 22px; }

.axi-cq-done__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 22px 0 26px;
  padding: 0;
  list-style: none;
}

.axi-cq-done__list li {
  padding: 9px 14px;
  border-radius: 999px;
  background: var(--axi-soft);
  border: 1px solid var(--axi-border);
  color: var(--axi-black);
  font-size: 14px;
  font-weight: 800;
}

/* ---------- Responsive ---------- */

@media (max-width: 767px) {
  .axi-cq-box.axi__form-box { padding: 16px; gap: 20px; }
  .axi-cq-box .axi__form-content { padding: 10px 6px 0; }
  .axi-cq.axi__form { padding: 22px 18px; }

  .axi-cq__dot { width: 34px; height: 34px; font-size: 14px; }
  .axi-cq__stepper-item + .axi-cq__stepper-item::before { top: 16px; left: calc(-50% + 21px); right: calc(50% + 21px); }
  .axi-cq__stepper-label { font-size: 11.5px; }

  .axi-cq__legend { font-size: 20px; }

  .axi-cq__nav { flex-direction: column-reverse; }
  .axi-cq__back { width: 100%; }

  .axi-cq__info dl { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .axi-cq__info dd { margin-bottom: 8px; }

  .axi-cq-int__card { padding: 26px 20px; border-radius: 22px; }
  .axi-cq-opt { padding: 16px; gap: 14px; }
  .axi-cq-int__actions { flex-direction: column; align-items: stretch; text-align: center; }
  .axi-cq-int__actions .axi__submit { flex: none; width: 100%; }
  .axi-cq-skip { justify-content: center; }

  .axi-cq-check { width: 56px; height: 56px; }
  .axi-cq-ref { border-radius: 16px; }
}

@media (max-width: 359px) {
  .axi-cq__stepper-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
}

@media (prefers-reduced-motion: reduce) {
  .axi-cq *, .axi-cq-page * { transition: none !important; }
}
