/* application-form.css */

.form-field {
  margin-bottom: 1.5rem;
}

.form-field label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.form-field input,
.form-field textarea,
.form-field select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
  transition: border-color 0.2s ease;
}

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

/* Validation states */
.form-field input:invalid,
.form-field textarea:invalid,
.form-field select:invalid {
  border-color: #dc3545;
}

.form-field input:focus:invalid,
.form-field textarea:focus:invalid,
.form-field select:focus:invalid {
  border-color: #dc3545;
  box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.1);
}

/* Error messages */
.error-message {
  display: block;
  color: #dc3545;
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

.form-field.has-error input,
.form-field.has-error textarea,
.form-field.has-error select {
  border-color: #dc3545;
  box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.1);
}

/* Status messages */
.sgad-status {
  margin-top: 1rem;
  padding: 0.75rem;
  border-radius: 4px;
}

.sgad-status.error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.sgad-status.success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

/* Loading state */
.sgad-status:contains("Submitting") {
  background-color: #e2e3e5;
  color: #383d41;
  border-color: #d6d8db;
}

/* Optional: Responsive adjustments */
@media (max-width: 768px) {
  .form-field input,
  .form-field textarea,
  .form-field select {
    padding: 0.625rem;
  }
}

/* Tag input styling - add these to your CSS file */
.tag-input-container {
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 0.5rem;
  background: white;
  cursor: text;
  transition: border-color 0.2s ease;
}

.tag-input-container:focus-within {
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.5rem;
  background-color: #e5e7eb;
  border-radius: 9999px;
  font-size: 0.875rem;
  color: #1f2937;
  transition: all 0.2s ease;
}

.tag-text {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tag-remove {
  cursor: pointer;
  font-size: 1.125rem;
  line-height: 1;
  color: #6b7280;
  transition: color 0.2s ease;
  background: none;
  border: none;
  padding: 0 0.25rem;
}

.tag-remove:hover {
  color: #dc3545;
}

.tag-input {
  border: none;
  outline: none;
  width: 100%;
  padding: 0.25rem;
  font-size: 0.875rem;
  background: transparent;
}

.tag-input::placeholder {
  color: #9ca3af;
}

/* Validation state */
.tag-input-container.invalid {
  border-color: #dc3545;
}

.tag-input-container.invalid:focus-within {
  box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.1);
}

small {
  display: block;
  color: #666;
  font-size: 0.75rem;
  margin-top: 0.25rem;
}