css/* Base styles for all form components */
.form-group {
  margin-bottom: 1rem;
}

.form-text {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.875rem;
  color: var(--medium-gray, #666);
}

.form-error-message {
  display: none;
  width: 100%;
  margin-top: 0.25rem;
  font-size: 0.875rem;
  color: var(--dialogue-red, #B8405A);
}

.form-group.has-error .form-error-message {
  display: block;
}

/* Accessibility helpers */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Focus styles for better accessibility */
.form-control:focus,
.form-checkbox input:focus,
.form-select:focus {
  outline: 2px solid var(--reflection-blue, #0F5E9C);
  outline-offset: 2px;
}

/* Disabled state */
.form-group.is-disabled {
  opacity: 0.6;
  pointer-events: none;
}

/* Loading state */
.form-group.is-loading {
  position: relative;
}

.form-group.is-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 1rem;
  width: 1rem;
  height: 1rem;
  margin-top: -0.5rem;
  border: 2px solid var(--light-gray, #ddd);
  border-top-color: var(--reflection-blue, #0F5E9C);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}
