/* Base Input Styles */
.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  border: 1px solid var(--color-gray-lighter);
  border-radius: 8px;
  padding: 0;
  height: 44px; /* Consistent height for medium size */
  width: 100%;
  margin-bottom: 1.5rem; /* Space for error message */
}

/* Width classes */
.input-wrapper.small-width {
  width: 150px; /* Fixed width for small size */
}

.input-wrapper.medium-width {
  width: 300px; /* Fixed width for medium size */
}

.input-wrapper.large-width {
  width: 500px; /* Fixed width for large size */
}

.input-wrapper.full-width {
  width: 100%; /* Full width of the container */
}

.input {
  flex: 1;
  padding-right: 8px;
  font-family: "Vazirmatn", sans-serif;
  border: none;
  box-sizing: border-box;
  transition: border-color 0.3s ease;
  font-size: 1rem;
  height: 100%;
  width: 100%;
  border-radius: 8px;
}

/* Specific Sizes */
.input-small .input-wrapper,
.input-small .input,
.input-small .input-icon-container {
  height: 36px;
}

.input-medium .input-wrapper,
.input-medium .input,
.input-medium .input-icon-container {
  height: 44px;
}

.input-large .input-wrapper,
.input-large .input,
.input-large .input-icon-container {
  height: 52px;
}

.input-icon-container {
  display: flex;
  align-items: center;
  padding: 0 12px;
  background-color: var(--color-gray-lightest);
  border-left: 1px solid var(--color-gray-lighter);
  border-radius: 0 7px 7px 0;
  height: 100%;
}

.input-icon {
  color: var(--color-gray);
  font-size: 1rem;
}

.input:focus {
  border-color: var(--color-primary);
  outline: none;
}

.input::placeholder {
  color: var(--color-gray-lighter);
  opacity: 1;
}

.input[disabled] {
  background-color: var(--color-gray-lightest);
  color: var(--color-gray-darker);
  cursor: not-allowed;
}

/* Label Styles */
.input-label {
  font-size: 1rem;
  margin-bottom: 8px;
  display: block;
  color: var(--color-gray-darker);
}

/* Styles specific to textarea */
.textarea {
  flex: 1;
  padding-right: 8px;
  font-family: "Vazirmatn", sans-serif;
  border: none;
  box-sizing: border-box;
  transition: border-color 0.3s ease;
  font-size: 1rem;
  width: 100%;
}

.textarea-small {
  height: 80px;
}

.textarea-medium {
  height: 120px;
}

.textarea-large {
  height: 160px;
}

/* Wrapper adjustments for textarea */
.textarea-wrapper {
  padding: 0; /* No extra padding around the textarea */
  height: auto;
}

/* Wrapper size classes */
.input-wrapper-small {
  height: 32px;
}

.input-wrapper-medium {
  height: 44px;
}

.input-wrapper-large {
  height: 56px;
}

.textarea-wrapper-small {
  min-height: 80px;
}

.textarea-wrapper-medium {
  min-height: 120px;
}

.textarea-wrapper-large {
  min-height: 160px;
}

/* Input error state */
.input-error {
  border-color: red;
  color: red;
  outline: none;
}

/* Error message styling */
.error-message {
  color: red;
  font-size: 0.875rem;
  margin-top: 4px;
  display: none; /* Hidden by default */
  position: absolute;
  top: 100%; /* This positions the error message below the input */
  right: 0;
  white-space: nowrap;
  transform: translateY(5px); /* Small offset for better spacing */
}

/* Icon and error styling */
.error-message-icon {
  display: flex;
  align-items: center;
}

.error-message-icon::before {
  content: "\f06a"; /* Font Awesome exclamation icon */
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  margin-left: 8px;
  font-size: 1.2rem;
  color: red;
}

/* Add relative position to the input-container (parent of the input and error message) */
.input-container {
  position: relative;
  margin-bottom: 2rem; /* Adjust this based on the desired gap between inputs */
}
