/* FormGeneratorForm container */
.formGeneratorForm {
  width: 100%;
}

/* Loading state */
.loadingState {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  gap: 16px;
}

.loadingSpinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--color-primary);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Field styling */
.fieldGroup {
  margin-bottom: 20px;
}

.fieldLabel {
  display: block;
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: 6px;
  font-size: 14px;
  text-align: left;
}

/* Floating label container */
.floatingLabelInput {
  position: relative;
  margin-bottom: 20px;
}

.fieldInput {
  width: 100%;
  padding: 12px 12px 8px 12px;
  border: 1px solid var(--color-primary);
  border-radius: 25px;
  font-size: 14px;
  transition: all 0.2s ease;
  background-color: var(--color-bg);
  box-sizing: border-box;
  color: var(--color-text);
}

.fieldInput:focus {
  outline: none;
  border-color: var(--color-secondary);
}

.fieldInput:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.fieldInput.fieldError {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* Multiselect styling */
.multiselectContainer {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--color-primary);
  border-radius: 25px;
  background-color: var(--color-bg);
  min-height: 60px;
  max-height: 200px;
  overflow-y: auto;
  box-sizing: border-box;
  text-align: left;
}

.multiselectContainer.fieldError {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.multiselectLoading,
.multiselectEmpty {
  padding: 8px;
  text-align: center;
  color: var(--color-text);
  opacity: 0.7;
  font-size: 14px;
}

.multiselectOptions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}

.multiselectOption {
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 4px 0;
  user-select: none;
  width: 100%;
}

.multiselectOption:hover {
  opacity: 0.8;
}

.multiselectCheckbox {
  margin-right: 8px;
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--color-primary);
}

.multiselectLabel {
  font-size: 14px;
  color: var(--color-text);
  flex: 1;
}

.multiselectCount {
  font-size: 0.75rem;
  color: var(--color-primary);
  margin-left: 4px;
  font-weight: normal;
}

/* Textarea styling */
.fieldTextarea {
  width: 100%;
  padding: 12px 12px 8px 12px;
  border: 1px solid var(--color-primary);
  border-radius: 25px;
  font-size: 14px;
  transition: all 0.2s ease;
  background-color: var(--color-bg);
  box-sizing: border-box;
  color: var(--color-text);
  font-family: inherit;
  line-height: 1.5;
  overflow-y: auto;
  resize: vertical;
  min-height: 4em;
}

/* Content textarea - larger default size */
.contentTextarea {
  min-height: 18em !important;
  height: auto;
}

.fieldTextarea:focus {
  outline: none;
  border-color: var(--color-secondary);
}

.fieldTextarea.fieldError {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* Floating label styles */
.label {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-primary);
  opacity: 0.7;
  font-size: 14px;
  transition: all 0.2s ease;
  pointer-events: none;
  z-index: 1;
}

.focusedLabel {
  position: absolute;
  left: 12px;
  top: -8px;
  transform: translateY(0);
  color: var(--color-primary);
  opacity: 1;
  font-size: 12px;
  font-weight: 500;
  background-color: var(--color-bg);
  padding: 0 4px;
  transition: all 0.2s ease;
  pointer-events: none;
  z-index: 2;
}

.activeFocusedLabel {
  position: absolute;
  left: 12px;
  top: -8px;
  transform: translateY(0);
  color: var(--color-secondary);
  opacity: 1;
  font-size: 12px;
  font-weight: 500;
  background-color: var(--color-bg);
  padding: 0 4px;
  transition: all 0.2s ease;
  pointer-events: none;
  z-index: 2;
}

.readonlyField {
  padding: 12px 12px 8px 12px;
  background-color: var(--color-bg);
  border: 1px solid var(--color-primary);
  border-radius: 25px;
  color: var(--color-text);
  font-size: 14px;
  min-height: 20px;
  opacity: 0.7;
  width: 100%;
  box-sizing: border-box;
}

/* Checkbox styling */
.checkboxLabel {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-weight: 500;
  color: var(--color-text);
  font-size: 14px;
}

.checkboxInput {
  margin-right: 8px;
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--color-primary);
}

/* Required field indicator */
.required {
  color: #ef4444;
  margin-left: 4px;
}

/* Error text */
.errorText {
  color: #ef4444;
  font-size: 12px;
  margin-top: 4px;
  display: block;
}

/* Button group */
.buttonGroup {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--color-primary);
}

.cancelButton {
  padding: 8px 16px;
  border: 1px solid var(--color-primary);
  background-color: var(--color-bg);
  color: var(--color-text);
  border-radius: 25px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cancelButton:hover:not(:disabled) {
  background-color: var(--color-primary-hover);
  border-color: var(--color-primary);
  color: #181818;
}

.cancelButton:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.submitButton {
  padding: 8px 16px;
  border: none;
  background-color: var(--color-secondary);
  color: var(--color-bg);
  border-radius: 25px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.submitButton:hover:not(:disabled) {
  background-color: var(--color-secondary-hover);
}

.submitButton:disabled {
  background-color: #9ca3af;
  cursor: not-allowed;
}

/* Responsive design */
@media (max-width: 640px) {
  .buttonGroup {
    flex-direction: column-reverse;
  }
  
  .cancelButton,
  .submitButton {
    width: 100%;
    padding: 12px;
  }
}

