/*  ═══════════════════════════════════════════════════════
    AcusMagic — BASE GLOBALE (carica su OGNI pagina, subito
    dopo tokens.css). Ciò che nessuna pagina deve dimenticare:
    focus visibili, reduced-motion, selezione, tap target.
    ═══════════════════════════════════════════════════════ */

/* Focus visibile ovunbque — oro, mai soppresso */
:focus-visible {
    outline: 2px solid var(--ax-gold-bright);
    outline-offset: 3px;
    border-radius: 2px;
}
/* niente doppio anello per chi clicca col mouse */
:focus:not(:focus-visible) { outline: none; }

::selection { background: rgba(201, 168, 76, 0.28); color: #fff; }

/* Reduced motion: tutto si ferma, nessuna eccezione */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}

/* Tap target minimi sui controlli nudi */
button, [role="button"], input[type="submit"] { min-height: 44px; }
.am-fx-switch button { min-height: 34px; min-width: 44px; } /* gruppo compatto: area estesa dal contenitore */

/* Stati bottone universali: il submit non è mai muto */
button[disabled], .btn[disabled], .am-btn[disabled],
button[aria-busy="true"], .btn[aria-busy="true"], .am-btn[aria-busy="true"] {
    opacity: 0.6;
    cursor: progress;
}
.is-loading { position: relative; pointer-events: none; }
.is-loading::after {
    content: "";
    display: inline-block;
    width: 0.9em; height: 0.9em;
    margin-left: 0.55em;
    vertical-align: -0.12em;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: ax-spin 0.7s linear infinite;
}
@keyframes ax-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
    .is-loading::after { animation: none; border-right-color: currentColor; opacity: 0.4; }
}

/* Immagini/video: mai overflow, mai CLS da dimensioni mancanti */
img, video { max-width: 100%; height: auto; }
