/* Formulario «Parlons de votre projet de voyage» (#popup-4912).
   Nicepage fija a sus diálogos width: 800px !important y margin-top: -50px !important en el CSS de
   cada página; por eso tamaño y márgenes llevan !important aquí.
   El contenedor sigue siendo el diálogo de Nicepage (.u-dialog-block > .u-dialog), que lo abre y cierra.
   Todos los selectores van precedidos de .modal-viaje para ganar a las reglas genéricas de
   Tailwind (p:not(.u-text-variant)…) y de nicepage.css. */

.u-dialog-block .u-dialog.modal-viaje {
  width: min(1040px, calc(100% - 32px)) !important;
  min-height: 0;
  height: auto;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  margin: 16px auto !important;
  padding: 0;
  overflow: hidden;
  border-radius: 16px !important;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
}

/* Botón de cierre de Nicepage */
.u-dialog.modal-viaje .u-dialog-close-button {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  margin: 0;
  padding: 10px;
  border-radius: 50%;
  background: #fff;
  color: #4b5563;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
  z-index: 3;
}

.u-dialog.modal-viaje .u-dialog-close-button svg {
  width: 100%;
  height: 100%;
}

.u-dialog.modal-viaje .u-dialog-close-button .u-svg-link {
  display: none;
}

.modal-viaje .mv {
  display: grid;
  grid-template-columns: 320px 1fr;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  font-family: Montserrat, sans-serif;
  color: #1f2937;
  text-align: left;
}

.modal-viaje p,
.modal-viaje ul,
.modal-viaje fieldset,
.modal-viaje legend {
  margin: 0;
  padding: 0;
}

.modal-viaje fieldset {
  min-width: 0;
  border: 0;
}

/* legend flotante: evita que el navegador dibuje el borde del fieldset alrededor del título */
.modal-viaje .mv-bloque legend {
  float: left;
  width: 100%;
}

.modal-viaje .mv-bloque legend + * {
  clear: both;
}

/* los campos de fecha tienen un ancho mínimo interno: dejar que se encojan dentro de la rejilla */
.modal-viaje .mv-campo,
.modal-viaje .mv-fechas__grupo,
.modal-viaje .mv-campo input {
  min-width: 0;
}

.modal-viaje ul {
  list-style: none;
}

/* ---- Panel lateral ---- */
.modal-viaje .mv-aside {
  background: #0b3b47 url("../images/contacto-salento.webp") center / cover no-repeat;
  color: #fff;
}

.modal-viaje .mv-aside__capa {
  height: 100%;
  padding: 32px 28px;
  overflow-y: auto;
  background: linear-gradient(180deg, rgba(4, 40, 50, 0.25) 0%, rgba(4, 40, 50, 0.7) 35%, rgba(4, 40, 50, 0.94) 65%);
}

.modal-viaje .mv-aside__marca {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fcd34d;
}

.modal-viaje .mv-aside__titulo {
  margin-top: 8px;
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1.2;
}

.modal-viaje .mv-aside__promesas {
  margin-top: 18px;
}

.modal-viaje .mv-aside__promesas li {
  position: relative;
  padding-left: 22px;
  font-size: 0.88rem;
  line-height: 1.4;
}

.modal-viaje .mv-aside__promesas li + li {
  margin-top: 6px;
}

.modal-viaje .mv-aside__promesas li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fcd34d;
}

.modal-viaje .mv-aside__incluye {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.25);
}

.modal-viaje .mv-aside__aviso {
  font-size: 0.8rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.85);
}

.modal-viaje .mv-aside__subtitulo {
  margin-top: 14px;
  margin-bottom: 6px;
  font-size: 0.82rem;
  font-weight: 700;
}

.modal-viaje .mv-check li {
  position: relative;
  padding-left: 22px;
  font-size: 0.82rem;
  line-height: 1.4;
}

.modal-viaje .mv-check li + li {
  margin-top: 4px;
}

.modal-viaje .mv-check li::before {
  position: absolute;
  left: 0;
  top: 0;
  font-weight: 700;
}

.modal-viaje .mv-check--si li::before {
  content: "✓";
  color: #6ee7a8;
}

.modal-viaje .mv-check--no li::before {
  content: "✕";
  color: #fca5a5;
}

/* ---- Formulario ---- */
.modal-viaje .mv-form {
  padding: 32px 36px 28px;
  overflow-y: auto;
}

.modal-viaje .mv-bloque + .mv-bloque {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid #e5e7eb;
}

.modal-viaje .mv-bloque legend {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  font-size: 1.05rem;
  font-weight: 700;
  color: #111827;
}

.modal-viaje .mv-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #00a2c3;
  color: #fff;
  font-size: 0.8rem;
}

.modal-viaje .mv-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 16px;
}

.modal-viaje .mv-campo {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #374151;
}

.modal-viaje .mv-bloque > .mv-campo + .mv-grid,
.modal-viaje .mv-bloque > .mv-grid + .mv-campo,
.modal-viaje .mv-bloque > .mv-campo + .mv-campo,
.modal-viaje .mv-fechas + .mv-campo {
  margin-top: 16px;
}

.modal-viaje input[type="text"],
.modal-viaje input[type="email"],
.modal-viaje input[type="tel"],
.modal-viaje input[type="date"],
.modal-viaje input[type="number"],
.modal-viaje textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  background: #fff;
  color: #111827;
  font: 400 0.92rem Montserrat, sans-serif;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.modal-viaje textarea {
  resize: vertical;
}

.modal-viaje input:focus,
.modal-viaje textarea:focus {
  border-color: #00a2c3;
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 162, 195, 0.18);
}

.modal-viaje input::placeholder,
.modal-viaje textarea::placeholder {
  color: #9ca3af;
}

/* Píldoras (WhatsApp, accompagnement) */
.modal-viaje .mv-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.modal-viaje .mv-pill {
  position: relative;
  cursor: pointer;
}

.modal-viaje .mv-pill input,
.modal-viaje .mv-opcion input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.modal-viaje .mv-pill span {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 500;
  color: #374151;
  transition: all 0.15s ease;
}

.modal-viaje .mv-pill input:checked + span {
  border-color: #00a2c3;
  background: #00a2c3;
  color: #fff;
}

.modal-viaje .mv-pill input:focus-visible + span,
.modal-viaje .mv-opcion input:focus-visible + span {
  box-shadow: 0 0 0 3px rgba(0, 162, 195, 0.3);
}

/* Contadores de participantes */
.modal-viaje .mv-contador {
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-viaje .mv-contador input {
  width: 72px;
  text-align: center;
  -moz-appearance: textfield;
}

.modal-viaje .mv-contador input::-webkit-outer-spin-button,
.modal-viaje .mv-contador input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.modal-viaje .mv-contador__btn {
  width: 40px;
  height: 40px;
  border: 1px solid #d1d5db;
  border-radius: 50%;
  background: #fff;
  color: #00a2c3;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}

.modal-viaje .mv-contador__btn:hover {
  border-color: #00a2c3;
}

/* Fechas */
.modal-viaje .mv-sub {
  margin-top: 18px;
  margin-bottom: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #374151;
}

.modal-viaje .mv-fechas {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.modal-viaje .mv-fechas__grupo {
  padding: 14px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #f9fafb;
}

.modal-viaje .mv-fechas__grupo > p {
  margin-bottom: 10px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #4b5563;
}

.modal-viaje .mv-fechas__grupo .mv-grid {
  gap: 10px;
}

.modal-viaje .mv-fechas__grupo .mv-campo {
  font-weight: 500;
}

/* Tarjetas de opción (budget, programmes) */
.modal-viaje .mv-opciones {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.modal-viaje .mv-opcion {
  position: relative;
  cursor: pointer;
}

.modal-viaje .mv-opcion span {
  display: block;
  height: 100%;
  padding: 11px 14px 11px 40px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1.35;
  color: #374151;
  transition: all 0.15s ease;
}

.modal-viaje .mv-opcion span::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 13px;
  width: 16px;
  height: 16px;
  border: 1.5px solid #9ca3af;
  border-radius: 50%;
  background: #fff;
}

.modal-viaje .mv-opciones--check .mv-opcion span::before {
  border-radius: 4px;
}

.modal-viaje .mv-opcion input:checked + span {
  border-color: #00a2c3;
  background: #eef8fb;
  color: #0b3b47;
}

.modal-viaje .mv-opcion input:checked + span::before {
  border-color: #00a2c3;
  background: #00a2c3 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 6.3 4.8 9 10 3' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 10px no-repeat;
}

.modal-viaje .mv-nota {
  margin-top: 8px;
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1.45;
  color: #6b7280;
}

/* Envío */
.modal-viaje .mv-enviar {
  display: block;
  width: 100%;
  margin-top: 24px;
  padding: 14px 24px;
  border: 0;
  border-radius: 999px;
  background: #00a2c3;
  color: #fff;
  font: 700 0.98rem Montserrat, sans-serif;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.modal-viaje .mv-enviar:hover,
.modal-viaje .mv-enviar:focus-visible {
  background: #018daa;
}

.modal-viaje .mv-enviar:disabled {
  opacity: 0.7;
  cursor: wait;
}

.modal-viaje .mv-pie {
  margin-top: 12px;
  font-size: 0.75rem;
  line-height: 1.5;
  color: #6b7280;
  text-align: center;
}

/* Mensajes de éxito / error (los muestra js/emailjs-config.js) */
.modal-viaje .mv-mensaje {
  display: none;
  position: static;
  margin-top: 20px;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  text-align: center;
}

.modal-viaje .mv-mensaje--ok {
  background: #ecfdf3;
  color: #166534;
}

.modal-viaje .mv-mensaje--error {
  background: #fdecec;
  color: #991b1b;
}

/* ---- Móvil ---- */
@media (max-width: 860px) {
  .modal-viaje .mv {
    display: block;
    overflow-y: auto;
  }
  .modal-viaje .mv-form {
    overflow: visible;
    padding: 24px 20px 24px;
  }
  .modal-viaje .mv-aside__capa {
    padding: 28px 20px 22px;
  }
  .modal-viaje .mv-aside__titulo {
    padding-right: 40px; /* espacio para el botón de cierre */
    font-size: 1.35rem;
  }
}

@media (max-width: 560px) {
  .modal-viaje .mv-grid,
  .modal-viaje .mv-fechas,
  .modal-viaje .mv-opciones {
    grid-template-columns: 1fr;
  }
}

/* los campos de fecha necesitan algo más de espacio interior para «jj/mm/aaaa» */
.modal-viaje input[type="date"] {
  padding-left: 8px;
  padding-right: 6px;
  font-size: 0.85rem;
}
