/* ==========================================================================
   AllTax V2 — Demo Avatar: stili highlight + overlay (modalità dimostrativa)
   Standard cross-suite AgileHub `product-demo-protocol` v1.0.1
   Caricato solo quando la SPA è in demo-mode (?demo=<id>). Usa i token V2.
   ========================================================================== */

/* Highlight: pulse-blue (default focus) */
.demo-highlight-pulse-blue {
    animation: demoPulseBlue 1.4s ease-in-out infinite;
    border-radius: var(--radius, 10px);
    outline: 2px solid var(--bi-primary, #0066CC);
    outline-offset: 2px;
}
@keyframes demoPulseBlue {
    0%, 100% { box-shadow: 0 0 0 0 rgba(0, 102, 204, 0.45); }
    50%      { box-shadow: 0 0 0 8px rgba(0, 102, 204, 0); }
}

/* Highlight: halo (alone morbido) */
.demo-highlight-halo {
    box-shadow: 0 0 0 4px rgba(0, 102, 204, 0.18), 0 0 22px 4px rgba(0, 102, 204, 0.35);
    border-radius: var(--radius, 10px);
    transition: box-shadow .25s ease;
}

/* Highlight: flash (lampo breve) */
.demo-highlight-flash {
    animation: demoFlash 0.9s ease-in-out 2;
    border-radius: var(--radius, 10px);
}
@keyframes demoFlash {
    0%, 100% { background-color: transparent; }
    50%      { background-color: rgba(0, 102, 204, 0.14); }
}

/* Highlight: outline (contorno fisso) */
.demo-highlight-outline {
    outline: 3px dashed var(--bi-primary, #0066CC);
    outline-offset: 3px;
    border-radius: var(--radius, 10px);
}

/* Overlay testuale (show_overlay_text) */
.demo-overlay-text {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    max-width: min(680px, 92vw);
    z-index: 4000;
    background: rgba(17, 24, 39, 0.94);
    color: #fff;
    font-family: var(--font-sans, system-ui, sans-serif);
    font-size: .95rem;
    line-height: 1.45;
    padding: 14px 20px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    display: none;
}
.demo-overlay-text[data-pos="bottom"] { bottom: 24px; }
.demo-overlay-text[data-pos="top"]    { top: 84px; }

/* Banner discreto "modalità dimostrativa" */
body.demo-mode::before {
    content: "Modalità dimostrativa — dati del Comune Valdemo, sola lettura";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 3900;
    text-align: center;
    font-family: var(--font-sans, system-ui, sans-serif);
    font-size: .76rem;
    font-weight: 600;
    letter-spacing: .02em;
    color: #fff;
    background: linear-gradient(90deg, #0066CC, #6D28D9);
    padding: 3px 8px;
    pointer-events: none;
}
body.demo-mode .topbar { margin-top: 20px; }

@media (prefers-reduced-motion: reduce) {
    .demo-highlight-pulse-blue,
    .demo-highlight-flash { animation: none; }
}
