/* ShiftHR UI Kit: GLOBAL control classes (Pass B kit-controls.css), written directly in page
   markup in Web AND Admin.

   Moved from ShiftHR.Web/wwwroot/css/components.css (#1017) with every class name unchanged:
   Badge, Spinner and Skeleton. Added with them: the unavailable badge variant, the locked
   state, the padlock glyph, the not-available landing wrapper and the screen-reader-only
   helper. The CSS-only error block (shui-error-block, shui-error-text) retired (AS-C (a),
   2026-09-28): an error is Banner's Error variant or FormField's Error.

   CASCADE: Web links this file directly AFTER css/components.css, the exact position these
   rules held inside it, so the page-local .badge-* families declared earlier keep losing
   their font-size and weight to .shui-badge as before. Move the link beside kit-globals.css
   once no page pairs .shui-badge with a page-local badge family (the conformance pass;
   ShiftHR.UI/KIT_REGISTER.md). */

/* ── Badge: the eight semantic variants (Badge.razor) ─────────────────────── */
/* The badge sizes (the size scale, RULED by the owner at 03:35 on 8 November 2026; Lane KF, #1217): S,
   20px with 12px text and a 12px icon, is the default; M (Badge Size Medium, .shui-badge--md), 24px with
   13px text and a 14px icon, for a summary or a header. The icon (Badge Icon, the kit's Icon before the label)
   draws at stroke-width 2.4, so the set's 1.8 stroke holds at 12px (the pack's icon-construction.md). */
.shui-badge { display: inline-flex; align-items: center; gap: 4px; min-height: 20px; padding: 0 6px; border-radius: var(--radius-pill); font-size: var(--text-xs); font-weight: var(--font-semibold); line-height: 1.5; white-space: nowrap; }
.shui-badge > svg { width: 12px; height: 12px; flex-shrink: 0; stroke-width: 2.4; }
.shui-badge--md { min-height: 24px; padding: 0 8px; font-size: var(--text-sm); }
.shui-badge--md > svg { width: 14px; height: 14px; stroke-width: 2.2; }
.shui-badge .dot { width: 6px; height: 6px; border-radius: var(--radius-full); background: currentColor; }
.shui-badge--neutral     { background: var(--color-neutral-100);    color: var(--color-neutral-700); }
.shui-badge--culture     { background: var(--color-culture-light);  color: var(--color-culture-dark); }
.shui-badge--recognition { background: var(--color-recognition-light); color: var(--color-recognition-dark); }
.shui-badge--success     { background: var(--color-success-light);  color: var(--color-success-text); }
.shui-badge--warning     { background: var(--color-warning-light);  color: var(--color-warning-text); }
.shui-badge--error       { background: var(--color-error-light);    color: var(--color-error-text); }
.shui-badge--info        { background: var(--color-info-light);     color: var(--color-info-text); }
.shui-badge--outline     { background: transparent; border: 1px solid var(--color-border); color: var(--color-neutral-600); }
/* The outline badge on a wall panel (Badge OnWall, #1040): the wall's ink on the deep gradient, both
   themes. Text 7.3 to 9.9:1 (light) and 6.1 to 9.2:1 (dark) across the gradient's two ends; the
   border (60% ink) 3.3:1 or more. The page outline above measures 1.04:1 there. */
.shui-badge--outline.shui-badge--on-wall { border-color: color-mix(in srgb, var(--wall-ink) 60%, transparent); color: var(--wall-ink); }
/* The unavailable badge (UnavailableBadge.razor): the kit badge in the Pass B
   graceful-degradation register (the .shui-unavailable block's dashed, muted tokens). */
.shui-badge--unavailable { background: var(--unavailable-bg); border: 1px dashed var(--unavailable-border); color: var(--unavailable-text); }

/* ── Spinner (Spinner.razor) ──────────────────────────────────────────────── */
.shui-spinner { display: inline-block; width: 22px; height: 22px; border-radius: var(--radius-full); border: 2.5px solid var(--spinner-track); border-top-color: var(--spinner-head); animation: shui-spin .7s linear infinite; }
.shui-spinner--sm { width: 16px; height: 16px; border-width: 2px; }
.shui-spinner--lg { width: 34px; height: 34px; border-width: 3px; }
@keyframes shui-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .shui-spinner { animation-duration: 1.4s; } }

/* ── Skeleton / loading (Skeleton.razor) ──────────────────────────────────── */
.shui-skel { background: var(--skeleton-base); border-radius: var(--radius-sm); position: relative; overflow: hidden; }
.shui-skel::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, var(--skeleton-sheen), transparent); animation: shui-shimmer 1.4s var(--ease-standard) infinite; }
.shui-skel--text { height: .8em; margin: .25em 0; }
.shui-skel--line { height: 12px; }
.shui-skel--block { height: 64px; border-radius: var(--radius-md); }
@keyframes shui-shimmer { to { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) { .shui-skel::after { animation: none; } }

/* ── The icon set (Icon.razor; the Pass F icon pack, Lane KF #1217) ──────── */
/* An outline icon drawn inline from the kit's name-to-paths map on the 24px grid, a 1.8 stroke,
   currentColor. 16px is the default (beside 13 or 14px text, in an S button); Size steps it to 18
   (the side menu, an M button), 20 (an L button) and 24 (an empty state, a section header). A
   button's or a badge's own rule sizes an icon inside it: these rules carry one class, so they lose. */
.shui-icon { width: 16px; height: 16px; flex-shrink: 0; vertical-align: -0.125em; }
.shui-icon--md { width: 18px; height: 18px; }
.shui-icon--lg { width: 20px; height: 20px; }
.shui-icon--xl { width: 24px; height: 24px; }

/* ── Padlock (Padlock.razor): the set's lock sized to the text around it. After the icon set's rules, so its
   1em outranks the icon's 16px at the same weight (the icon move, Lane P1, #1221). ──────── */
.shui-padlock { width: 1em; height: 1em; flex-shrink: 0; }

/* ── Locked: a control or a menu item that exists but cannot be used yet
   (Locked.razor). Shown, padlocked and carrying its reason; never hidden. ──── */
.shui-locked { display: inline-flex; align-items: center; gap: var(--space-2); }
.shui-locked:focus-visible { outline: 2px solid var(--color-culture); outline-offset: 2px; }
/* The inert form is an inactive control (WCAG 1.4.3's exception), so it may dim. */
button.shui-locked { cursor: not-allowed; opacity: .6; }
/* The menu-item form still opens its page, so it is live: a pointer, and its label at the full ink
   of the control it stands in for, no dim (#1045: .75 read 2.8:1 in light). The padlock says locked. */
.shui-locked--link { cursor: pointer; }
/* The still inert form (Locked Still, DOOR Q3 (a)): the wrapper takes the pointer, its tooltip and the
   not-allowed cursor, and the button inside takes none, so no :hover or :active rule of the look it wears
   (the kit's or a host's, the public call-to-action's inverse button among them) ever reaches it. */
.shui-locked-still { display: inline-flex; cursor: not-allowed; }
.shui-locked-still > button.shui-locked { pointer-events: none; }

/* ── Not-available landing page (NotAvailablePage.razor) ──────────────────── */
.shui-not-available { margin-top: var(--space-6); }

/* ── Screen-reader-only text (the reason a badge or a lock carries) ───────── */
.shui-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
