/* ===============================
   SmartForms CSS
   Estilo: elegante, compacto, minimalista y moderno
   =============================== */

/* Contenedor principal del formulario */
.smartform {
  background: #ffffff;
  border: 1px solid #e6e6e6;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
  max-width: 600px;
  margin: 1.5rem auto;
  font-family: "Inter", "Segoe UI", sans-serif;
  font-size: 15px;
  color: #333;
}

/* Campos */
.sf-field {
  margin-bottom: 1rem;
  transition: all .2s ease;
}

/* Utilidad para ocultar (la usa smartforms.js) */
.d-none { display: none !important; }

/* Texto solo para lectores de pantalla (fallback si no hay Bootstrap) */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

.sf-label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
  color: #222;
}

.sf-control input,
.sf-control select,
.sf-control textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 0.95rem;
  background: #fafafa;
  transition: border-color .2s, box-shadow .2s;
}

.sf-control input:focus,
.sf-control select:focus,
.sf-control textarea:focus {
  border-color: #4a90e2;
  box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.15);
  outline: none;
  background: #fff;
}

/* Checkbox y radio */
.sf-control input[type="checkbox"],
.sf-control input[type="radio"] {
  width: auto;
  margin-right: 0.5rem;
}

/* Texto de ayuda */
.sf-help {
  display: block;
  font-size: 0.8rem;
  color: #777;
  margin-top: 0.25rem;
}

/* Errores */
.sf-errors .sf-error {
  font-size: 0.85rem;
  color: #c62828;
  margin-top: 0.25rem;
}

/* Botón principal */
.sf-actions {
  margin-top: 1.5rem;
  text-align: right;
}

.sf-actions button,
.smartform button[type="submit"] {
  background: linear-gradient(135deg, #4a90e2, #357abd);
  border: none;
  border-radius: 8px;
  color: #fff;
  padding: 0.6rem 1.2rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s, transform .1s;
}

.sf-actions button:hover {
  background: linear-gradient(135deg, #5aa0f2, #468ad5);
}

.sf-actions button:active {
  transform: scale(0.98);
}

/* Compacto en pantallas pequeñas */
@media (max-width: 600px) {
  .smartform {
    padding: 1rem;
  }
  .sf-actions {
    text-align: center;
  }
}
