.wpcf7 {
  .cf7-fieldset {
    background-color: #fafafa;
    margin-bottom: 25px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.2em;
    border: 1px solid #dee2e6;
    padding: 30px;
    font-family: "Segoe UI", Arial, sans-serif;
    color: #212529;
  }
  /* Asterisco que indica obligatoriedad del campo */
  .obligatorio::after {
    content: "*";
    color: #f20404;
    margin-left: 4px;
  }

  h3,
  .tipo-persona-radio {
    grid-column: span 2;
  }

  .tipo-persona-radio {
    padding-bottom: 50px;
  }

  br {
    display: none;
  }

  fieldset {
    border: 0;
    padding: 10px;
  }

  li {
    margin-left: 2rem;
  }

  form label {
    display: block;
    font-weight: 600;
    margin-top: 0.2rem;
    color: #5f5f5f;
  }
  span.wpcf7-list-item-label {
    font-weight: normal !important;
  }

  .no-tiene-label > .wpcf7-list-item {
    margin: 0;
  }
  .no-tiene-label > .wpcf7-list-item > label {
    margin-top: 0.2rem;
  }

  [type="radio"] {
    accent-color: var(--primary-color); /* tu color personalizado */
  }

  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="url"],
  input[type="number"],
  select,
  textarea {
    width: 100%;
    height: 35px;
    padding: 0rem 0.8rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    background: #fff;
    font-size: 0.95rem;
    transition:
      border-color 0.3s ease,
      box-shadow 0.3s ease;
  }
  textarea {
    height: 200px;
  }

  /* Foco accesible */
  input:focus,
  textarea:focus,
  select:focus {
    border-color: #0056b3; /* azul más fuerte */
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.2);
  }

  /* Solo para el campo de aceptación */
  .wpcf7-form-control-wrap.aceptacion-declaracion-jurada .wpcf7-not-valid-tip {
    display: block;
    margin-top: 5px; /* lo empuja debajo del checkbox */
    font-size: 0.9em; /* opcional */
    color: #d00; /* rojo para destacar */
  }

  /* Botón enviar */
  input[type="submit"] {
    background: var(--primary-color);
    color: #fff;
    font-weight: 600;
    padding: 0.7rem 1.2rem;
    border: none;
    cursor: pointer;
    transition: background 0.25s ease;
  }

  input[type="submit"]:hover {
    background: #003d80;
  }
}

/* Mensajes de validación */
.wpcf7-not-valid-tip {
  font-size: 0.85rem;
  color: #c00;
  margin-top: 0.2rem;
}

.wpcf7-response-output {
  margin-top: 1rem;
  padding: 0.8rem;
  border-radius: 4px;
  font-weight: 500;
}

.wpcf7-mail-sent-ok {
  background: #d4edda;
  border: 1px solid #c3e6cb;
  color: #155724;
}

.wpcf7-validation-errors,
.wpcf7-acceptance-missing {
  background: #f8d7da;
  border: 1px solid #f5c6cb;
  color: #721c24;
}

span span.wpcf7-list-item {
  margin-left: 0;
  margin-right: 1em;
}

@media (max-width: 768px) {
  .wpcf7 div fieldset,
  .wpcf7 .cf7-fieldset {
    display: block;
    padding: 10px;
    border: 0;
  }
}

/* tooltip de form reclamos*/
.tooltip-form {
  position: relative;
  display: inline-block;
  margin-left: 6px;
  cursor: help;
  color: var(--primary-color);
}

.tooltip-form::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: 125%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.85);
  color: #31708f;
  background-color: #e7eef7;
  padding: 6px 10px;
  border-radius: 5px;

  white-space: pre-wrap;
  width: max-content;
  max-width: min(90vw, 800px);

  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease-in-out;
  font-size: 0.85em;
  z-index: 10;
  line-height: 1.4rem;
}

.tooltip-form:hover::after {
  opacity: 1;
}

@media (max-width: 768px) {
  .tooltip-form::after {
    left: 50%;
    transform: translateX(-40%);
    max-width: 95vw;
    width: 300px;
  }
}

.wpcf7-response-output {
  white-space: pre-line;
}

/* Asegurar que el tooltip esté alineado */
.wpcf7-form-control-wrap[data-name="hay-representante"] + .tooltip-form {
  display: inline-flex;
  align-items: center;
}

/* Opcional: ajustar el espaciado interno del checkbox */
.wpcf7-form-control-wrap[data-name="hay-representante"] {
  display: inline-flex;
  align-items: center;
  width: auto !important;
}

.wpcf7-form-control::placeholder {
  color: #9ca3af !important;
}

.field-hint {
  font-size: 0.875em;
  color: #4b5563;
  font-weight: 300;
  margin-left: 8px;
}

.form-subtitulo {
  font-size: 16px;
  color: #5d5959;
  font-weight: 700;
  text-transform: uppercase;
}

.seccion-2-header {
  margin-bottom: 4px;
}

.seccion-2-bloque {
  margin-top: 20px;
  margin-bottom: 15px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.recaptcha-notice {
  margin-bottom: 12px;
  font-size: 0.875em;
}
