/* Pallini delle azioni nella fascia delle schede di dettaglio
   (App\Filament\Support\BandActions, vista filament.scheda.band-actions;
   owner 13-nov-2026, tavole I1 e I6 variante 2 della tela «Schede di dettaglio»).
   Nessuna scritta: icona, tooltip e aria-label. */

html body .fi-header .jo-dots,
html body .fi-page .jo-ibx-head .jo-dots {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px 10px;
}

/* Pallino normale: 40px, tondo, il fondo chiaro della fascia, icona bianca. */
html body .fi-page .fi-header .jo-dots .jo-dot,
html body .fi-page .jo-ibx-head .jo-dots .jo-dot {
    position: relative;
    display: inline-grid;
    place-items: center;
    flex: none;
    width: 40px;
    height: 40px;
    margin: 0 !important;
    padding: 0;
    border: 0 !important;
    border-radius: 999px !important;
    background: var(--ds-side-active) !important;
    box-shadow: none !important;
    color: var(--ds-side-fg-strong) !important;
    cursor: pointer;
    transition: background var(--ds-motion-fast) var(--ds-ease-std);
}
html body .fi-page .fi-header .jo-dots .jo-dot:hover,
html body .fi-page .jo-ibx-head .jo-dots .jo-dot:hover { background: color-mix(in srgb, var(--ds-side-fg-strong) 24%, transparent) !important; }
html body .fi-page .fi-header .jo-dots .jo-dot:focus-visible,
html body .fi-page .jo-ibx-head .jo-dots .jo-dot:focus-visible { outline: 2px solid var(--ds-lime); outline-offset: 2px; }
html body .fi-page .fi-header .jo-dots .jo-dot .fi-icon-btn-icon,
html body .fi-page .fi-header .jo-dots .jo-dot > svg,
html body .fi-page .jo-ibx-head .jo-dots .jo-dot > svg { width: 19px; height: 19px; color: inherit !important; }
html body .fi-page .fi-header .jo-dots .jo-dot[disabled],
html body .fi-page .fi-header .jo-dots .jo-dot.fi-disabled { opacity: .45; cursor: default; }

/* «Crea»: lo stesso pallino, col «+» lime nell'angolo in alto a destra. Sempre in fondo, dopo un piccolo spazio. */
html body .fi-header .jo-dots-create,
html body .jo-ibx-head .jo-dots-create { display: flex; align-items: center; gap: 10px; margin-left: 8px; }
html body .fi-page .fi-header .jo-dots .jo-dot--new::after,
html body .fi-page .jo-ibx-head .jo-dots .jo-dot--new::after {
    content: "+";
    position: absolute;
    top: -3px;
    right: 1px;
    color: var(--ds-lime);
    font-size: 17px;
    font-weight: 700;
    line-height: 1;
    pointer-events: none;
}

/* Elimina, Revoca e le altre distruttive: pallino rosato, sempre fra le altre azioni. */
html body .fi-page .fi-header .jo-dots .jo-dot--danger {
    background: color-mix(in srgb, var(--ds-tone-danger-solid) 26%, transparent) !important;
    color: color-mix(in srgb, var(--ds-tone-danger-solid) 30%, var(--ds-side-fg-strong)) !important;
}
html body .fi-page .fi-header .jo-dots .jo-dot--danger:hover { background: color-mix(in srgb, var(--ds-tone-danger-solid) 40%, transparent) !important; }

/* Le altre azioni: escono dal pallino delle altre una dopo l'altra, la più vicina per prima, e la
   barrettina per ultima (owner 13-nov-2026, «curare le animazioni»). Lo spazio si apre col suo
   passo; ogni pallino arriva da destra con un piccolo rimbalzo. Si richiudono tutte insieme, più in
   fretta di come si aprono. */
html body .fi-header .jo-dots-hidden {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 0;
    margin-left: -10px;
    overflow: hidden;
    transition: max-width var(--ds-motion-base) var(--ds-ease-in), margin var(--ds-motion-base) var(--ds-ease-in);
}
html body .fi-header .jo-dots-hidden.is-open {
    max-width: calc(var(--jo-dots-n, 2) * 50px + 16px);
    margin-left: 0;
    transition: max-width var(--ds-motion-slow) var(--ds-ease-out), margin var(--ds-motion-slow) var(--ds-ease-out);
}
html body .fi-header .jo-dots-hidden.is-open.is-shown { overflow: visible; }
html body .fi-page .fi-header .jo-dots .jo-dots-hidden.jo-dots-hidden > * {
    opacity: 0;
    transform: translateX(14px) scale(.7);
    transition: opacity var(--ds-motion-fast) var(--ds-ease-in), transform var(--ds-motion-fast) var(--ds-ease-in);
}
html body .fi-page .fi-header .jo-dots .jo-dots-hidden.jo-dots-hidden.is-open > * {
    opacity: 1;
    transform: none;
    transition: opacity var(--ds-motion-base) var(--ds-ease-out), transform var(--ds-motion-slow) var(--ds-ease-spring);
}
html body .fi-page .fi-header .jo-dots .jo-dots-hidden.jo-dots-hidden.is-open > :nth-last-child(2) { transition-delay: 45ms; }
html body .fi-page .fi-header .jo-dots .jo-dots-hidden.jo-dots-hidden.is-open > :nth-last-child(3) { transition-delay: 90ms; }
html body .fi-page .fi-header .jo-dots .jo-dots-hidden.jo-dots-hidden.is-open > :nth-last-child(4) { transition-delay: 135ms; }
html body .fi-page .fi-header .jo-dots .jo-dots-hidden.jo-dots-hidden.is-open > :nth-last-child(5) { transition-delay: 180ms; }
html body .fi-page .fi-header .jo-dots .jo-dots-hidden.jo-dots-hidden.is-open > :nth-last-child(n+6) { transition-delay: 220ms; }
html body .fi-header .jo-dots-sep {
    flex: none;
    width: 1px;
    height: 26px;
    margin: 0 2px;
    background: color-mix(in srgb, var(--ds-side-fg-strong) 40%, transparent);
}

/* Il pallino delle altre: anello lime da 2px, senza fondo, il numero in lime; aperto, il numero
   ruota e svanisce in fretta e la «×» entra ruotando con un piccolo rimbalzo (rotate 90°→0,
   scale .4→1); l'anello prende un velo lime finché le altre sono aperte. */
html body .fi-page .fi-header .jo-dots .jo-dot.jo-dot--more {
    background: transparent !important;
    box-shadow: inset 0 0 0 2px var(--ds-lime) !important;
    color: var(--ds-lime) !important;
    font-size: 14px;
    font-weight: 700;
}
html body .fi-page .fi-header .jo-dots .jo-dot.jo-dot--more:hover,
html body .fi-page .fi-header .jo-dots .jo-dot.jo-dot--more.is-open { background: color-mix(in srgb, var(--ds-lime) 14%, transparent) !important; }
html body .fi-header .jo-dot--more > span {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
}
html body .fi-header .jo-dot--more .jo-dot-num { transition: opacity var(--ds-motion-base) var(--ds-ease-out) 60ms, transform var(--ds-motion-slow) var(--ds-ease-spring) 60ms; }
html body .fi-header .jo-dot--more .jo-dot-x { opacity: 0; transform: rotate(90deg) scale(.4); transition: opacity var(--ds-motion-fast) var(--ds-ease-in), transform var(--ds-motion-fast) var(--ds-ease-in); }
html body .fi-header .jo-dot--more .jo-dot-x svg { width: 19px; height: 19px; }
html body .fi-header .jo-dot--more.is-open .jo-dot-num { opacity: 0; transform: rotate(-90deg) scale(.4); transition: opacity var(--ds-motion-fast) var(--ds-ease-in), transform var(--ds-motion-fast) var(--ds-ease-in); }
html body .fi-header .jo-dot--more.is-open .jo-dot-x { opacity: 1; transform: rotate(0deg) scale(1); transition: opacity var(--ds-motion-base) var(--ds-ease-out) 60ms, transform var(--ds-motion-slow) var(--ds-ease-spring) 60ms; }

/* Ogni pallino risponde al tocco: si stringe appena mentre lo si preme. */
html body .fi-page .fi-header .jo-dots .jo-dot,
html body .fi-page .jo-ibx-head .jo-dots .jo-dot { transition: background var(--ds-motion-fast) var(--ds-ease-std), transform var(--ds-motion-fast) var(--ds-ease-std); }
html body .fi-page .fi-header .jo-dots .jo-dot:active:not([disabled]),
html body .fi-page .jo-ibx-head .jo-dots .jo-dot:active:not([disabled]) { transform: scale(.92); }

@media (prefers-reduced-motion: reduce) {
    html body .fi-header .jo-dots-hidden,
    html body .fi-header .jo-dots-hidden.is-open { transition: none; }
    html body .fi-header .jo-dots-hidden > *,
    html body .fi-page .fi-header .jo-dots .jo-dots-hidden.jo-dots-hidden.is-open > * { transform: none; transition: opacity .15s ease; transition-delay: 0s !important; }
    html body .fi-header .jo-dot--more > span,
    html body .fi-header .jo-dot--more.is-open > span { transform: none !important; transition: opacity .15s ease !important; }
    html body .fi-page .fi-header .jo-dots .jo-dot:active:not([disabled]),
    html body .fi-page .jo-ibx-head .jo-dots .jo-dot:active:not([disabled]) { transform: none; }
}

/* Telefono: i pallini sotto il titolo, allineati a sinistra; se non ci stanno vanno a capo. */
@media (max-width: 639px) {
    html body .fi-header .jo-dots { justify-content: flex-start; }
}

/* Posizione fissa (owner 13-nov-2026: la stessa delle liste, dove periodo e switch Lista ⇄
   Analisi stanno nell'angolo in basso a destra della fascia): in ogni scheda i pallini stanno
   nello stesso punto, in basso a destra sulla riga della descrizione (sulla riga del titolo
   quando la descrizione non c'è), qualunque sia la lunghezza del titolo; sempre nello stesso
   ordine (fuori → altre → crea). Sul telefono sotto il titolo, a sinistra. Le pagine non li spostano. */
@media (min-width: 640px) {
    html body .fi-header:has(.jo-dots) { align-items: flex-end !important; }
    html body .fi-header:has(.jo-dots) > div:first-child { flex: 1 1 auto; min-width: 0; }
    html body .fi-header:has(.jo-dots) > div:last-child { flex: none; align-self: flex-end; margin: 0 0 -6px auto !important; }
    html body .fi-header .jo-dots { flex-wrap: nowrap; }
}
@media (max-width: 639px) {
    html body .fi-header:has(.jo-dots) > div:last-child { align-self: stretch; margin-left: 0 !important; }
}

/* Scelte di valore nella fascia (Stato, Assegnato a, Acceso; owner 13-nov-2026): un pallino come gli
   altri, il valore nel tooltip; il colore della scelta in un puntino nell'angolo in basso (--jo-band-dot). */
html body .fi-page .fi-header .jo-dots .jo-dot[style*="--jo-band-dot"]::after {
    content: "";
    position: absolute;
    right: 1px;
    bottom: 1px;
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: var(--jo-band-dot);
    box-shadow: 0 0 0 2px var(--ds-side-bg-mid);
    pointer-events: none;
}

/* Le testate disegnate a mano (Inbox, .jo-ibx-head) hanno gli stessi pallini, sulla riga
   del titolo accanto al periodo e allo switch (owner 13-nov-2026, «come nelle altre testate»). */
html body .jo-ibx-head .jo-dots { flex: none; flex-wrap: nowrap; }

/* L'anello della configurazione (HasSetupProgress, owner 17-nov-2026, versione E): un pallino
   come gli altri della fascia, con l'arco lime che si riempie quanto è fatto e dentro «6/13»
   (il numero fatto in grande, il totale piccolo); aperto, il fondo lime tenue. */
html body .fi-header .jo-setup-ring {
    position: relative;
    flex: none;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: color-mix(in srgb, var(--ds-side-fg-strong) 12%, transparent);
    color: var(--ds-side-fg-strong);
    cursor: pointer;
    transition: background var(--ds-motion-fast) var(--ds-ease-std), transform var(--ds-motion-fast) var(--ds-ease-std);
}
html body .fi-header .jo-setup-ring:hover { background: color-mix(in srgb, var(--ds-side-fg-strong) 20%, transparent); }
html body .fi-header .jo-setup-ring.is-open { background: color-mix(in srgb, var(--ds-lime) 18%, transparent); }
html body .fi-header .jo-setup-ring:focus-visible { outline: 2px solid var(--ds-lime); outline-offset: 2px; }
html body .fi-header .jo-setup-ring svg { position: absolute; inset: 0; width: 40px; height: 40px; transform: rotate(-90deg); }
html body .fi-header .jo-setup-ring circle { fill: none; stroke-width: 3; }
html body .fi-header .jo-setup-ring .jo-setup-ring-track { stroke: color-mix(in srgb, var(--ds-side-fg-strong) 18%, transparent); }
html body .fi-header .jo-setup-ring .jo-setup-ring-fill { stroke: var(--ds-lime); stroke-linecap: round; filter: drop-shadow(0 0 3px color-mix(in srgb, var(--ds-lime) 55%, transparent)); }
html body .fi-header .jo-setup-ring-n { position: relative; display: inline-flex; align-items: baseline; font-variant-numeric: tabular-nums; line-height: 1; }
html body .fi-header .jo-setup-ring-n b { font-size: 13px; font-weight: 700; }
html body .fi-header .jo-setup-ring-n small { font-size: 9px; font-weight: 600; opacity: .7; }

/* Sotto la fascia la barra «Da completare» della Panoramica (setup-strip): ferma, non attaccata in cima. */
html body .jo-setup-strip .jo-strip.is-inline { position: static; box-shadow: var(--ds-shadow-rest); }

/* Il campo che manca, aperto da un passo di «Da completare» (?evidenzia=, ui-standard.js): un
   contorno viola che pulsa due volte e resta un attimo. */
html body .jo-evidenzia { border-radius: 12px; outline: 2px solid var(--ds-accent); outline-offset: 4px; animation: jo-evidenzia 1.2s var(--ds-ease-std) 2; }
@keyframes jo-evidenzia { 50% { outline-color: var(--ds-lime); outline-offset: 7px; } }
@media (prefers-reduced-motion: reduce) { html body .jo-evidenzia { animation: none; } }
