/* Add Item Form Container */
.add-item-form-container {
  background: var(--color-bg-surface);
  padding: var(--spacing-md);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-md);
  margin-bottom: var(--spacing-xs);
  border: var(--border-width-thin) solid var(--color-border-light);
}

.add-item-form {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
}

/* Form Fields */
.add-item-form-field {
  display: flex;
  flex-direction: column;
  position: relative;
}

.add-item-form-input-row {
  display: flex;
  align-items: stretch;
  gap: var(--spacing-xs);
}

.add-item-form-input-row .add-item-form-field {
  flex: 1;
}

.add-item-form-assignee-toggle {
  flex: 0 0 auto;
  width: 112px;
  margin: 0;
}

.add-item-form-assignee-hint {
  margin: 0;
  font-size: var(--font-size-xs);
  color: var(--color-text-secondary);
}

.add-item-form-input {
  padding: var(--input-padding-y) var(--input-padding-x);
  border: var(--border-width-thin) solid var(--input-border-color);
  border-radius: var(--input-border-radius);
  font-size: var(--font-size-base);
  font-family: var(--font-family-base);
  transition: var(--transition-base);
  width: 100%;
  background: var(--color-bg-surface);
  color: var(--color-text-primary);
}

.add-item-form-input::placeholder {
  color: var(--color-text-muted);
}

.add-item-form-input:focus {
  outline: none;
  border-color: var(--input-focus-border-color);
  box-shadow: var(--input-focus-shadow);
}

/* Suggestion List Positioning */
.add-item-form-field .suggestion-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: var(--spacing-xs);
  z-index: var(--z-dropdown);
}

/* Actions Row */
.add-item-form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-sm);
  min-height: 40px;
}

/* Quantity Control */
.add-item-form-quantity-control {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  height: 40px;
}

.quantity-btn {
  width: 40px;
  height: 100%;
  border: var(--border-width-thin) solid var(--color-border-medium);
  background: var(--color-bg-surface);
  color: var(--color-text-primary);
  border-radius: var(--border-radius-sm);
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  cursor: pointer;
  transition: var(--transition-base);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.quantity-btn:hover:not(:disabled) {
  background: var(--color-primary-light);
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.quantity-btn:active:not(:disabled) {
  transform: scale(0.95);
}

.quantity-btn:disabled {
  background: var(--color-bg-disabled);
  color: var(--color-text-disabled);
  border-color: var(--color-border-disabled);
  cursor: not-allowed;
  opacity: 0.5;
}

.add-item-form-quantity-input {
  width: 40px;
  max-width: 40px;
  height: 100%;
  box-sizing: border-box;
  padding: var(--input-padding-y) var(--input-padding-x);
  border: var(--border-width-thin) solid var(--input-border-color);
  border-radius: var(--input-border-radius);
  font-size: var(--font-size-base);
  font-family: var(--font-family-base);
  text-align: center;
  transition: var(--transition-base);
  background: var(--color-bg-surface);
  color: var(--color-text-primary);
  -moz-appearance: textfield; /* Remove spinner in Firefox */
}

/* Remove spinner arrows in Chrome/Safari */
.add-item-form-quantity-input::-webkit-outer-spin-button,
.add-item-form-quantity-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.add-item-form-quantity-input:focus {
  outline: none;
  border-color: var(--input-focus-border-color);
  box-shadow: var(--input-focus-shadow);
}

/* Submit Button */
.add-item-form-submit {
  height: 40px;
  padding: 0 var(--spacing-lg);
  background: var(--color-primary);
  color: var(--color-text-inverse);
  border: none;
  border-radius: var(--button-border-radius);
  font-size: var(--font-size-base);
  font-weight: var(--button-font-weight);
  flex: 1;
  min-width: 120px;
  transition: var(--transition-base);
  margin-top: 0;
}

.add-item-form-submit:hover:not(:disabled) {
  background: var(--color-primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.add-item-form-submit:active:not(:disabled) {
  transform: translateY(0);
}

.add-item-form-submit.disabled,
.add-item-form-submit:disabled {
  background: var(--color-gray-400);
  color: var(--color-gray-600);
  cursor: not-allowed;
  opacity: 1;
  box-shadow: none;
  transform: none;
  border: var(--border-width-thin) solid var(--color-gray-500);
}

/* Responsive */
@media (max-width: 480px) {
  .add-item-form-container {
    padding: var(--spacing-md);
  }

  .add-item-form-assignee-toggle {
    width: 100px;
  }

  .add-item-form-quantity-control {
    height: 36px;
  }

  .quantity-btn {
    width: 36px;
    height: 100%;
    font-size: var(--font-size-lg);
  }

  .add-item-form-quantity-input,
  .add-item-form-submit {
    height: 36px;
  }
}
