.formulario-afiliados-container {
  max-width: 1200px;
  margin: 30px auto;
  padding: 30px;
  background: #f9f9f9;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.formulario-afiliados-container h2 {
  text-align: center;
  color: #2c3e50;
  margin-bottom: 30px;
  font-size: 28px;
}

.form-rows {
  margin-bottom: 25px;
}

.form-row {
  display: flex;
  gap: 30px;
  margin-bottom: 20px;
}

.form-row .campo {
  flex: 1;
  min-width: 0;
}

.campo {
  margin-bottom: 20px;
}

.campo label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #34495e;
  font-size: 14px;
}

.campo input,
.campo select {
  width: 100%;
  padding: 12px;
  border: 2px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.3s ease;
  box-sizing: border-box;
}

.campo input:focus,
.campo select:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 5px rgba(52, 152, 219, 0.3);
}

.submit-container {
  text-align: center;
  margin-top: 20px;
}

button[type="submit"] {
  background: #3498db;
  color: white;
  padding: 15px 40px;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease;
}

button[type="submit"]:hover {
  background: #2980b9;
}

#mensaje-resultado {
  margin-top: 20px;
  padding: 15px;
  border-radius: 6px;
  text-align: center;
  font-weight: 500;
}

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

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

/* Estilos para el botón de obtener link de afiliado */
.btn-link-afiliado {
  background: #3498db;
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease;
  margin: 10px 0;
}

.btn-link-afiliado:hover {
  background: #2980b9;
}

.btn-copiar {
  background: #27ae60;
  color: white;
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease;
}

.btn-copiar:hover {
  background: #229954;
}

#link-afiliado-container {
  margin-top: 15px;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 6px;
  border: 1px solid #e9ecef;
}

#link-afiliado {
  font-family: monospace;
  font-size: 12px;
}

/* Estilos para validación en tiempo real */
.campo input[type="text"]:invalid,
.campo input[type="text"].error {
  border-color: #e74c3c !important;
  box-shadow: 0 0 5px rgba(231, 76, 60, 0.3);
}

.campo input[type="text"]:valid {
  border-color: #27ae60;
}

/* Tooltip para mostrar errores */
.campo input[type="text"][title]:not([title=""]) {
  position: relative;
}

.campo input[type="text"][title]:not([title=""]):hover::after {
  content: attr(title);
  position: absolute;
  bottom: 100%;
  left: 0;
  background: #e74c3c;
  color: white;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  z-index: 1000;
  margin-bottom: 5px;
}

/* Responsive */
@media (max-width: 768px) {
  .form-row {
    flex-direction: column;
    gap: 0;
  }

  .formulario-afiliados-container {
    padding: 20px;
    margin: 15px;
  }
}
