/* ============================================================
   form.css — Single source of truth for form styling.
   Matches specs/design_system.md
   ============================================================ */

/* --- Inputs (text, email, password, tel, search) --- */

.form-input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  color: #111827;
  background-color: #ffffff;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.form-input:focus {
  outline: none;
  border-color: #f97316;
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

.form-input::placeholder {
  color: #9ca3af;
}

.form-input:disabled,
.form-input:read-only {
  background-color: #f9fafb;
  color: #6b7280;
  cursor: not-allowed;
}

/* --- Labels --- */

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.25rem;
  color: #374151;
}

/* --- Field group (label + input) --- */

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.375rem; /* 6px = space-y-1.5 */
}

/* --- Error messages --- */

.form-errors {
  border-radius: 0.5rem;
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  color: #b91c1c;
}

/* --- Social auth buttons (login/signup) --- */

.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.625rem 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  background: white;
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s;
  text-decoration: none;
  color: #111827;
}

.social-btn.disabled {
  pointer-events: none;
  opacity: 0.5;
  cursor: not-allowed;
}

.social-btn:hover {
  background-color: #f9fafb;
  border-color: #d1d5db;
}

/* --- Divider ("ou") --- */

.divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: #9ca3af;
  font-size: 0.875rem;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e5e7eb;
}

/* --- Button active press feedback --- */

button[type="submit"]:active {
  transform: scale(0.98);
}
