/* ============================================
   Forms Component - Standardized Form Styles
   
   This file provides standardized styling for form elements:
   - Form fields (label, input wrapper, hint, error)
   - Form groups and rows
   - Form actions
   
   Usage:
   - Use .form-field for field wrapper
   - Use .form-label for labels
   - Use .form-hint for hints
   - Use .form-error for error messages
   - Use .form-group for grouping fields
   - Use .form-row for horizontal field layout
   - Use .form-actions for action buttons
   ============================================ */

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.form-field:last-child {
  margin-bottom: 0;
}

.form-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 4px;
}

.form-label .required {
  color: var(--danger, #ef4444);
  font-weight: 600;
}

.form-hint {
  font-size: 11px;
  color: var(--muted);
  margin-top: -4px;
  line-height: 1.4;
}

.form-error {
  color: var(--danger, #ef4444);
  font-size: 11px;
  margin-top: 2px;
  display: none;
}

.form-error:not(:empty) {
  display: block;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 16px;
}

.form-group:last-child {
  margin-bottom: 0;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.form-row:last-child {
  margin-bottom: 0;
}

.form-row--two {
  grid-template-columns: repeat(2, 1fr);
}

.form-row--three {
  grid-template-columns: repeat(3, 1fr);
}

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.form-actions--no-border {
  border-top: none;
  padding-top: 0;
}

.form-actions--compact {
  margin-top: 16px;
  padding-top: 16px;
}

@media (max-width: 767px) {
  .form-field {
    gap: 6px;
    margin-bottom: 14px;
  }

  .form-label {
    font-size: 12px;
  }

  .form-hint {
    font-size: 11px;
  }

  .form-error {
    font-size: 11px;
  }

  .form-group {
    gap: 14px;
    margin-bottom: 14px;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 14px;
    margin-bottom: 14px;
  }

  .form-actions {
    flex-direction: column-reverse;
    gap: 10px;
    margin-top: 20px;
    padding-top: 16px;
  }

  .form-actions .btn {
    width: 100%;
  }
}

