
/* ===== Estilos generales ===== */
.df-form {
  max-width: 600px;
  margin: 20px auto;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  padding: 20px;
  font-family: 'Montserrat', sans-serif;
  color: #333;
}

/* Barra de progreso */
.df-progress {
  background: #e5e5e5;
  border-radius: 8px;
  height: 8px;
  margin-bottom: 20px;
  overflow: hidden;
}
.df-progress-bar {
  background: #5170ff;
  width: 0;
  height: 100%;
  transition: width .4s ease;
}

/* Paso activo/inactivo */
.df-step {
  display: none;
  opacity: 0;
  transform: translateX(20px);
  transition: opacity .4s ease, transform .4s ease;
}
.df-step.active {
  display: block;
  opacity: 1;
  transform: translateX(0);
}

/* Labels y campos */
.df-field,
.df-step label {
  display: block;
  margin-bottom: 10px;
  font-weight: 500;
}
.df-step input,
.df-step select,
.df-step textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  margin-bottom: 5px
}

.df-step input:focus,
.df-step select:focus,
.df-step textarea:focus {
  outline: none;
  border-color: #5170ff;
  box-shadow: 0 0 4px rgba(81,112,255,0.3);
}

/* Botones */
.df-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
}
.df-step button,
.submit-btn {
  padding: 12px 20px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
}
.next-step,
.submit-btn {
  background: #5170ff;
  color: #fff;
}
.next-step:hover,
.submit-btn:hover {
  background: #3d58d1;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}
.prev-step {
  background: #f1f1f1;
  color: #333;
}
.prev-step:hover {
  background: #ddd;
}
.df-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
}

/* Extras */
.df-extras {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.df-extra-option {
  display: flex;
  align-items: center;
  font-size: 14px;
}

/* Etiquetas ambientales */
.df-etiquetas {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}
.df-etiquetas img {
  width: 60px;
  height: auto;
  border: 2px solid transparent;
  border-radius: 6px;
  cursor: pointer;
}
.df-etiquetas input[type="radio"] {
  display: none;
}
.df-etiquetas input[type="radio"]:checked + img {
  border-color: #5170ff;
}

/* Confirmación */
.df-confirm {
  text-align: center;
  font-size: 18px;
  font-weight: 600;
  color: green;
  padding: 30px;
}

/* Errores */
.df-step input.df-error,
.df-step select.df-error,
.df-step textarea.df-error {
  border-color: red !important;
}
.df-error {
  color: #d9534f;
  font-size: 12px;
  margin-top: 2px;
  display: block;
}

/* ===== Mobile first ===== */
@media (max-width: 600px) {
  .df-extras {
    grid-template-columns: 1fr;
  }
  .df-step button,
  .submit-btn {
    width: 100%;
    margin-bottom: 10px;
  }
}

/* Sliders para Km y CV */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: #e5e5e5;
  border-radius: 6px;
  outline: none;
  margin: 8px 0;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #5170ff;
  cursor: pointer;
}
input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #5170ff;
  cursor: pointer;
}
output {
  display: inline-block;
  margin-left: 8px;
  font-weight: 600;
  color: #333;
}

/* ==== Spinner enviar ==== */
.submit-btn.loading {
  position: relative;
  pointer-events: none;
  opacity: 0.8;
}
.submit-btn.loading::after {
  content: "";
  position: absolute;
  right: 12px;
  top: 50%;
  width: 16px;
  height: 16px;
  border: 2px solid #fff;
  border-top: 2px solid transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  transform: translateY(-50%);
}
@keyframes spin {
  to { transform: translateY(-50%) rotate(360deg); }
}





/* ===== Fuente FE-Font para matrículas ===== */
@font-face {
  font-family: 'FE-Font';
  src: url('https://drivefinity.es/wp-content/plugins/drivefinityforms_pro/assets/fonts/FE-Font.woff2') format('woff2'),
       url('https://drivefinity.es/wp-content/plugins/drivefinityforms_pro/assets/fonts/FE-Font.woff') format('woff');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}







/* ===== Campo matrícula estilo placa ===== */
.matricula-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 15px 0;
}

.matricula-plate {
  display: flex;
  align-items: center; /* centra verticalmente */
  border: 2px solid #000;
  border-radius: 6px;
  width: 340px;
  height: 80px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 0 8px rgba(0,0,0,0.25);
}

/* Franja azul con SVG centrado */
.plate-eu {
  width: 55px;
  height: 100%;
  background: url('../img/matricula-eu.svg') no-repeat center center;
  background-size: contain; /* usa contain para mantener proporción */
  flex-shrink: 0;
}

/* Input estilo matrícula */
.plate-input {
  flex: 1;
  height: 100%;
  border: none;
  outline: none;
  font-size: 48px; /* tamaño uniforme */
  font-family: 'FE-Font', Arial, sans-serif;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 4px;
  background: transparent;
}

/* Placeholder con misma fuente y tamaño */
.plate-input::placeholder {
  font-size: 48px;
  font-family: 'FE-Font', Arial, sans-serif;
  letter-spacing: 4px;
  color: #999;
  opacity: 1;
}
/* Ajuste placeholder en móvil */
@media (max-width: 480px) {
  .plate-input::placeholder {
    font-size: 28px;   /* más pequeño en móvil */
    letter-spacing: 2px;
  }
}


/* Responsive */
@media (max-width: 480px) {
  .matricula-plate {
    width: 100%; /* ocupa ancho completo en móviles */
    height: 60px;
  }
  .plate-eu {
    width: 40px;
    background-size: 70% auto;
  }
  .plate-input {
    font-size: 32px;
    letter-spacing: 3px;
  }
}

/* Texto de ayuda debajo */
.df-help {
  display: block;
  margin-top: 6px;
  font-size: 14px;
  opacity: 0.75;
  text-align: center;
}


/* ===== Responsive matrícula ===== */
@media (max-width: 480px) {
  .matricula-plate {
    width: 240px;
    height: 55px;
  }
  .plate-eu {
    width: 40px;
    background-size: 70% auto;
  }
  .plate-input {
    font-size: 26px;
    letter-spacing: 2px;
  }
}



/* Texto de ayuda */
.df-help {
  display: block;
  margin-top: 6px;
  font-size: 14px;
  opacity: 0.75;
  text-align: center;
}






/* Campos horizontales */
.df-itv-options,
.df-accidentes-options {
  display: flex;
  gap: 15px;
  margin: 10px 0;
  align-items: center;
}

/* Accidentes como botones */
.acc-option input {
  display: none;
}
.acc-option span {
  display: inline-block;
  padding: 10px 18px;
  border: 2px solid #ccc;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.acc-option input:checked + span {
  background: #5170ff;
  color: #fff;
  border-color: #5170ff;
}





//* ITV: fecha + checkbox en una fila, sin recuadro */
.df-itv-row{
  display:flex;
  align-items:center;     /* alinea verticalmente */
  gap:12px;
  flex-wrap:nowrap;       /* misma línea */
}

/* el date ocupa todo el espacio disponible */
.df-itv-row input[type="date"]{
  flex:1 1 auto;
  min-width:0;            /* evita desbordes */
  padding:10px;
  border:1px solid #ccc;
  border-radius:6px;
  font-size:15px;
}

/* bloque "No tiene ITV" limpio, sin bordes ni fondo */
.itv-field .no-itv-option{
  flex:0 0 auto;          /* ancho según contenido */
  display:inline-flex;
  align-items:center;
  gap:8px;
  margin-left:auto;       /* lo empuja a la derecha */
  padding:0;
  border:0 !important;
  background:transparent !important;
  white-space:nowrap;     /* no se parte en dos líneas */
  font-size:14px;
  color:#333;
  cursor:pointer;
}

/* checkbox visible y alineado */
.itv-field .no-itv-option input[type="checkbox"]{
  margin:0;
  transform:scale(1.1);
  accent-color:#5170ff;
}




.df-itv-row {
  display: flex;
  flex-direction: column;  /* siempre apilados */
  align-items: flex-start; /* alineados a la izquierda */
  gap: 8px;
}

.df-itv-row input[type="date"] {
  width: 100%;             /* ocupa todo el ancho */
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 15px;
}

.no-itv-option {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: #333;
  cursor: pointer;
}

.no-itv-option input[type="checkbox"] {
  transform: scale(1.2);
  accent-color: #5170ff;
}







/* Alinear checkbox con texto GDPR */
#gdpr {
  margin-right: 8px;
  transform: scale(1.2); /* opcional, lo hace más visible */
}

label[for="gdpr"], 
label > input[type="checkbox"] {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
