.custom-input-wrapper {
  /* Provide global wrapper context if needed; otherwise remove */
}

.custom-input {
  position: relative;
  width: 100%;
  margin-bottom: 16px;
}

.custom-input.has-error .custom-input-container {
  border-color: #dc3545;
}

.custom-input.disabled {
  opacity: 1; /* Keep text readable */
  cursor: not-allowed;
}

.custom-input.disabled .custom-input-container {
  background-color: #f8f9fa; /* Light gray background */
  border-color: #d1d5db; /* Soft border */
  pointer-events: none;
}

.custom-input.disabled .custom-input-element {
  background-color: transparent;
  color: rgba(33, 37, 41, 0.5); /* Grayish text color */
  cursor: not-allowed;
}

.custom-input.disabled .custom-input-label {
  color: rgba(33, 37, 41, 0.5); /* Grayish label */
}

.custom-input.disabled .custom-input-icon-left,
.custom-input.disabled .custom-input-icon-right {
  color: #9ca3af; /* Dim icons */
  pointer-events: none;
}

.custom-input-container {
  position: relative;
  min-height: 30px;
  background-color: white;
  border: 1px solid #ced4da;
  border-radius: 0.375rem;
  display: flex;
  align-items: center;
  padding: 4px 6px;
}

/* Focus ring on container */
.custom-input-container:focus-within:not(.disabled) {
  border-color: #0d6efd;
  box-shadow: 0 0 0 1px #0d6efd;
  outline: none;
}

.custom-input-label {
  display: block;
  color: #374151;
}

.custom-input.disabled .custom-input-label-floating,
.custom-input.disabled .custom-input-label {
  color: rgba(33, 37, 41, 0.5);
}

.custom-input-required-asterisk {
  color: red;
  margin-left: 2px;
}

.custom-input-label-floating {
  position: absolute;
  top: 50%;
  left: 8px;
  transform: translateY(-55%);
  pointer-events: none;
  transition: 0.2s ease all;
  font-size: 0.875rem;
  color: black;
  margin-bottom: 0;
}

.custom-input-label-floating.floated {
  top: 0;
  background-color: white;
  padding: 0 5px;
  border-radius: 5px;
}

.custom-input.disabled .custom-input-label-floating.floated {
  background-color: gray;
}

.custom-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.custom-input-element {
  flex: 1;
  border: none;
  padding: 2px 4px;
  font-size: 0.75rem;
  background: transparent;
  min-height: 24px;
}

.custom-input-element:focus {
  outline: none;
}

.custom-input-icon-left,
.custom-input-icon-right {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  font-size: 0.875rem;
}

.custom-input-icon-left {
  left: 6px;
}

.custom-input-icon-right {
  right: 6px;
  pointer-events: auto;
}

.with-icon-left {
  padding-left: 1.5rem !important;
}
.with-icon-right {
  padding-right: 1.5rem !important;
}

.custom-input-error-text {
  color: #dc3545;
  text-align: end;
  font-size: 12px;
  margin-top: 4px;
  margin-bottom: 8px;
}

.custom-input-helper-text {
  color: #6b7280;
  font-size: 0.75rem;
  margin-top: 0.25rem;
}

.custom-input.small .custom-input-element {
  font-size: 0.7rem;
  padding: 2px 4px;
}

.custom-input.medium .custom-input-element {
  font-size: 0.75rem;
  padding: 4px 6px;
}

.custom-input.large .custom-input-element {
  font-size: 0.875rem;
  padding: 3px 6px;
}

.custom-input.outlined .custom-input-container {
  /* "outlined" might be the default so no changes needed here. */
}

.custom-input.filled .custom-input-container {
  background-color: #f3f4f6;
  border: none;
}

.custom-input.standard .custom-input-container {
  border: none;
  border-bottom: 1px solid #495057;
  border-radius: 0;
}

.custom-input.has-error .custom-input-label {
  color: #dc3545;
}
