/* Spinner + busy state styles for runBusy / dsBusy helpers
* defined in static/js/app.js. Kept in a standalone file so we don't
* have to rebuild the Tailwind bundle for runtime changes. */
/* Alpine.js requires this rule to hide [x-cloak] elements until the
* framework boots, otherwise they flash visible. Used by the scenarios
* wizard (step 2/3 panels) and any future Alpine-driven UI. */
[x-cloak] { display: none !important; }
.ds-spinner {
display: inline-block;
width: 14px;
height: 14px;
border-radius: 50%;
border: 2px solid currentColor;
border-right-color: transparent;
animation: ds-spinner-rotate 0.7s linear infinite;
vertical-align: -2px;
margin-right: 6px;
flex: 0 0 auto;
}
.ds-spinner--lg {
width: 28px;
height: 28px;
border-width: 3px;
margin-right: 10px;
vertical-align: -8px;
}
.ds-busy-label {
display: inline-block;
vertical-align: baseline;
}
@keyframes ds-spinner-rotate {
to { transform: rotate(360deg); }
}
button[aria-busy="true"] {
cursor: progress;
opacity: 0.8;
}
/* Page-level overlay used by window.dsBusy.show()/.hide(). */
.ds-page-overlay {
position: fixed;
inset: 0;
z-index: 9999;
display: none;
align-items: center;
justify-content: center;
background: rgba(15, 17, 22, 0.42);
backdrop-filter: blur(2px);
-webkit-backdrop-filter: blur(2px);
}
.ds-page-overlay.is-visible {
display: flex;
}
.ds-page-overlay__panel {
display: flex;
align-items: center;
gap: 12px;
padding: 16px 22px;
border-radius: 8px;
background: hsl(var(--background, 0 0% 100%));
color: hsl(var(--foreground, 222 47% 11%));
box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
font-size: 0.95rem;
font-weight: 500;
}
/* Row-action ghost buttons (small) need a visible affordance: in data
* tables they were rendering as plain text (no border, no background),
* making them easy to miss. We give them a subtle outline that becomes
* more prominent on hover/focus. Scoped to `--sm` so we don't affect
* larger ghost buttons used as section actions in headers. */
.cds--btn.cds--btn--ghost.cds--btn--sm {
border: 1px solid hsl(var(--border, 220 14% 90%));
background: hsl(var(--background, 0 0% 100%));
}
.cds--btn.cds--btn--ghost.cds--btn--sm:hover {
border-color: hsl(var(--accent-foreground, 220 9% 35%) / 0.4);
}
.cds--btn.cds--btn--ghost.cds--btn--sm:focus-visible {
outline: 2px solid hsl(var(--ring, 222 84% 60%));
outline-offset: 2px;
}
/* Inline progress hint inside form sections — used by validate flow
* when the operator is waiting for a long server-side parse. */
.ds-inline-progress {
display: flex;
align-items: center;
gap: 10px;
padding: 12px 14px;
border: 1px dashed hsl(var(--border, 220 14% 90%));
border-radius: 8px;
background: hsl(var(--muted, 220 14% 96%) / 0.45);
font-size: 0.9rem;
color: hsl(var(--muted-foreground, 220 9% 46%));
}
.ds-inline-progress[hidden] { display: none !important; }
/* The bundled `.ds-checkbox` rule (design/entry.css) uses Tailwind's
* `data-[state=checked]:bg-primary` arbitrary variant — that's a
* Radix-state attribute pattern and never fires on plain HTML
* . Result: native checkboxes show only
* the small CSS `::after` checkmark with no fill, which reads as
* "broken" to operators. We add a real `:checked` background fill +
* hover affordance here so the native control is unambiguously on/off
* without rebuilding the Tailwind bundle. */
.ds-checkbox:checked {
background-color: hsl(var(--primary, 222 47% 50%));
border-color: hsl(var(--primary, 222 47% 50%));
}
.ds-checkbox:checked::after {
border-color: hsl(var(--primary-foreground, 0 0% 100%));
}
.ds-checkbox:hover:not(:disabled) {
border-color: hsl(var(--primary, 222 47% 50%));
}
/* ===================================================================
* Button + input size normalization
* ===================================================================
*
* Il bundle (design/legacy-shim.css) definisce `cds--btn--sm` come
* h-8 (32px) e `cds--btn--icon-only` come h-10 w-10 (40px). Quando
* un button ha entrambe le classi (es. il kebab "Altre azioni" nelle
* tabelle: `cds--btn cds--btn--ghost cds--btn--sm cds--btn--icon-only`)
* la cascade ordina --sm prima e --icon-only dopo → l'icon-only vince e
* il button è 40px alto, mentre la primary CTA "Riesegui" accanto è
* `cds--btn cds--btn--primary cds--btn--sm` → 32px. 8px di scarto
* visibile. Stesso problema con --tertiary --sm + --icon-only.
*
* Convenzione del progetto:
* - default (`cds--btn`) = 40px alto, padding 16px, testo 14px
* - small (`cds--btn--sm`) = 32px alto, padding 12px, testo 12px
* - icon-only square = stesso h della modifier-size, padding 0
*
* Le regole sotto forzano la convenzione tramite specificità più alta
* (compound selector `.cds--btn--sm.cds--btn--icon-only`). Niente
* !important: gli inline style runtime (es. width:80px) restano liberi
* di override.
*/
/* Icon-only piccolo = quadrato 32px (matches --sm text button) */
.cds--btn.cds--btn--sm.cds--btn--icon-only {
height: 2rem; /* 32px = h-8 */
width: 2rem;
padding: 0;
min-height: 2rem;
}
/* Icon-only default = quadrato 40px (matches default text button) */
.cds--btn.cds--btn--icon-only:not(.cds--btn--sm) {
height: 2.5rem; /* 40px = h-10 */
width: 2.5rem;
padding: 0;
}
/* Inputs accanto a button --sm: forza h-8 quando hanno la classe
* `--sm-input` (opt-in, non rompe gli input esistenti). Evita l'8px di
* scarto verticale tra `` (h-10) e
* `