/* Copyright (c) 2026 Lorenzo Cabra. MIT License. See BENCHO-LICENSE.txt.
 * Trillax adaptation: responsive dimensions, native controls and accessible names.
 * Original comments and code preserved in ./bencho/LabelInput.original.css. */
.demo-form .lbi{--lbi-on:#f7f5ee;--lbi-surface:#171917;--lbi-quiet:#bcbeb4;--lbi-focus:var(--gold);position:relative;font-family:inherit;padding-top:12px}
.demo-form .lbi-box{position:relative;background:transparent;cursor:text;height:56px;border-radius:14px}
.demo-form .lbi-multiline{height:136px}
.demo-form .field-hint{display:block;margin:8px 0 0 18px;font-size:13px;line-height:1.5;color:var(--lbi-quiet)}
/* The outline is always whole. Focus changes its ink; only the notch moves. */
.lbi-ring{position:absolute;inset:0;width:100%;height:100%;overflow:visible;pointer-events:none}
.lbi-ring path{fill:none;stroke:#777d71;stroke-width:1;stroke-linecap:butt;transition:stroke 220ms ease,stroke-width 220ms ease}
.lbi[data-focus="true"] .lbi-ring path{stroke:var(--lbi-focus);stroke-width:1.5}
/* The gap is two halves from the middle to each side, retracted by a negative
   dash offset: 0 is the whole line and -1 is none of it. */
.lbi-ring .lbi-gap{stroke-dasharray:1 2;stroke-dashoffset:0;transition:stroke 220ms ease,stroke-width 220ms ease,stroke-dashoffset 420ms cubic-bezier(.22,1,.36,1)}
.lbi[data-up="true"] .lbi-gap,.lbi:has(:autofill) .lbi-gap{stroke-dashoffset:-1}
.demo-form .lbi-label{position:absolute;z-index:1;left:18px;top:28px;margin:0;font-size:16px;font-weight:400;line-height:1;letter-spacing:-.01em;white-space:pre;color:var(--lbi-quiet);transform-origin:left center;transform:translateY(-50%);transition:transform 420ms cubic-bezier(.22,1,.36,1),color 220ms ease;cursor:text;user-select:none}
.demo-form .lbi[data-up="true"] .lbi-label,.demo-form .lbi:has(:autofill) .lbi-label{transform:translateY(-50%) translateY(-28px) scale(.82);color:var(--lbi-quiet)}
.demo-form .lbi[data-focus="true"] .lbi-label{color:var(--lbi-focus)}
.demo-form .lbi-label .lbi-letters{color:inherit;font-size:inherit}
.lbi-letters>span{display:inline-block;font:inherit;color:inherit}
/* The hop: each letter lifts a hair and settles, one after the next.
   Delay is capped after 15 characters so Spanish labels never feel slow. */
.lbi[data-focus="true"] .lbi-letters>span{animation:lbi-hop 460ms cubic-bezier(.3,.7,.3,1) both;animation-delay:calc(var(--i)*24ms)}
.lbi-accessible{position:absolute!important;display:block!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.demo-form .field .lbi-field{position:absolute;inset:0;width:100%;height:100%;min-height:0;padding:0 18px;border:0;border-radius:inherit;background:transparent;color:var(--lbi-on);font:inherit;font-size:16px;letter-spacing:-.01em;box-shadow:none}
.demo-form .field textarea.lbi-field{padding-top:17px;padding-bottom:17px;resize:none;overflow:auto}
.demo-form .field select.lbi-field{padding-right:36px;cursor:pointer}
.demo-form select.lbi-field option{color:var(--lbi-on);background:var(--lbi-surface)}
.demo-form .lbi-field::placeholder{color:transparent}
.demo-form .lbi[data-focus="true"] .lbi-field::placeholder{color:#92988a}
.demo-form .lbi-field:focus{background:transparent;box-shadow:none;outline:none}
.demo-form .lbi-field:focus-visible{outline:2px solid var(--gold);outline-offset:4px}
.demo-form .lbi-field:autofill{box-shadow:0 0 0 80px var(--lbi-surface) inset;-webkit-text-fill-color:var(--lbi-on);caret-color:var(--lbi-on)} /* taste-skill-ignore: inset fill keeps browser autofill legible, not an elevation shadow */
@keyframes lbi-hop{0%,100%{transform:translateY(0)}38%{transform:translateY(-3px)}}
@media(prefers-reduced-motion:reduce){.lbi-ring path,.lbi-ring .lbi-gap,.demo-form .lbi-label{transition:none}.lbi[data-focus="true"] .lbi-letters>span{animation:none}}
@media(forced-colors:active){.demo-form .lbi-box{outline:1px solid CanvasText}.lbi-ring path{stroke:CanvasText}.demo-form .lbi-label{background:Canvas;color:CanvasText}.demo-form .lbi-field{color:CanvasText}.demo-form .lbi-field:focus-visible{outline-color:Highlight}}
