/* ========== ESTILOS FORMULARIO VENDER - VERSIÓN COMPACTA VERTICAL ========== */

/* 1. Ancho completo de la página */
.block-content {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

.vender-page {
  width: 100vw !important;
  max-width: none !important;
  margin: 0 !important;
  margin-left: calc(50% - 50vw) !important;
  margin-right: calc(50% - 50vw) !important;
  padding: 0 !important;
  overflow-x: hidden;
  margin-top: -80px !important;
}

.vender-page section {
  margin: 0 !important;
  box-sizing: border-box;
}

/* ArreglO ¿Publicamos tu inmueble para la venta? */

.houzez_section_title {
  margin-left: -50px;
}

.houzez_section_subtitle {
  margin-left: -50px;
}

/* 2. Sección del formulario - Fondo completo */
.formulario-vender-section {
  padding: 60px 20px !important;
  width: 100%;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* 3. Wrapper del formulario - LIGERAMENTE MÁS ANCHO Y COMPACTO */
.formulario-vender-wrapper {
  max-width: 850px;
  width: 100%;
  margin: 0 auto;
  background: white;
  padding: 35px 30px;
  border-radius: 15px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.formulario-vender-wrapper h3 {
  width: 69%;
  font-size: 22px;
  font-weight: 700;
  color: #2c3e50;
  margin: 10px 20px 50px 120px;
  text-align: center;
  line-height: 1.2;
  padding-bottom: 12px;
  border-bottom: 5px solid #e6764e;
}

/* 5. Contenedor wpforms */
.wpforms-container {
  width: 100%;
}

.wpforms-field-container,
.wpforms-field-container1 {
  margin-bottom: 0;
}

.wpforms-field {
  margin-bottom: 14px;
}

/* 6. Labels - MÁS COMPACTOS */
.wpforms-field-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 5px;
}

.texto_blanco {
  color: #2c3e50 !important;
}

.wpforms-required-label {
  color: #e53e3e;
  margin-left: 3px;
}

/* 7. Inputs unificados - ALTURA REDUCIDA */
.wpforms-field-medium,
.wpforms-field-large,
select.wpforms-field-medium,
textarea.wpforms-field-medium,
input[type="text"].wpforms-field-medium,
input[type="email"].wpforms-field-medium,
input[type="tel"].wpforms-field-medium,
input[type="number"].wpforms-field-medium {
  width: 100%;
  max-width: 100%;
  height: 40px;
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
  transition: all 0.3s ease;
  box-sizing: border-box;
  background: white;
  color: #2c3e50;
  line-height: 1.4;
}

/* 8. Select con flecha personalizada */
select.wpforms-field-medium {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%231c2845' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 35px;
}

/* 9. Textarea altura reducida */
textarea.wpforms-field-medium {
  min-height: 70px;
  height: auto;
  resize: vertical;
  padding-top: 8px;
  line-height: 1.5;
}

/* 10. Focus states */
.wpforms-field-medium:focus,
.wpforms-field-large:focus,
select.wpforms-field-medium:focus,
textarea.wpforms-field-medium:focus,
input[type="text"].wpforms-field-medium:focus,
input[type="email"].wpforms-field-medium:focus,
input[type="tel"].wpforms-field-medium:focus,
input[type="number"].wpforms-field-medium:focus {
  border-color: #1c2845;
  outline: none;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 11. Placeholders */
.wpforms-field-medium::placeholder,
select.wpforms-field-medium::placeholder,
textarea.wpforms-field-medium::placeholder {
  color: #9ca3af;
  opacity: 1;
  font-style: italic;
}

/* 12. Grid responsive - DISEÑO EN 1 COLUMNA POR DEFECTO */
.wpforms-one-half,
.wpforms-one-third,
.wpforms-one-fourth {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* 13. Grid para pantallas medianas - 3 COLUMNAS PARA COMPACTAR */
@media (min-width: 768px) {
  .formulario-vender-wrapper {
    max-width: 850px;
    padding: 35px 35px;
  }

  .wpforms-field-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    align-items: start;
  }

  /* FILA 1: Inmueble + Precio + Provincia */
  #wpforms-119-field_14-container {
    grid-column: 1 / 2;
  }

  #wpforms-119-field_15-container {
    grid-column: 2 / 3;
  }

  #wpforms-119-field_23-container {
    grid-column: 3 / 4;
  }

  /* FILA 2: Nombre + Móvil + Email */
  #wpforms-119-field_40-container {
    grid-column: 1 / 2;
  }

  #wpforms-119-field_41-container {
    grid-column: 2 / 3;
  }

  #wpforms-119-field_42-container {
    grid-column: 3 / 4;
  }

  /* FILA 3: Dirección + CP + Localidad */
  #wpforms-119-field_20-container {
    grid-column: 1 / 2;
  }

  #wpforms-119-field_27-container {
    grid-column: 2 / 3;
  }

  #wpforms-119-field_28-container {
    grid-column: 3 / 4;
  }

  /* FILA 4: Habitaciones + Baños + Ascensor */
  #wpforms-119-field_29-container {
    grid-column: 1 / 2;
  }

  #wpforms-119-field_30-container {
    grid-column: 2 / 3;
  }

  #wpforms-119-field_31-container {
    grid-column: 3 / 4;
  }

  /* ASEOS - OCULTO (no se muestra en el grid) */
  #wpforms-119-field_32-container {
    display: none;
  }

  /* FILA 5: Checkboxes (ancho completo) */
  #wpforms-119-field_33-container {
    grid-column: 1 / 4;
  }

  /* FILA 6: Observaciones (ancho completo) */
  #wpforms-119-field_34-container {
    grid-column: 1 / 4;
  }

  /* FILA 7: Política privacidad (ancho completo) */
  #wpforms-119-field_35-container {
    grid-column: 1 / 4;
  }
}

/* 14. Checkboxes - LAYOUT HORIZONTAL COMPACTO */
.wpforms-field-checkbox ul,
.wpforms-list-3-columns {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 52px;
  align-items: center;
  /* justify-content: center; */
}

.wpforms-field-checkbox li {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}

.wpforms-field-checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: #667eea;
  flex-shrink: 0;
  margin: 0;
  margin-top: -10px;
}

.wpforms-field-label-inline {
  font-size: 13px;
  color: #2c3e50;
  cursor: pointer;
  user-select: none;
  font-weight: 500;
  margin: 0;
  white-space: nowrap;
}

/* 15. Field description - MÁS COMPACTO */
.wpforms-field-description {
  font-size: 11px;
  color: #4a5568;
  line-height: 1.4;
  margin-top: 6px;
  padding: 10px;
  background: #f7fafc;
  border-radius: 6px;
  border-left: 3px solid #e6764e;
}

.wpforms-field-description a {
  color: #667eea;
  text-decoration: underline;
  font-weight: 600;
}

.wpforms-field-description a:hover {
  color: #ea7a66;
}

/* 16. Honeypot field (CRÍTICO - campo anti-spam) */
.wpforms-field-hp,
.wpforms-field-container1 {
  position: absolute !important;
  left: -9999px !important;
  top: -9999px !important;
}

/* 17. Submit button - MÁS COMPACTO */
.wpforms-submit-container {
  margin-top: 18px;
  text-align: center;
  padding-top: 10px;
}

.wpforms-submit {
  display: inline-block;
  width: 100%;
  padding: 12px 40px;
  background-color: transparent !important;
  background-image: linear-gradient(180deg, #E6764E 0%, #E6764E 100%) !important;
  color: #FFFFFF !important;
  border: none;
  border-radius: 55px;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 14px;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.wpforms-submit:hover {
  transform: translateY(-2px);
  background-color: transparent !important;
  background-image: linear-gradient(180deg, #E6764E 0%, #CC572D 86%) !important;
  color: #FFFFFF !important;
}

.wpforms-submit:active {
  transform: translateY(0);
}

/* 18. Alert messages */
.alert {
  padding: 12px;
  border-radius: 6px;
  margin: 12px 0;
  font-size: 13px;
}

.alert-success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.alert-danger {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* 19. Links dentro del formulario */
.formulario-vender-wrapper a {
  color: #e6764e;
  font-weight: 700;
  text-decoration: none;
  transition: color 0.3s ease;
}

.formulario-vender-wrapper a:hover {
  color: #000;
  text-decoration: underline;
}

/* 20. Animaciones suaves */
.wpforms-field {
  animation: fadeInUp 0.3s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 21. Responsive MOBILE */
@media (max-width: 767px) {
  .formulario-vender-section {
    padding: 50px 15px !important;
  }

  .formulario-vender-wrapper {
    max-width: 100%;
    padding: 25px 20px;
    border-radius: 12px;
  }

  .formulario-vender-wrapper h3 {
    font-size: 19px;
    margin-bottom: 18px;
  }

  .wpforms-field-container {
    display: block !important;
  }

  .wpforms-field {
    margin-bottom: 14px;
  }

  .wpforms-submit {
    padding: 11px 30px;
    font-size: 13px;
  }

  /* ASEOS también oculto en móvil */
  #wpforms-119-field_32-container {
    display: none;
  }
}

/* 22. Ajustes extra-pequeños */
@media (max-width: 480px) {
  .vender-page {
    margin-top: -60px !important;
  }

  .formulario-vender-section {
    padding: 35px 12px !important;
  }

  .formulario-vender-wrapper {
    padding: 20px 16px;
  }

  .formulario-vender-wrapper h3 {
    font-size: 17px;
    margin-bottom: 16px;
  }

  .wpforms-field-label {
    font-size: 12px;
  }

  .wpforms-field-medium,
  input[type="text"].wpforms-field-medium,
  input[type="email"].wpforms-field-medium,
  input[type="tel"].wpforms-field-medium,
  input[type="number"].wpforms-field-medium,
  select.wpforms-field-medium {
    height: 38px;
    font-size: 12px;
    padding: 8px 10px;
  }
}

@media (max-width: 991px) {
  .formulario-vender-wrapper h3 {
    width: 100% !important;
    font-weight: 100 !important;
    margin: 0 !important;
    margin-bottom: 1.5rem !important;
    border-bottom: 2px solid #e6764e !important;
  }
}
