/* Beta Sigma Design System -- <bs-input> (P2-S9).
   docs/frontend/FROZEN_MIGRATION_PLAN.md §8.2.8. Design System
   Beta_Sigma_Design_System_v1.0.html §12.2 (Inputs) -- Text Input's own
   exact row: "label + field + helper/error", states
   "default/focus/filled/error/disabled", "height 40px md, radius-md, mono
   para campos numericos".

   Every ordinary selector is scoped beneath the bs-input custom-element
   tag -- light DOM has no encapsulation, so a bare `input {}`/`label {}`
   would leak onto every matching element on the page.

   Label typography is DS §07's own literal "Label" row (Rotulo de
   campo). Field padding is DS §08's own literal "space-3" row (Padding
   interno de input). Helper/error typography reuses the same "Body
   Small" row already established for <bs-empty>/<bs-error>. No hover
   state exists -- the DS's own states list for Text Input omits one.
   Focus reuses the identical outline mechanism already shipped for
   <bs-button>; disabled reuses its identical opacity/cursor mechanism.
   box-sizing: border-box already applies globally via base.css's own
   frozen reset, not redeclared here. */

bs-input {
  display: block;
}

bs-input .bs-input__label {
  display: block;
  margin-bottom: var(--bs-space-2);
  font-family: var(--bs-font-body);
  font-weight: 700;
  font-size: 11px;
  line-height: 1.3;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--bs-color-text-secondary);
}

bs-input .bs-input__control {
  width: 100%;
  height: 40px;
  padding: 0 var(--bs-space-3);
  border: 1px solid var(--bs-color-border);
  border-radius: var(--bs-radius-md);
  background: var(--bs-color-surface);
  color: var(--bs-color-text-primary);
  font-family: var(--bs-font-body);
  font-size: 14px;
  transition: border-color var(--bs-motion-fast) var(--bs-ease-standard);
}

bs-input .bs-input__control:focus-visible {
  outline: 2px solid var(--bs-color-accent);
  outline-offset: 2px;
}

bs-input .bs-input__control:disabled {
  cursor: not-allowed;
  opacity: .5;
}

bs-input[type="number"] .bs-input__control {
  font-family: var(--bs-font-mono);
  font-variant-numeric: tabular-nums;
}

bs-input .bs-input__helper {
  margin-top: var(--bs-space-2);
  font-family: var(--bs-font-body);
  font-weight: 400;
  font-size: 13px;
  line-height: 1.5;
  color: var(--bs-color-text-muted);
}

bs-input[error] .bs-input__helper {
  color: var(--bs-hot-500);
}
