/* Conferma dopo l'invio del modulo: il timbro della credenziale batte sulla pagina */
#dom-fatto, #isc-fatto { position: relative; }
#dom-fatto::before, #isc-fatto::before {
  content: ""; position: absolute; top: clamp(18px, 4vw, 34px); right: clamp(18px, 4vw, 34px); width: 92px; height: 92px; border-radius: 50%;
  border: 3px solid #6C1F2C; background: url(img/logo-assalto.png) center / 66% no-repeat; opacity: .88; transform: rotate(-9deg);
  box-shadow: inset 0 0 0 5px color-mix(in srgb, #6C1F2C 14%, transparent);
  animation: timbra .75s cubic-bezier(.2, 1.5, .4, 1) .15s both;
}
#dom-fatto::after, #isc-fatto::after {
  content: ""; position: absolute; top: clamp(18px, 4vw, 34px); right: clamp(18px, 4vw, 34px); width: 92px; height: 92px; border-radius: 50%;
  border: 2px solid #6C1F2C; pointer-events: none; animation: onda 1s ease-out .55s both;
}
@keyframes timbra {
  0% { opacity: 0; transform: translateY(-34px) scale(1.7) rotate(-22deg); }
  60% { opacity: .95; transform: translateY(0) scale(.94) rotate(-9deg); }
  100% { opacity: .88; transform: rotate(-9deg); }
}
@keyframes onda { 0% { opacity: .55; transform: scale(1); } 100% { opacity: 0; transform: scale(1.9); } }
#dom-fatto > h2, #isc-fatto > h2 { padding-right: 104px; }
@media (max-width: 620px) {
  #dom-fatto::before, #isc-fatto::before, #dom-fatto::after, #isc-fatto::after { width: 64px; height: 64px; }
  #dom-fatto > h2, #isc-fatto > h2 { padding-right: 76px; }
}
@media (prefers-reduced-motion: reduce) { #dom-fatto::before, #isc-fatto::before { animation: none; } #dom-fatto::after, #isc-fatto::after { display: none; } }

/* 21/11/2026 (richiesta dell'utente): l'avviso che conferma l'iscrizione. Scende dall'alto con un piccolo rimbalzo,
   il cerchio e la spunta si disegnano, partono pochi coriandoli nei colori del logo, una linea si accorcia
   e dopo cinque secondi l'avviso risale e sparisce (si chiude anche con la ×). */
.avviso-ok { position: fixed; z-index: 60; left: 50%; top: max(14px, env(safe-area-inset-top, 0px));
  width: min(420px, calc(100% - 28px)); display: grid; grid-template-columns: 46px minmax(0, 1fr) 36px; align-items: center; gap: 12px;
  padding: 14px 10px 16px 14px; border-radius: 18px; overflow: visible;
  background: var(--panel); color: var(--fg); border: 1px solid var(--line); box-shadow: 0 22px 44px -18px rgba(43, 21, 10, .55);
  transform: translate(-50%, calc(-100% - 30px)); opacity: 0; transition: transform .6s cubic-bezier(.2, 1.35, .4, 1), opacity .3s ease; }
.avviso-ok.su { transform: translate(-50%, 0); opacity: 1; }
.avviso-ok.via { transform: translate(-50%, calc(-100% - 30px)); opacity: 0; transition: transform .4s cubic-bezier(.5, 0, .8, .4), opacity .35s ease .05s; }
.av-icona { width: 46px; height: 46px; }
.av-icona svg { width: 100%; height: 100%; display: block; }
.av-cerchio { fill: color-mix(in srgb, var(--lago) 14%, transparent); stroke: var(--lago); stroke-width: 3; stroke-dasharray: 145; stroke-dashoffset: 145; }
.av-spunta { fill: none; stroke: var(--lago-testo); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 36; stroke-dashoffset: 36; }
.avviso-ok.attesa .av-cerchio { stroke: var(--sole); fill: color-mix(in srgb, var(--sole) 18%, transparent); }
.avviso-ok.attesa .av-spunta { stroke: var(--fg); }
.avviso-ok.su .av-cerchio { animation: av-disegna .55s ease-out .35s forwards; }
.avviso-ok.su .av-spunta { animation: av-disegna .35s ease-out .8s forwards; }
@keyframes av-disegna { to { stroke-dashoffset: 0; } }
.av-testo { display: grid; gap: 2px; min-width: 0; }
.av-testo b { font-family: var(--display); font-weight: 600; font-size: 24px; line-height: 1.05; letter-spacing: .01em; }
.av-testo span { font-size: 14.5px; color: var(--muted); line-height: 1.35; }
.av-x { width: 36px; height: 36px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer; align-self: start; }
.av-x:hover { background: var(--panel2); color: var(--fg); }
.av-tempo { position: absolute; left: 18px; right: 18px; bottom: 7px; height: 3px; border-radius: 3px; background: var(--lago); opacity: .5; transform-origin: left; }
.avviso-ok.attesa .av-tempo { background: var(--sole); }
.avviso-ok.su .av-tempo { animation: av-tempo 4.6s linear .6s both; }
@keyframes av-tempo { from { transform: scaleX(1); } to { transform: scaleX(0); } }
.av-coriandoli { position: absolute; left: 37px; top: 37px; width: 0; height: 0; pointer-events: none; }
.av-coriandoli i { position: absolute; width: 7px; height: 7px; border-radius: 2px; opacity: 0; }
.av-coriandoli i:nth-child(3n+1) { background: var(--sole); }
.av-coriandoli i:nth-child(3n+2) { background: var(--lago); }
.av-coriandoli i:nth-child(3n) { background: #6C1F2C; border-radius: 50%; width: 6px; height: 6px; }
.avviso-ok.attesa .av-coriandoli { display: none; }
.avviso-ok.su .av-coriandoli i { animation: av-scoppio .9s cubic-bezier(.15, .8, .3, 1) 1s both; }
.av-coriandoli i:nth-child(1) { --x: -30px; --y: -26px; --r: 120deg; }
.av-coriandoli i:nth-child(2) { --x: 0px; --y: -38px; --r: -80deg; }
.av-coriandoli i:nth-child(3) { --x: 14px; --y: -34px; --r: 200deg; }
.av-coriandoli i:nth-child(4) { --x: -36px; --y: 8px; --r: -150deg; }
.av-coriandoli i:nth-child(5) { --x: 10px; --y: 34px; --r: 90deg; }
.av-coriandoli i:nth-child(6) { --x: -8px; --y: 40px; --r: -220deg; }
.av-coriandoli i:nth-child(7) { --x: -30px; --y: 30px; --r: 160deg; }
.av-coriandoli i:nth-child(8) { --x: -40px; --y: -8px; --r: -110deg; }
.av-coriandoli i:nth-child(9) { --x: -16px; --y: -40px; --r: 60deg; }
@keyframes av-scoppio {
  0% { opacity: 1; transform: translate(-50%, -50%) scale(.4) rotate(0); }
  70% { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y) + 10px)) scale(1) rotate(var(--r)); }
}
@media (prefers-reduced-motion: reduce) {
  .avviso-ok, .avviso-ok.via { transition: opacity .2s ease; transform: translate(-50%, 0); }
  .av-cerchio, .av-spunta { stroke-dashoffset: 0; animation: none !important; }
  .av-coriandoli { display: none; }
}
/* la pagina con i passi successivi sale piano sotto l'avviso */
#isc-fatto:not([hidden]) { animation: av-sale .6s ease-out both; }
@keyframes av-sale { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { #isc-fatto:not([hidden]) { animation: none; } }
