.textFieldWrapper {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.label {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text);
  display: block;
}

.labelRequired {
  color: var(--color-text);
}

.required {
  color: #ef4444;
  margin-left: 4px;
}

.inputContainer {
  position: relative;
  width: 100%;
}

.input,
.textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--color-primary);
  border-radius: 25px;
  font-size: 14px;
  font-family: inherit;
  color: var(--color-text);
  background-color: var(--color-bg);
  transition: all 0.2s ease;
  box-sizing: border-box;
  resize: none;
  overflow-y: auto;
  line-height: 1.5;
}

.textarea {
  min-height: 44px; /* Match input height */
  height: auto;
  max-height: calc(1.5em * 5 + 24px); /* 5 lines + padding */
  overflow-y: auto;
}

.input:focus,
.textarea:focus {
  outline: none;
  border-color: var(--color-secondary);
  box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb, 0, 123, 255), 0.1);
}

.input:disabled,
.textarea:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background-color: var(--color-bg-disabled, #f5f5f5);
}

.input:read-only,
.textarea:read-only {
  cursor: default;
  background-color: var(--color-bg-disabled, #f5f5f5);
}

.inputFieldError {
  border-color: #ef4444;
}

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

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

/* Size variants */
.sm .input,
.sm .textarea {
  padding: 8px 12px;
  font-size: 13px;
}

.sm .textarea {
  min-height: 36px;
}

.md .input,
.md .textarea {
  padding: 12px 16px;
  font-size: 14px;
}

.md .textarea {
  min-height: 44px;
}

.lg .input,
.lg .textarea {
  padding: 16px 20px;
  font-size: 16px;
}

.lg .textarea {
  min-height: 52px;
}

/* Helper text and error text */
.helperText {
  font-size: 12px;
  color: #6b7280;
  margin-top: 4px;
}

.errorText {
  font-size: 12px;
  color: #ef4444;
  margin-top: 4px;
}

/* Dark theme support */
[data-theme="dark"] .input,
[data-theme="dark"] .textarea {
  border-color: var(--color-primary);
  background-color: var(--color-bg);
}

[data-theme="dark"] .input:disabled,
[data-theme="dark"] .textarea:disabled {
  background-color: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .input:read-only,
[data-theme="dark"] .textarea:read-only {
  background-color: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .label {
  color: var(--color-text);
}

[data-theme="dark"] .helperText {
  color: #9ca3af;
}

/* Responsive design */
@media (max-width: 640px) {
  .input,
  .textarea {
    font-size: 16px; /* Prevents zoom on iOS */
  }
  
  .label {
    font-size: 13px;
  }
  
  .helperText,
  .errorText {
    font-size: 11px;
  }
}

