/* Auth-only outlined labels. Loaded by the login/register templates, not global bases. */
.ks-floating-field {
  --field-origin: left;
  --field-text: var(--ui-text, var(--ks-glass-text, #172238));
  --field-muted: var(--ui-muted, var(--ks-glass-muted, #56627a));
  --field-edge: var(--ui-line, var(--ks-glass-edge, rgba(83,102,154,.3)));
  --field-accent: var(--ksl-bright, var(--ks-glass-accent, #6154db));
  position: relative; isolation: isolate; width: 100%; min-width: 0; border-radius: 14px;
  box-sizing: border-box;
  color: var(--field-text); background: linear-gradient(145deg, #ffffff14, transparent 75%), var(--ks-glass-soft, #ffffff09);
  box-shadow: inset 0 1px 0 #ffffff18;
}
html[data-theme=dark] .ks-floating-field { --field-text: var(--ui-text, #eff4ff); --field-muted: var(--ui-muted, #a6b5cf); --field-accent: var(--ksl-bright, #82acff); }
/* Explicit class specificity overrides legacy input paint without affecting other controls. */
html body .ks-floating-field.ks-floating-field > .ks-floating-control.ks-floating-control {
  position: relative; z-index: 1; width: 100%; max-width: 100%; min-width: 0; min-height: 54px;
  box-sizing: border-box;
  margin: 0; padding: 14px 14px !important; border: 0 !important; border-radius: inherit; outline: none !important;
  color: var(--field-text) !important; background: transparent !important; box-shadow: none !important;
  font: inherit; font-size: 16px !important; line-height: 1.5; transform: none !important;
}
html body .ks-floating-field.ks-floating-field > select.ks-floating-control.ks-floating-control { padding-inline-end: 34px !important; }
html body .ks-floating-field.ks-floating-password > input.ks-floating-control.ks-floating-control { padding-inline-end: 48px !important; }
html body .ks-floating-textarea > textarea.ks-floating-control { min-height: 110px; resize: vertical; }
html body .ks-floating-field.ks-floating-field > label.ks-floating-label.ks-floating-label {
  position: absolute; z-index: 2; top: 50%; inset-inline-start: 14px; margin: 0; padding: 0; width: auto;
  max-width: calc(100% - 28px); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--field-muted) !important; background: none !important; font: inherit; font-size: 16px; font-weight: 400; line-height: 1.4;
  transform: translateY(-50%); transform-origin: var(--field-origin) center; transition: top .18s ease, transform .18s ease, color .18s ease;
  pointer-events: none; cursor: text;
}
html[dir=rtl] .ks-floating-field { --field-origin: right; }
html body .ks-floating-field.ks-floating-textarea > label.ks-floating-label.ks-floating-label { top: 27px; }
html body .ks-floating-field.ks-floating-password > label.ks-floating-label.ks-floating-label { max-width: calc(100% - 62px); }
html body .ks-floating-field.ks-floating-field > fieldset.ks-floating-outline {
  position: absolute; z-index: 0; inset: -11px 0 0; min-width: 0; width: auto; margin: 0; padding: 0 10px; box-sizing: border-box;
  border: 1px solid var(--field-edge) !important; border-radius: inherit; background: none !important;
  pointer-events: none; box-shadow: none; transition: border-color .18s, box-shadow .18s;
}
html body .ks-floating-outline > legend {
  float: none; display: block; width: 0; max-width: calc(100% - 8px); height: 22px; margin: 0; padding: 0;
  overflow: hidden; color: transparent !important; font: inherit; font-size: 13.12px; line-height: 22px;
  white-space: nowrap; border: 0; visibility: hidden; transition: max-width .18s ease, padding .18s ease;
}
html body .ks-floating-outline > legend span { padding: 0; }
html body .ks-floating-field.ks-floating-field:is(:focus-within,.ks-has-value) > label.ks-floating-label.ks-floating-label,
html body .ks-floating-field.ks-floating-field:has(input:-webkit-autofill) > label.ks-floating-label.ks-floating-label {
  top: 0; transform: translateY(-50%) scale(.82); max-width: calc(122% - 32px);
}
html body .ks-floating-field:is(:focus-within,.ks-has-value) > fieldset > legend,
html body .ks-floating-field:has(input:-webkit-autofill) > fieldset > legend { width: max-content; max-width: calc(100% - 8px); padding-inline: 4px; }
html body .ks-floating-field:focus-within > fieldset.ks-floating-outline { border-color: var(--field-accent) !important; box-shadow: 0 0 0 3px color-mix(in srgb,var(--field-accent) 12%,transparent); }
html body .ks-floating-field.ks-floating-field:focus-within > label.ks-floating-label.ks-floating-label { color: var(--field-accent) !important; }
html body .ks-floating-field:has(> :is(.auth-input-error,.is-invalid,[aria-invalid=true])) > fieldset.ks-floating-outline { border-color: #ed6879 !important; }
html body .ks-floating-field:has(> :disabled) { opacity: .65; }
html body .ks-floating-field.ks-floating-field > .ks-floating-control::placeholder { color: transparent !important; opacity: 0 !important; }
html body .ks-floating-field.ks-floating-field > .ks-floating-control:focus::placeholder { color: var(--field-muted) !important; opacity: .65 !important; transform: none; }
html body .auth-input-wrap.ks-floating-host { transform: none !important; filter: none !important; }
html body .ks-floating-host::after { display: none; }
html[dir=rtl] body .ks-floating-host > .auth-pw-toggle { right: auto; left: 11px; }
.ks-floating-group { flex: 1; width: auto; }
.ks-auth-label-row:has(> .auth-forgot:only-child) { justify-content: flex-end; }
html body .ks-auth-card :is(.ks-floating-field,.ks-floating-label,.ks-floating-outline,.ks-floating-control) { animation: none !important; }
.ks-hero-search > div:has(.ks-floating-field) { overflow: visible; }
.ks-hero-search .ks-floating-field { flex: 1; width: 0; background: transparent; box-shadow: none; }
@media(prefers-reduced-motion:reduce) { .ks-floating-field :is(label,fieldset,legend) { transition: none !important; } }
