/* =========================================================
   DISEÑA TU VIAJE
   Wizard multi-paso
   Responsive: Desktop / Tablet / Mobile
   Color base: var(--color-primary)
   ========================================================= */

.disena-viaje-page {
  --wizard-bg: #f8fafc;
  --wizard-white: #ffffff;
  --wizard-text: #0f172a;
  --wizard-text-soft: #475569;
  --wizard-muted: #64748b;
  --wizard-border: #e2e8f0;
  --wizard-border-soft: #eef2f6;

  /* Color principal del tema */
  --wizard-primary: var(--color-primary);

  /* Variaciones derivadas del primary */
  --wizard-primary-soft: color-mix(in srgb, var(--wizard-primary) 8%, white);
  --wizard-primary-light: color-mix(in srgb, var(--wizard-primary) 15%, white);
  --wizard-primary-border: color-mix(in srgb, var(--wizard-primary) 25%, white);
  --wizard-primary-dark: color-mix(in srgb, var(--wizard-primary) 80%, black);
  --wizard-primary-shadow: color-mix(
    in srgb,
    var(--wizard-primary) 16%,
    transparent
  );

  background: var(--wizard-bg);
  font-family: inherit;
  color: var(--wizard-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  box-sizing: border-box;
}

.disena-viaje-page *,
.disena-viaje-page *::before,
.disena-viaje-page *::after {
  box-sizing: border-box;
}

.disena-viaje-page img {
  display: block;
  max-width: 100%;
  height: auto;
}

.disena-viaje-page h2,
.disena-viaje-page h3,
.disena-viaje-page h4 {
  margin: 0;
  font-family: inherit;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.disena-viaje-page button,
.disena-viaje-page input,
.disena-viaje-page select,
.disena-viaje-page textarea {
  font: inherit;
}

/* =========================================================
   01. CONTENEDOR
   ========================================================= */

.disena-viaje-page .container {
  width: 100%;
  padding-inline: clamp(20px, 3vw, 48px);
  margin-inline: auto;
  box-sizing: border-box;
}

/* =========================================================
   02. ICONOS
   ========================================================= */

.disena-viaje-page .icon-box {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border-radius: 11px;
  border: 1px solid var(--wizard-primary-border);

  background: var(--wizard-primary-soft);
  color: var(--wizard-primary);

  font-size: 16px;
}

/* =========================================================
   03. LAYOUT PRINCIPAL
   ========================================================= */

.wizard-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);

  width: 100%;
  min-height: 580px;

  background: var(--wizard-white);
  border: 1px solid var(--wizard-border);
  border-radius: 20px;

  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.04);
  overflow: hidden;
}

/* =========================================================
   04. SIDEBAR
   ========================================================= */

.wizard-sidebar {
  display: flex;
  flex-direction: column;

  min-width: 0;
  padding: 28px 22px;

  background: var(--wizard-bg);
  border-right: 1px solid var(--wizard-border);
}

.wizard-sidebar-title {
  display: flex;
  align-items: center;
  gap: 11px;

  margin: 0 0 20px;
  padding-bottom: 16px;

  border-bottom: 1px solid var(--wizard-border);
  color: var(--wizard-text);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.wizard-nav-list {
  display: flex;
  flex-direction: column;
  gap: 4px;

  flex: 1;
  margin: 0;
  padding: 0;

  list-style: none;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;

  min-width: 0;
  padding: 9px 10px;

  border: 1px solid transparent;
  border-radius: 11px;

  color: #94a3b8;
  font-size: 14px;
  font-weight: 600;

  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

.nav-item.active {
  color: var(--wizard-text);
  background: var(--wizard-white);
  border-color: var(--wizard-border);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}

.nav-item.completed {
  color: var(--wizard-text-soft);
}

/* =========================================================
   05. ICONOS DE NAVEGACIÓN
   ========================================================= */

.nav-icon {
  position: relative;

  width: 34px;
  height: 34px;
  flex: 0 0 34px;

  display: flex;
  align-items: center;
  justify-content: center;

  border: 1px solid var(--wizard-border);
  border-radius: 50%;

  background: #eef2f6;
  color: #94a3b8;
  font-size: 13px;

  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease;
}

.nav-icon-check {
  display: none;
}

.nav-item.active .nav-icon {
  background: var(--wizard-primary);
  border-color: var(--wizard-primary);
  color: #fff;
  box-shadow: 0 0 0 4px var(--wizard-primary-shadow);
}

.nav-item.completed .nav-icon {
  background: var(--wizard-primary);
  border-color: var(--wizard-primary);
  color: #fff;
}

.nav-item.completed .nav-icon-default {
  display: none;
}

.nav-item.completed .nav-icon-check {
  display: inline-block;
}

/* =========================================================
   06. PROGRESO MÓVIL
   ========================================================= */

.wizard-progress-mobile {
  display: none;
}

.wizard-progress-mobile__bar {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--wizard-border);
}

.wizard-progress-mobile__bar span {
  width: 12.5%;
  height: 100%;
  border-radius: inherit;
  background: var(--wizard-primary);
  transition: width 0.3s ease;
}

.wizard-progress-mobile__label {
  margin-top: 7px;
  color: var(--wizard-muted);
  font-size: 12px;
  font-weight: 700;
}

/* =========================================================
   07. CONTENIDO DEL WIZARD
   ========================================================= */

.wizard-content-area {
  display: flex;
  flex-direction: column;

  min-width: 0;
  padding: 38px 42px;
}

.wizard-form {
  flex: 1;
  min-width: 0;
}

.wizard-step {
  display: none;
}

.wizard-step.active {
  display: block;
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 0.35s ease,
    transform 0.35s ease;
}

.wizard-step.active.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.wizard-step-title {
  display: flex;
  align-items: center;
  gap: 13px;

  min-width: 0;
  margin: 0 0 8px;

  font-size: clamp(20px, 2vw, 24px);
  font-weight: 800;
  line-height: 1.25;
}

.wizard-step-subtitle {
  max-width: 680px;

  margin: 0 0 24px;
  padding: 0;

  color: var(--wizard-muted);
  font-size: 14.5px;
  line-height: 1.6;
}

/* =========================================================
   08. GRIDS DE OPCIONES
   ========================================================= */

.grid-3,
.grid-4 {
  display: grid;
  width: 100%;
  min-width: 0;
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.wizard-card-radio,
.wizard-btn-radio {
  display: block;
  min-width: 0;
}

.wizard-card-radio input[type="checkbox"],
.wizard-btn-radio input[type="checkbox"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* =========================================================
   09. TARJETAS DE DESTINO
   ========================================================= */

.wizard-card {
  position: relative;
  display: flex;
  flex-direction: column;

  width: 100%;
  height: 100%;
  min-width: 0;

  overflow: hidden;
  border: 1px solid var(--wizard-border);
  border-radius: 14px;
  background: var(--wizard-white);
  cursor: pointer;

  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.wizard-card:hover {
  transform: translateY(-2px);
  border-color: var(--wizard-primary-border);
  box-shadow: 0 10px 24px var(--wizard-primary-shadow);
}

.wizard-card__media {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.wizard-card img {
  width: 100%;
  height: 135px;
  object-fit: cover;
}

.wizard-card__check {
  position: absolute;
  top: 9px;
  right: 9px;

  width: 25px;
  height: 25px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 50%;
  background: var(--wizard-white);
  color: var(--wizard-primary);
  font-size: 11px;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.12);

  opacity: 0;
  transform: scale(0.8);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.wizard-card__label {
  padding: 12px 10px;
  color: #334155;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  transition: color 0.2s ease;
}

.wizard-card-radio input:checked + .wizard-card {
  border-color: var(--wizard-primary);
  box-shadow: 0 0 0 3px var(--wizard-primary-shadow);
}

.wizard-card-radio input:checked + .wizard-card .wizard-card__check {
  opacity: 1;
  transform: scale(1);
  background: var(--wizard-primary);
  color: #fff;
}

.wizard-card-radio input:checked + .wizard-card .wizard-card__label {
  color: var(--wizard-primary-dark);
}

/* =========================================================
   10. TARJETAS DE OPCIONES (BOTONES)
   ========================================================= */

.wizard-btn {
  display: flex;
  align-items: flex-start;
  gap: 11px;

  width: 100%;
  height: 100%;
  min-width: 0;

  padding: 15px;

  border: 1px solid var(--wizard-border);
  border-radius: 12px;
  background: var(--wizard-bg);

  color: inherit;
  text-align: left;
  cursor: pointer;

  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.wizard-btn:hover {
  background: var(--wizard-primary-soft);
  border-color: var(--wizard-primary-border);
}

.wizard-btn__dot {
  position: relative;
  width: 19px;
  height: 19px;
  flex: 0 0 19px;

  margin-top: 1px;
  border: 2px solid #cbd5e1;
  border-radius: 50%;
  background: #fff;
}

.wizard-btn__dot::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: #fff;
  opacity: 0;
}

.wizard-btn__text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.wizard-btn__text strong {
  color: #334155;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
}

.wizard-btn__text small {
  color: var(--wizard-muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.45;
}

.wizard-btn-radio input:checked + .wizard-btn {
  background: var(--wizard-primary-soft);
  border-color: var(--wizard-primary);
}

.wizard-btn-radio input:checked + .wizard-btn .wizard-btn__dot {
  border-color: var(--wizard-primary);
  background: var(--wizard-primary);
}

.wizard-btn-radio input:checked + .wizard-btn .wizard-btn__dot::after {
  opacity: 1;
}

.wizard-btn-radio input:checked + .wizard-btn .wizard-btn__text strong {
  color: var(--wizard-primary-dark);
}

/* =========================================================
   11. CONTADORES (PASO 4)
   ========================================================= */

.wizard-counters {
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
}

.wizard-counter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;

  padding: 14px 2px;
  border-bottom: 1px solid var(--wizard-border);
}

.wizard-counter:last-child {
  border-bottom: 0;
}

.wizard-counter strong {
  display: block;
  color: var(--wizard-text);
  font-size: 15px;
}

.wizard-counter small {
  color: var(--wizard-muted);
  font-size: 12.5px;
}

.counter-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.counter-controls button {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 0;
  border: 1px solid var(--wizard-border);
  border-radius: 50%;

  background: var(--wizard-white);
  color: var(--wizard-text-soft);
  cursor: pointer;

  transition:
    color 0.2s ease,
    border-color 0.2s ease,
    background-color 0.2s ease;
}

.counter-controls button:hover {
  border-color: var(--wizard-primary);
  color: var(--wizard-primary);
  background: var(--wizard-primary-soft);
}

.counter-controls input {
  width: 30px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--wizard-text);
  font-size: 16px;
  font-weight: 800;
  text-align: center;
  pointer-events: none;
}

/* =========================================================
   12. FORMULARIOS (PASO 6 Y 7)
   ========================================================= */

.wizard-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  width: 100%;
}

.wizard-form-group {
  width: 100%;
  max-width: 420px;
  margin-bottom: 17px;
}

.wizard-form-grid .wizard-form-group,
.wizard-form-group--full {
  max-width: none;
}

.wizard-form-group label {
  display: block;
  margin-bottom: 6px;
  color: var(--wizard-text);
  font-size: 13px;
  font-weight: 700;
}

.form-control {
  width: 100%;
  min-width: 0;
  padding: 11px 13px;

  border: 1px solid var(--wizard-border);
  border-radius: 9px;
  background: var(--wizard-bg);
  color: var(--wizard-text);

  font-size: 14px;
  line-height: 1.4;
  outline: none;

  transition:
    border-color 0.2s ease,
    background-color 0.2s ease,
    box-shadow 0.2s ease;
}

.form-control:focus {
  border-color: var(--wizard-primary);
  background: var(--wizard-white);
  box-shadow: 0 0 0 3px var(--wizard-primary-shadow);
}

/* Teléfono */
.phone-input-group {
  display: flex;
  width: 100%;
  min-width: 0;
}

.country-code-select-wrapper {
  flex: 0 0 auto;
}

.country-code-select {
  width: auto !important;
  min-width: 105px;
  border-radius: 9px 0 0 9px !important;
  border-right: 0 !important;
  cursor: pointer;
}

.phone-input-group input {
  min-width: 0;
  border-radius: 0 9px 9px 0 !important;
}

/* Checkbox personalizado */
.wizard-checkbox-group {
  margin-top: 2px;
}

.custom-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 10px;

  cursor: pointer;
  color: #334155;
  font-size: 14px;
  font-weight: 600;
}

.custom-checkbox input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.custom-checkbox .checkmark {
  position: relative;
  width: 21px;
  height: 21px;
  flex: 0 0 21px;

  border: 1px solid var(--wizard-border);
  border-radius: 6px;
  background: var(--wizard-bg);
}

.custom-checkbox .checkmark::after {
  content: "✓";
  position: absolute;
  inset: 0;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: inherit;
  background: var(--wizard-primary);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.custom-checkbox:hover .checkmark {
  border-color: var(--wizard-primary);
}

.custom-checkbox input:checked + .checkmark::after {
  opacity: 1;
}

/* =========================================================
   13. BOTONES DE NAVEGACIÓN (FOOTER)
   ========================================================= */

.wizard-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;

  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--wizard-border);
}

.wizard-btn-prev {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  min-height: 42px;
  padding: 9px 17px;

  border: 1px solid var(--wizard-border);
  border-radius: 999px;

  background: var(--wizard-white);
  color: var(--wizard-text-soft);

  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;

  transition:
    color 0.2s ease,
    border-color 0.2s ease,
    background-color 0.2s ease;
}

.wizard-btn-prev:hover {
  border-color: var(--wizard-primary);
  color: var(--wizard-primary);
  background: var(--wizard-primary-soft);
}

.wizard-footer .ac__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
}

.wizard-submit-area {
  display: flex;
  justify-content: flex-end;
  margin-top: 22px;
}

.wizard-feedback:not(:empty) {
  margin-top: 12px;
}

/* =========================================================
   14. RESPONSIVE
   ========================================================= */

/* Tablet: 769px a 1024px */
@media (max-width: 1024px) {
  .disena-viaje-page .container {
    padding-inline: 24px;
  }

  .wizard-layout {
    grid-template-columns: 235px minmax(0, 1fr);
    border-radius: 18px;
  }

  .wizard-sidebar {
    padding: 24px 18px;
  }

  .wizard-content-area {
    padding: 32px;
  }

  .grid-3,
  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .wizard-card img {
    height: 125px;
  }
}

/* Tablet pequeña: <= 900px */
@media (max-width: 900px) {
  .wizard-layout {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .wizard-sidebar {
    padding: 20px;
    border-right: 0;
    border-bottom: 1px solid var(--wizard-border);
  }

  .wizard-sidebar-title {
    margin-bottom: 14px;
    padding-bottom: 13px;
  }

  .wizard-nav-list {
    display: none;
  }

  .wizard-progress-mobile {
    display: block;
  }

  .wizard-content-area {
    padding: 28px;
  }
}

/* Mobile: <= 640px */
@media (max-width: 640px) {
  .disena-viaje-page .container {
    padding-inline: 16px;
  }

  .wizard-layout {
    border-radius: 16px;
  }

  .wizard-sidebar {
    padding: 18px 16px;
  }

  .wizard-content-area {
    padding: 24px 18px;
  }

  .wizard-step-title {
    align-items: flex-start;
    gap: 10px;
    font-size: 20px;
  }

  .disena-viaje-page .icon-box {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
    border-radius: 10px;
    font-size: 14px;
  }

  .wizard-step-subtitle {
    margin-bottom: 20px;
    font-size: 13.5px;
  }

  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .wizard-card img {
    height: 145px;
  }

  .wizard-btn {
    padding: 13px;
  }

  .wizard-form-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .wizard-form-group {
    max-width: none;
    margin-bottom: 15px;
  }

  .wizard-counter {
    gap: 12px;
  }

  .wizard-counter strong {
    font-size: 14px;
  }

  .wizard-counter small {
    font-size: 12px;
  }

  .counter-controls {
    gap: 9px;
  }

  .wizard-footer {
    align-items: stretch;
    flex-direction: column-reverse;
    margin-top: 22px;
    padding-top: 17px;
  }

  .wizard-footer .ac__button,
  .wizard-footer .wizard-btn-prev {
    width: 100%;
    margin: 0 !important;
  }

  .wizard-footer .ac__button {
    justify-content: center;
  }

  .wizard-submit-area {
    justify-content: stretch;
    margin-top: 18px;
  }

  .wizard-submit-area .ac__button {
    width: 100%;
    justify-content: center;
  }
}

/* Mobile pequeño: <= 480px */
@media (max-width: 480px) {
  .disena-viaje-page .container {
    padding-inline: 14px;
  }

  .wizard-sidebar {
    padding: 16px 14px;
  }

  .wizard-content-area {
    padding: 22px 15px;
  }

  .wizard-step-title {
    font-size: 18px;
  }

  .wizard-step-subtitle {
    font-size: 13px;
    line-height: 1.55;
  }

  .wizard-card img {
    height: 135px;
  }

  .wizard-card__label {
    padding: 11px 9px;
    font-size: 13.5px;
  }

  .wizard-btn {
    gap: 9px;
    padding: 12px;
  }

  .wizard-btn__text strong {
    font-size: 13.5px;
  }

  .wizard-btn__text small {
    font-size: 11.5px;
  }

  .form-control {
    padding: 10px 12px;
    font-size: 14px;
  }
}

/* Mobile muy pequeño: <= 360px */
@media (max-width: 360px) {
  .disena-viaje-page .container {
    padding-inline: 10px;
  }

  .wizard-content-area {
    padding: 20px 12px;
  }

  .wizard-step-title {
    font-size: 17px;
  }

  .wizard-step-title .icon-box {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
  }

  .wizard-counter {
    align-items: flex-start;
  }

  .counter-controls button {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
  }

  .wizard-card img {
    height: 125px;
  }
}

/* Reducir movimiento */
@media (prefers-reduced-motion: reduce) {
  .disena-viaje-page *,
  .disena-viaje-page *::before,
  .disena-viaje-page *::after {
    animation: none !important;
    transition: none !important;
  }
}
