/* Form Component Styles */

/* Select Component */
.ui-select-dropdown {
  animation: in 0.2s ease-out;
}

@keyframes in {
  from {
    opacity: 0;
    transform: translateY(-0.25rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Checkbox and Switch hover states */
button[role="checkbox"]:not(:disabled):hover,
button[role="switch"]:not(:disabled):hover {
  opacity: 0.8;
}

/* Form validation states */
.field-error input,
.field-error textarea,
.field-error select,
.field-error [role="combobox"] {
  border-color: hsl(var(--destructive));
}

.field-error input:focus-visible,
.field-error textarea:focus-visible,
.field-error select:focus-visible,
.field-error [role="combobox"]:focus-visible {
  ring-color: hsl(var(--destructive));
}

/* Textarea resize handle styling */
textarea.resize-none {
  resize: none;
}

textarea.resize-vertical {
  resize: vertical;
}

textarea.resize-horizontal {
  resize: horizontal;
}

/* Character count warning colors */
.text-warning {
  color: hsl(var(--warning, 38 92% 50%));
}

/* Form field spacing */
.form-stack > * + * {
  margin-top: 1.5rem;
}

/* Disabled field styling */
fieldset:disabled {
  opacity: 0.5;
  pointer-events: none;
}

/* Required field indicator */
.required-indicator {
  color: hsl(var(--destructive));
}

/* Form section styling */
.form-section {
  padding: 1.5rem;
  border-radius: 0.5rem;
  border: 1px solid hsl(var(--border));
}

.form-section + .form-section {
  margin-top: 1.5rem;
}

/* Inline form layouts */
.form-inline {
  display: flex;
  gap: 1rem;
  align-items: flex-end;
}

.form-inline > * {
  flex: 1;
}

/* Radio group styling */
.radio-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.radio-group-horizontal {
  display: flex;
  flex-direction: row;
  gap: 1rem;
}

/* Form helper text */
.form-helper {
  margin-top: 0.25rem;
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
}

/* Loading states */
.form-loading {
  position: relative;
  pointer-events: none;
}

.form-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  background: hsl(var(--background) / 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
}