/* ========================================
   FORMULARIO EMPRESASLOCALES - CSS PERSONALIZADO
   Para JetEngine + Gutenberg WordPress  
   SCOPED: Solo aplica al formulario específico
======================================== */

/* Selector específico usando data-form-id="39" para evitar conflictos */
form[data-form-id="39"] {
  /* Variables CSS para consistencia dentro del formulario */
  --primary-gradient: linear-gradient(135deg, #00d4aa, #00b894);
  --secondary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --header-gradient: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
  --border-radius: 12px;
  --shadow-light: 0 4px 15px rgba(0,0,0,0.08);
  --shadow-medium: 0 8px 25px rgba(0,0,0,0.15);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --text-primary: #2d3748;
  --text-secondary: #718096;
  --border-color: #e2e8f0;
  --focus-color: #00d4aa;
  --error-color: #e53e3e;
  --success-color: #38a169;
  
  /* Estilos del contenedor principal */
  background: white;
  border-radius: 20px;
  box-shadow: var(--shadow-medium);
  overflow: hidden;
  max-width: 900px;
  margin: 0 auto;
}

/* ========================================
   BARRA DE PROGRESO MEJORADA
======================================== */
form[data-form-id="39"] .jet-form-builder-progress-pages {
  background: var(--header-gradient);
  padding: 30px;
  position: relative;
  color: white;
}

form[data-form-id="39"] .jet-form-builder-progress-pages::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20px;
  width: 200px;
  height: 200px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  z-index: 1;
}

form[data-form-id="39"] .jet-form-builder-progress-pages__item--wrapper {
  display: inline-flex;
  align-items: center;
  margin-right: 20px;
  position: relative;
  z-index: 2;
}

form[data-form-id="39"] .jet-form-builder-progress-pages__item {
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(255,255,255,0.7);
  transition: var(--transition);
}

form[data-form-id="39"] .jet-form-builder-progress-pages__item--wrapper.active-page .jet-form-builder-progress-pages__item {
  color: white;
}

form[data-form-id="39"] .jet-form-builder-progress-pages__item--circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 16px;
  transition: var(--transition);
}

form[data-form-id="39"] .jet-form-builder-progress-pages__item--wrapper.active-page .jet-form-builder-progress-pages__item--circle {
  background: var(--focus-color);
  box-shadow: 0 4px 15px rgba(0, 212, 170, 0.4);
}

form[data-form-id="39"] .jet-form-builder-progress-pages__item--label {
  font-weight: 500;
  font-size: 16px;
}

form[data-form-id="39"] .jet-form-builder-progress-pages__separator {
  width: 80px;
  height: 3px;
  background: rgba(255,255,255,0.2);
  border-radius: 2px;
  margin: 0 15px;
}

/* ========================================
   CONTENIDO DEL FORMULARIO
======================================== */
form[data-form-id="39"] .jet-form-builder-page {
  padding: 40px;
  background: #fafbfc;
}

/* Grid de columnas mejorado */
form[data-form-id="39"] .wp-block-columns.wp-block-columns-is-layout-flex {
  gap: 30px;
  margin-bottom: 25px;
}

form[data-form-id="39"] .wp-block-column {
  flex: 1;
}

/* ========================================
   CAMPOS DEL FORMULARIO
======================================== */
form[data-form-id="39"] .jet-form-builder-row {
  margin-bottom: 25px;
}

/* Labels mejorados */
form[data-form-id="39"] .jet-form-builder__label {
  margin-bottom: 8px;
}

form[data-form-id="39"] .jet-form-builder__label-text {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 14px;
  display: block;
}

form[data-form-id="39"] .jet-form-builder__required {
  color: var(--error-color);
  margin-left: 4px;
}


/* Campos con iconos específicos - VERSIÓN CORREGIDA */
form[data-form-id="39"] input[data-field-name="nif"] {
  padding-left: 45px !important;
  background: #f8fafc url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23718096' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpolyline points='14,2 14,8 20,8'/%3E%3Cline x1='16' y1='13' x2='8' y2='13'/%3E%3Cline x1='16' y1='17' x2='8' y2='17'/%3E%3Cpolyline points='10,9 9,9 8,9'/%3E%3C/svg%3E") no-repeat !important;
  background-position: 15px center !important;
  background-size: 20px !important;
}

form[data-form-id="39"] input[data-field-name="nombre"] {
  padding-left: 45px !important;
  background: #f8fafc url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23718096' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 21h18'/%3E%3Cpath d='M5 21V7l8-4v18'/%3E%3Cpath d='M19 21V11l-6-4'/%3E%3C/svg%3E") no-repeat !important;
  background-position: 15px center !important;
  background-size: 20px !important;
}

form[data-form-id="39"] input[data-field-name="sitio_web"] {
  padding-left: 45px !important;
  background: #f8fafc url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23718096' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='2' y1='12' x2='22' y2='12'/%3E%3Cpath d='M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z'/%3E%3C/svg%3E") no-repeat !important;
  background-position: 15px center !important;
  background-size: 20px !important;
}

form[data-form-id="39"] input[data-field-name="numero_telefonico"] {
  padding-left: 45px !important;
  background: #f8fafc url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23718096' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z'/%3E%3C/svg%3E") no-repeat !important;
  background-position: 15px center !important;
  background-size: 20px !important;
}

form[data-form-id="39"] input[data-field-name="correo_electronico"] {
  padding-left: 45px !important;
  background: #f8fafc url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23718096' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z'/%3E%3Cpolyline points='22,6 12,13 2,6'/%3E%3C/svg%3E") no-repeat !important;
  background-position: 15px center !important;
  background-size: 20px !important;
}

form[data-form-id="39"] input[data-field-name="direccion"] {
  padding-left: 45px !important;
  background: #f8fafc url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23718096' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E") no-repeat !important;
  background-position: 15px center !important;
  background-size: 20px !important;
}

form[data-form-id="39"] input[data-field-name="codigo_postal"] {
  padding-left: 45px !important;
  background: #f8fafc url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23718096' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 3h18v18H3zM12 8l4 4-4 4-4-4 4-4z'/%3E%3C/svg%3E") no-repeat !important;
  background-position: 15px center !important;
  background-size: 20px !important;
}

/* Estados de focus con iconos de color verde */
form[data-form-id="39"] input[data-field-name="nif"]:focus {
  background: white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2300d4aa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpolyline points='14,2 14,8 20,8'/%3E%3Cline x1='16' y1='13' x2='8' y2='13'/%3E%3Cline x1='16' y1='17' x2='8' y2='17'/%3E%3Cpolyline points='10,9 9,9 8,9'/%3E%3C/svg%3E") no-repeat !important;
  background-position: 15px center !important;
  background-size: 20px !important;
}

form[data-form-id="39"] input[data-field-name="nombre"]:focus {
  background: white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2300d4aa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 21h18'/%3E%3Cpath d='M5 21V7l8-4v18'/%3E%3Cpath d='M19 21V11l-6-4'/%3E%3C/svg%3E") no-repeat !important;
  background-position: 15px center !important;
  background-size: 20px !important;
}

form[data-form-id="39"] input[data-field-name="sitio_web"]:focus {
  background: white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2300d4aa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='2' y1='12' x2='22' y2='12'/%3E%3Cpath d='M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z'/%3E%3C/svg%3E") no-repeat !important;
  background-position: 15px center !important;
  background-size: 20px !important;
}

form[data-form-id="39"] .jet-form-builder__field:hover {
  border-color: #cbd5e0;
  background: #f1f5f9;
}

form[data-form-id="39"] .jet-form-builder__field:focus {
  outline: none;
  border-color: var(--focus-color);
  background: white;
  box-shadow: 0 0 0 3px rgba(0, 212, 170, 0.1);
  transform: translateY(-1px);
}

/* Textarea específico */
form[data-form-id="39"] .textarea-field {
  min-height: 120px;
  resize: vertical;
  line-height: 1.5;
}

/* Select mejorado - SOLUCIÓN DEFINITIVA para iconos duplicados */
form[data-form-id="39"] .select-field {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23718096' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e") !important;
  background-repeat: no-repeat !important;
  background-position: right 15px center !important;
  background-size: 20px !important;
  cursor: pointer;
  padding-right: 50px !important;
  background-color: #f8fafc !important;
}

form[data-form-id="39"] .select-field:focus {
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300d4aa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e") !important;
  background-color: white !important;
}

/* Específico para el select de servicios/categoría - CORREGIDO */
form[data-form-id="39"] select[data-field-name="servicios"] {
  padding-left: 45px !important;
  background-image: 
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23718096' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z'/%3E%3Cpath d='M8 2v20'/%3E%3Cpath d='M16 2v20'/%3E%3C/svg%3E"),
    url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23718096' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e") !important;
  background-repeat: no-repeat, no-repeat !important;
  background-position: 15px center, right 15px center !important;
  background-size: 20px, 20px !important;
}

form[data-form-id="39"] select[data-field-name="servicios"]:focus {
  background-image: 
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2300d4aa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z'/%3E%3Cpath d='M8 2v20'/%3E%3Cpath d='M16 2v20'/%3E%3C/svg%3E"),
    url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300d4aa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e") !important;
}

/* Forzar reset de cualquier estilo que pueda estar causando iconos duplicados */
form[data-form-id="39"] select[data-field-name="servicios"]::-ms-expand {
  display: none;
}

form[data-form-id="39"] select[data-field-name="servicios"]::-webkit-inner-spin-button,
form[data-form-id="39"] select[data-field-name="servicios"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* ========================================
   CAMPO DE ARCHIVO (LOGO)
======================================== */
form[data-form-id="39"] .jet-form-builder-file-upload {
  border: 3px dashed var(--border-color);
  border-radius: var(--border-radius);
  padding: 40px 20px;
  text-align: center;
  background: #f8fafc;
  transition: var(--transition);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

form[data-form-id="39"] .jet-form-builder-file-upload::before {
  content: '📁';
  font-size: 48px;
  display: block;
  margin-bottom: 15px;
  opacity: 0.8;
}

form[data-form-id="39"] .jet-form-builder-file-upload:hover {
  border-color: var(--focus-color);
  background: #f0fff4;
  transform: translateY(-2px);
}

form[data-form-id="39"] .jet-form-builder-file-upload__message {
  color: var(--text-secondary);
  font-size: 14px;
  margin-top: 15px;
}

form[data-form-id="39"] .jet-form-builder-file-upload__input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  top: 0;
  left: 0;
}

/* ========================================
   SWITCHES/CHECKBOXES MEJORADOS
======================================== */
form[data-form-id="39"] input[type="checkbox"][role="switch"] {
  appearance: none;
  width: 50px;
  height: 26px;
  background: #e2e8f0;
  border-radius: 13px;
  position: relative;
  cursor: pointer;
  transition: var(--transition);
  border: none;
}

form[data-form-id="39"] input[type="checkbox"][role="switch"]:checked {
  background: var(--primary-gradient);
  box-shadow: var(--shadow-light);
}

form[data-form-id="39"] input[type="checkbox"][role="switch"]::before {
  content: '';
  position: absolute;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: white;
  top: 2px;
  left: 2px;
  transition: var(--transition);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

form[data-form-id="39"] input[type="checkbox"][role="switch"]:checked::before {
  transform: translateX(24px);
}

/* ========================================
   BOTONES MEJORADOS
======================================== */
form[data-form-id="39"] .jet-form-builder__next-page,
form[data-form-id="39"] .jet-form-builder__prev-page,
form[data-form-id="39"] .jet-form-builder__submit,
form[data-form-id="39"] .jet-form-builder__action-button {
  padding: 15px 30px;
  border: none;
  border-radius: var(--border-radius);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

form[data-form-id="39"] .jet-form-builder__next-page,
form[data-form-id="39"] .jet-form-builder__submit {
  background: var(--primary-gradient);
  color: white;
  box-shadow: var(--shadow-light);
}

form[data-form-id="39"] .jet-form-builder__next-page:hover,
form[data-form-id="39"] .jet-form-builder__submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 212, 170, 0.3);
}

form[data-form-id="39"] .jet-form-builder__next-page:disabled {
  background: #e2e8f0;
  color: #a0aec0;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

form[data-form-id="39"] .jet-form-builder__prev-page {
  background: #e2e8f0;
  color: var(--text-primary);
}

form[data-form-id="39"] .jet-form-builder__prev-page:hover {
  background: #cbd5e0;
  transform: translateY(-1px);
}

/* Contenedores de botones */
form[data-form-id="39"] .jet-form-builder__next-page-wrap,
form[data-form-id="39"] .jet-form-builder__action-button-wrapper {
  text-align: right;
  margin-top: 30px;
}

form[data-form-id="39"] .jet-form-builder__submit-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ========================================
   SELECTOR JERÁRQUICO (Ubicación)
======================================== */
form[data-form-id="39"] .jet-form-builder-hr-select-level {
  margin-bottom: 20px;
}

form[data-form-id="39"] .jet-form-builder-hr-select-level[style*="display: none"] {
  display: none !important;
}

/* ========================================
   DESCRIPCIONES Y TEXTOS DE AYUDA
======================================== */
form[data-form-id="39"] .jet-form-builder__desc {
  margin-top: 8px;
}

form[data-form-id="39"] .jet-form-builder__desc small {
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.4;
  display: block;
}

/* ========================================
   SELECTOR DE COLOR (Color Picker)
======================================== */
form[data-form-id="39"] .sp-colorize-container {
  border-radius: var(--border-radius) !important;
  border: 2px solid var(--border-color) !important;
  transition: var(--transition);
  width: 50px !important;
  height: 50px !important;
}

form[data-form-id="39"] .sp-colorize-container:hover {
  border-color: var(--focus-color) !important;
  transform: translateY(-1px);
}

/* ========================================
   CAMPOS CONDICIONALES
======================================== */
form[data-form-id="39"] .jet-form-builder__conditional {
  transition: opacity 0.3s ease, max-height 0.3s ease;
}

form[data-form-id="39"] .jet-form-builder__conditional[style*="display: none"] {
  display: none !important;
}

/* ========================================
   RESPONSIVE DESIGN
======================================== */
@media (max-width: 768px) {
  form[data-form-id="39"] .jet-form-builder-page {
    padding: 20px;
  }
  
  form[data-form-id="39"] .jet-form-builder-progress-pages {
    padding: 20px;
    text-align: center;
  }
  
  form[data-form-id="39"] .jet-form-builder-progress-pages__item--wrapper {
    display: block;
    margin: 10px 0;
  }
  
  form[data-form-id="39"] .jet-form-builder-progress-pages__separator {
    display: none;
  }
  
  form[data-form-id="39"] .wp-block-columns.wp-block-columns-is-layout-flex {
    flex-direction: column;
    gap: 15px;
  }
  
  form[data-form-id="39"] .jet-form-builder__field {
    font-size: 16px; /* Evita zoom en iOS */
  }
}

/* ========================================
   ANIMACIONES Y EFECTOS ESPECIALES
======================================== */
form[data-form-id="39"] .jet-form-builder-row {
  animation: fadeInUp 0.5s ease-out;
}

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

/* Efecto de enfoque mejorado */
form[data-form-id="39"] .jet-form-builder__field:focus {
  animation: focusGlow 0.3s ease-out;
}

@keyframes focusGlow {
  0% {
    box-shadow: 0 0 0 0px rgba(0, 212, 170, 0.4);
  }
  100% {
    box-shadow: 0 0 0 3px rgba(0, 212, 170, 0.1);
  }
}

/* ========================================
   ESTADOS DE VALIDACIÓN SUAVES
======================================== */
form[data-form-id="39"] .jet-form-builder__field.is-invalid,
form[data-form-id="39"] .jet-form-builder__field:invalid {
  border-color: var(--error-color);
  background: #fef2f2; /* Fondo más sutil */
  box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.1);
}

form[data-form-id="39"] .jet-form-builder__field.is-valid {
  border-color: var(--success-color);
  background: #f0fff4;
  box-shadow: 0 0 0 3px rgba(56, 161, 105, 0.1);
}

/* ========================================
   MEJORAS EN ACCESIBILIDAD
======================================== */
form[data-form-id="39"] .jet-form-builder__field:focus-visible {
  outline: 2px solid var(--focus-color);
  outline-offset: 2px;
}

/* ========================================
   CAMPO HONEYPOT (OCULTO)
======================================== */
form[data-form-id="39"] .jfb-visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* ========================================
   LOADER PERSONALIZADO
======================================== */
form[data-form-id="39"] .jet-form-builder-file-upload__loader {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
}

form[data-form-id="39"] .jet-form-builder-file-upload__loader svg {
  width: 30px;
  height: 30px;
}

/* ========================================
   MENSAJES DEL FORMULARIO
======================================== */
form[data-form-id="39"] + .jet-form-builder-messages-wrap {
  padding: 20px;
  text-align: center;
}

/* ============================================
  FIX PARA FORMULARIO DE HORARIOS DE ATENCIÓN - V2
  ============================================ */

/* 1. FIX PARA EL ENCABEZADO PRINCIPAL
  Hace que el mensaje inicial ocupe todo el ancho */
.jet-sm-gb-3f326100-275e-4656-8c60-1d4ef7b22a2c > .jet-form-builder__conditional > .wp-block-columns:first-child {
   flex-basis: 100% !important;
   max-width: 100% !important;
   margin-bottom: 25px !important;
}

.jet-sm-gb-3f326100-275e-4656-8c60-1d4ef7b22a2c > .jet-form-builder__conditional > .wp-block-columns:first-child .wp-block-column {
   flex-basis: 100% !important;
   max-width: 100% !important;
}

/* 2. FIX CRÍTICO: USAR FLEXBOX CON ANCHO FIJO Y ALINEACIÓN SUPERIOR
  Mantiene columnas con ancho consistente y altura independiente */
.jet-sm-gb-3f326100-275e-4656-8c60-1d4ef7b22a2c > .jet-form-builder__conditional > .wp-block-columns:nth-child(2) {
   display: flex !important;
   flex-wrap: wrap !important;
   gap: 15px !important;
   margin-top: 20px !important;
   align-items: flex-start !important; /* CLAVE: Alinea al inicio, no estira las columnas */
}

/* Forzar ancho fijo para los 5 primeros días */
.jet-sm-gb-3f326100-275e-4656-8c60-1d4ef7b22a2c > .jet-form-builder__conditional > .wp-block-columns:nth-child(2) > .wp-block-column {
   flex: 0 0 calc(25% - 12px) !important; /* 20% para 5 columnas menos el gap */
   max-width: calc(25% - 12px) !important;
   min-width: calc(25% - 12px) !important;
}

/* Contenedor para sábado y domingo */
.jet-sm-gb-3f326100-275e-4656-8c60-1d4ef7b22a2c > .jet-form-builder__conditional > .wp-block-columns:nth-child(3) {
   display: flex !important;
   gap: 15px !important;
   margin-top: 15px !important;
   align-items: flex-start !important; /* También aquí para sábado y domingo */
}

/* Ancho fijo para sábado y domingo */
.jet-sm-gb-3f326100-275e-4656-8c60-1d4ef7b22a2c > .jet-form-builder__conditional > .wp-block-columns:nth-child(3) > .wp-block-column {
   flex: 0 0 calc(25% - 12px) !important;
   max-width: calc(25% - 12px) !important;
   min-width: calc(25% - 12px) !important;
}

/* 3. ESTILO BASE PARA CADA COLUMNA DE DÍA - .jet-sm-gb-3f326100-275e-4656-8c60-1d4ef7b22a2c .wp-block-column*/
.dia-column {
   padding: 15px !important;
   background: #f9f9f9;
   border-radius: 8px;
   border: 1px solid #e0e0e0;
   min-width: 0 !important;
   /* Elimino min-height para que cada columna tenga su altura natural */
   display: flex;
   flex-direction: column;
   align-self: flex-start !important; /* CLAVE: Evita que se estiren verticalmente */
}

/* 4. FIX PARA LOS SWITCHES DE DÍAS */
.jet-sm-gb-3f326100-275e-4656-8c60-1d4ef7b22a2c .field-type-switcher {
   margin-bottom: 15px !important;
}

.jet-sm-gb-3f326100-275e-4656-8c60-1d4ef7b22a2c .field-type-switcher .jet-form-builder__label {
   display: flex;
   align-items: center;
   justify-content: space-between;
   font-weight: 600;
   color: #333;
   margin-bottom: 10px !important;
}

/* 5. FIX COMPLETO PARA LOS INPUTS DE TIEMPO */
/* Selector más específico para los inputs dentro del formulario */
.jet-sm-gb-3f326100-275e-4656-8c60-1d4ef7b22a2c input[type="time"],
.jet-sm-gb-3f326100-275e-4656-8c60-1d4ef7b22a2c .jet-form-builder__field.time-field {
   width: 100% !important;
   max-width: 100% !important;
   display: block !important;
   box-sizing: border-box !important;
   padding: 8px 10px !important;
   border: 1px solid #ddd !important;
   border-radius: 4px !important;
   font-size: 14px !important;
   margin: 0 !important;
   -webkit-appearance: none !important;
   -moz-appearance: textfield !important;
}

/* Fix adicional para el contenedor del campo de tiempo */
.jet-sm-gb-3f326100-275e-4656-8c60-1d4ef7b22a2c .field-type-time-field {
   width: 100% !important;
}

/* Asegurar que el field-wrap no interfiera */
.jet-sm-gb-3f326100-275e-4656-8c60-1d4ef7b22a2c .jet-form-builder__field-wrap {
   width: 100% !important;
}

/* Fix adicional específico para inputs dentro del repeater */
.jet-sm-gb-3f326100-275e-4656-8c60-1d4ef7b22a2c .jet-form-builder-repeater input[type="time"] {
   max-width: none !important;
}

/* 6. FIX PARA LOS CONTENEDORES DE HORARIOS */
.jet-sm-gb-3f326100-275e-4656-8c60-1d4ef7b22a2c .jet-form-builder-repeater__row {
   background: white;
   padding: 12px !important;
   border-radius: 6px;
   margin-bottom: 10px !important;
   border: 1px solid #e5e5e5;
   position: relative;
}

.jet-sm-gb-3f326100-275e-4656-8c60-1d4ef7b22a2c .jet-form-builder-repeater__row-fields {
   display: flex;
   flex-direction: column;
   gap: 10px;
   width: 100%;
}

/* 7. FIX PARA PREVENIR SUPERPOSICIÓN DEL BOTÓN "AÑADIR HORARIO" */
.jet-sm-gb-3f326100-275e-4656-8c60-1d4ef7b22a2c .jet-form-builder-repeater__actions {
   margin-top: 15px !important; /* Más espacio arriba del botón */
   padding-top: 10px !important;
   clear: both !important;
}

.jet-sm-gb-3f326100-275e-4656-8c60-1d4ef7b22a2c .jet-form-builder-repeater__new {
   background: #4CAF50 !important;
   color: white !important;
   border: none !important;
   padding: 8px 16px !important;
   border-radius: 4px !important;
   cursor: pointer !important;
   font-size: 13px !important;
   transition: background 0.3s !important;
   width: 100% !important;
   display: block !important;
   margin: 0 !important; /* Resetea márgenes */
}

.jet-sm-gb-3f326100-275e-4656-8c60-1d4ef7b22a2c .jet-form-builder-repeater__new:hover {
   background: #45a049 !important;
}

/* 8. FIX PARA EL BOTÓN DE ELIMINAR (X) */
.jet-sm-gb-3f326100-275e-4656-8c60-1d4ef7b22a2c .jet-form-builder-repeater__row-remove {
   position: absolute !important;
   right: -8px !important;
   top: -12px !important;
}

.jet-sm-gb-3f326100-275e-4656-8c60-1d4ef7b22a2c .jet-form-builder-repeater__remove {
   background: #ff4444 !important;
   color: white !important;
   border: none !important;
   border-radius: 50% !important;
   width: 24px !important;
   height: 24px !important;
   display: flex !important;
   align-items: center !important;
   justify-content: center !important;
   cursor: pointer !important;
   font-size: 18px !important;
   line-height: 1 !important;
   transition: background 0.3s !important;
   padding: 0 !important;
}

.jet-sm-gb-3f326100-275e-4656-8c60-1d4ef7b22a2c .jet-form-builder-repeater__remove:hover {
   background: #cc0000 !important;
}

/* 9. FIX PARA LOS LABELS DE HORA */
.jet-sm-gb-3f326100-275e-4656-8c60-1d4ef7b22a2c .field-type-time-field {
   margin-bottom: 10px !important;
}

.jet-sm-gb-3f326100-275e-4656-8c60-1d4ef7b22a2c .field-type-time-field .jet-form-builder__label-text {
   font-size: 13px !important;
   color: #666 !important;
   margin-bottom: 5px !important;
   display: block !important;
}

/* 10. FIX PARA DESCRIPCIONES */
.jet-sm-gb-3f326100-275e-4656-8c60-1d4ef7b22a2c .jet-form-builder__desc {
   margin-top: 5px !important;
   font-size: 11px !important;
   color: #888 !important;
   line-height: 1.4 !important;
}

/* 11. ELIMINAR REGLAS QUE FUERZAN ALTURA MÍNIMA */
/* Elimino estas reglas que causan el problema de expansión */
.jet-sm-gb-3f326100-275e-4656-8c60-1d4ef7b22a2c .jet-form-builder__conditional:empty,
.jet-sm-gb-3f326100-275e-4656-8c60-1d4ef7b22a2c .jet-form-builder__conditional:has(.jet-form-builder-repeater__items:empty) {
   min-height: 0 !important;
}

/* Cada columna mantiene su altura natural, no se expande */
.jet-sm-gb-3f326100-275e-4656-8c60-1d4ef7b22a2c .wp-block-column {
   height: auto !important; /* Altura automática basada en contenido */
}

/* 12. ESTILO MEJORADO PARA LOS SWITCHES */
.jet-sm-gb-3f326100-275e-4656-8c60-1d4ef7b22a2c input[type="checkbox"][role="switch"] {
   position: relative;
   width: 44px !important;
   height: 24px !important;
   -webkit-appearance: none !important;
   appearance: none !important;
   background: #ccc !important;
   border-radius: 12px !important;
   outline: none !important;
   cursor: pointer !important;
   transition: background 0.3s !important;
   flex-shrink: 0 !important;
}

.jet-sm-gb-3f326100-275e-4656-8c60-1d4ef7b22a2c input[type="checkbox"][role="switch"]:checked {
   background: #4CAF50 !important;
}

.jet-sm-gb-3f326100-275e-4656-8c60-1d4ef7b22a2c input[type="checkbox"][role="switch"]::before {
   content: '';
   position: absolute;
   width: 20px;
   height: 20px;
   border-radius: 50%;
   background: white;
   top: 2px;
   left: 2px;
   transition: transform 0.3s;
   box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.jet-sm-gb-3f326100-275e-4656-8c60-1d4ef7b22a2c input[type="checkbox"][role="switch"]:checked::before {
   transform: translateX(20px);
}

/* 13. RESPONSIVE DESIGN MEJORADO */
@media (max-width: 992px) {
   .jet-sm-gb-3f326100-275e-4656-8c60-1d4ef7b22a2c > .jet-form-builder__conditional > .wp-block-columns:nth-child(2) > .wp-block-column {
       flex: 0 0 calc(33.333% - 10px) !important;
       max-width: calc(33.333% - 10px) !important;
       min-width: calc(33.333% - 10px) !important;
   }
   
   .jet-sm-gb-3f326100-275e-4656-8c60-1d4ef7b22a2c > .jet-form-builder__conditional > .wp-block-columns:nth-child(3) > .wp-block-column {
       flex: 0 0 calc(33.333% - 10px) !important;
       max-width: calc(33.333% - 10px) !important;
       min-width: calc(33.333% - 10px) !important;
   }
}

@media (max-width: 768px) {
   .jet-sm-gb-3f326100-275e-4656-8c60-1d4ef7b22a2c > .jet-form-builder__conditional > .wp-block-columns:nth-child(2) > .wp-block-column {
       flex: 0 0 calc(50% - 7.5px) !important;
       max-width: calc(50% - 7.5px) !important;
       min-width: calc(50% - 7.5px) !important;
   }
   
   .jet-sm-gb-3f326100-275e-4656-8c60-1d4ef7b22a2c > .jet-form-builder__conditional > .wp-block-columns:nth-child(3) > .wp-block-column {
       flex: 0 0 calc(50% - 7.5px) !important;
       max-width: calc(50% - 7.5px) !important;
       min-width: calc(50% - 7.5px) !important;
   }
}

@media (max-width: 480px) {
   .jet-sm-gb-3f326100-275e-4656-8c60-1d4ef7b22a2c > .jet-form-builder__conditional > .wp-block-columns:nth-child(2) > .wp-block-column,
   .jet-sm-gb-3f326100-275e-4656-8c60-1d4ef7b22a2c > .jet-form-builder__conditional > .wp-block-columns:nth-child(3) > .wp-block-column {
       flex: 0 0 100% !important;
       max-width: 100% !important;
       min-width: 100% !important;
   }
}

/* 14. HOVER EFFECTS SUTILES */
.jet-sm-gb-3f326100-275e-4656-8c60-1d4ef7b22a2c .wp-block-column {
   transition: all 0.3s ease;
}

.jet-sm-gb-3f326100-275e-4656-8c60-1d4ef7b22a2c .wp-block-column:has(input[type="checkbox"]:checked) {
   border-color: #4CAF50;
   background: #f0f9f0;
}