/* BaseInput Component Styles */

.mint-input {
  display: block;
  width: 100%;
  font-family: inherit;
  font-size: 0.875rem;
  line-height: 1.25;
  color: var(--text-primary);
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  box-sizing: border-box;
}

.mint-input::placeholder {
  color: var(--text-muted);
}

.mint-input:hover:not(:focus):not(.mint-input--disabled):not(.mint-input--error):not(:disabled) {
  border-color: var(--_field-border-hover);
}

.mint-input:focus,
.mint-input:focus-visible {
  border-color: var(--color-primary);
  box-shadow: var(--focus-ring-soft);
}

.mint-input--error {
  border-color: var(--mint-error);
}

.mint-input--error:focus,
.mint-input--error:focus-visible {
  box-shadow: var(--focus-ring-soft-error);
}

.mint-input--disabled,
.mint-input:disabled {
  background-color: var(--bg-tertiary);
  color: var(--text-muted);
  cursor: not-allowed;
}

/* Size variants */
.mint-input--sm {
  padding: 0.375rem 0.625rem;
  font-size: 0.8125rem;
  min-height: var(--form-height-sm);
}

.mint-input--md {
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  min-height: var(--form-height-md);
}

.mint-input--lg {
  padding: 0.75rem 1rem;
  font-size: 1rem;
  min-height: var(--form-height-lg);
}

/* Prefix / suffix group (1e). The group owns border, hover, focus, error and
   disabled; the inner input is borderless. Segments: --bg-primary, hairline
   divider, mono 12px — the same unit look UnitInput uses (4b). */
.mint-input-group {
  display: flex;
  align-items: stretch;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.mint-input-group--sm { min-height: var(--form-height-sm); }
.mint-input-group--md { min-height: var(--form-height-md); }
.mint-input-group--lg { min-height: var(--form-height-lg); }

.mint-input-group:hover:not(:focus-within):not(.mint-input-group--disabled):not(.mint-input-group--error) {
  border-color: var(--_field-border-hover);
}

.mint-input-group:focus-within {
  border-color: var(--color-primary);
  box-shadow: var(--focus-ring-soft);
}

.mint-input-group--error {
  border-color: var(--mint-error);
}

.mint-input-group--error:focus-within {
  box-shadow: var(--focus-ring-soft-error);
}

.mint-input-group--disabled {
  background-color: var(--bg-tertiary);
  cursor: not-allowed;
}

.mint-input.mint-input-group__control {
  flex: 1;
  min-width: 0;
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.mint-input-group__prefix,
.mint-input-group__suffix {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  padding: 0 0.625rem;
  background-color: var(--bg-primary);
  color: var(--text-secondary-strong);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  white-space: nowrap;
}

/* Prefix is a bare leading glyph (search icon, currency), not a shaded segment. */
.mint-input-group__prefix {
  padding: 0 0 0 0.625rem;
  background-color: transparent;
  color: var(--text-secondary);
}

.mint-input-group__prefix svg {
  width: 14px;
  height: 14px;
}

.mint-input-group__prefix + .mint-input.mint-input-group__control {
  padding-left: 0.5rem;
}

.mint-input-group__suffix {
  border-left: 1px solid var(--border-light);
}

.mint-input-group--disabled .mint-input-group__prefix,
.mint-input-group--disabled .mint-input-group__suffix {
  color: var(--text-muted);
}
