/* Ludi Sport Solimeo — invito a mettere l'app Ludisport sulla Home (banner, pulsante "App", finestra con i passaggi). */

/* ---------- pulsante "App" nella barra ---------- */
.barra-app {
  flex: none; display: inline-flex; align-items: center; gap: 6px; height: 42px; padding: 0 14px 0 11px;
  border-radius: 999px; border: 1px solid var(--linea); background: #fff; color: var(--blu-notte);
  font-weight: 800; font-size: 14px; box-shadow: 0 4px 12px rgba(10, 47, 110, .12);
  transition: transform .2s, box-shadow .2s;
}
.barra-app:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(10, 47, 110, .18); }
.barra-app svg { width: 19px; height: 19px; color: var(--arancio); }

/* ---------- banner che scende dall'alto ---------- */
.invito-app {
  position: fixed; z-index: 19; left: 50%; top: calc(var(--barra-h) + 26px);
  width: min(560px, calc(100% - 28px));
  display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 10px;
  border-radius: 20px; color: #fff; overflow: hidden;
  /* arancione acceso, si stacca dal blu del sito */
  background: linear-gradient(115deg, #ff9a2e 0%, #f47b20 40%, #e8501a 100%);
  border: 1px solid rgba(255, 220, 170, .7);
  box-shadow: 0 16px 40px rgba(232, 80, 26, .55), 0 0 0 4px rgba(255, 154, 46, .22), inset 0 1px 0 rgba(255, 255, 255, .45);
  transform: translate(-50%, -24px); opacity: 0; transition: transform .45s cubic-bezier(.2, .9, .3, 1.2), opacity .35s;
}
.invito-app.visibile { transform: translate(-50%, 0); opacity: 1; animation: invito-alone 2.4s ease-in-out infinite; }
@keyframes invito-alone {
  50% { box-shadow: 0 16px 40px rgba(232, 80, 26, .6), 0 0 0 8px rgba(255, 154, 46, .3), inset 0 1px 0 rgba(255, 255, 255, .45); }
}
.invito-app::before {
  /* riflesso di luce che attraversa il banner ogni pochi secondi */
  content: ""; position: absolute; top: -20%; bottom: -20%; left: -40%; width: 35%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .55), transparent);
  transform: skewX(-18deg); pointer-events: none; animation: invito-luccica 3.2s ease-in-out .8s infinite;
}
@keyframes invito-luccica { 0% { left: -40%; } 45%, 100% { left: 130%; } }
.invito-app > * { position: relative; }
.invito-icona {
  position: relative; flex: none; width: 48px; height: 48px; border-radius: 12px; background: #fff;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .25); animation: invito-salta 2.6s ease-in-out 1.4s 2;
}
@keyframes invito-salta { 0%, 100% { transform: translateY(0); } 15% { transform: translateY(-6px); } 30% { transform: translateY(0); } }
.invito-testo { flex: 1; min-width: 0; display: grid; gap: 2px; line-height: 1.25; }
.invito-testo b { font-family: var(--titoli); font-size: 20px; font-weight: 800; letter-spacing: .02em; text-transform: uppercase; }
.invito-testo b { text-shadow: 0 1px 2px rgba(150, 40, 0, .35); }
.invito-testo span { font-size: 13px; color: rgba(255, 255, 255, .95); }
/* nel banner arancione il pulsante è bianco, così salta all'occhio */
.invito-btn {
  flex: none; padding: 11px 18px; font-size: 14px; color: var(--arancio-scuro) !important;
  background: #fff !important; box-shadow: 0 6px 16px rgba(150, 40, 0, .35) !important;
}
.invito-chiudi {
  flex: none; width: 30px; height: 30px; padding: 0; border-radius: 50%; border: 0; display: grid; place-items: center;
  font-size: 13px; color: rgba(255, 255, 255, .85); background: rgba(255, 255, 255, .14);
}
.invito-chiudi:hover { background: rgba(255, 255, 255, .26); }
.invito-app .invito-chiudi { background: rgba(255, 255, 255, .25); color: #fff; }

/* ---------- finestra con i passaggi ---------- */
.finestra-app {
  width: min(460px, calc(100vw - 24px)); max-height: calc(100dvh - 32px); overflow: auto; box-sizing: border-box;
  margin: auto; padding: 0 0 20px; border: 0; border-radius: 26px; color: var(--inchiostro);
  background: #fff; box-shadow: 0 30px 80px rgba(6, 30, 80, .45);
}
.finestra-app[open] { animation: finestra-entra .35s cubic-bezier(.2, .9, .3, 1.1); }
@keyframes finestra-entra { from { transform: translateY(24px) scale(.97); opacity: 0; } }
.finestra-app::backdrop { background: rgba(8, 25, 60, .55); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.finestra-chiudi { position: absolute; top: 14px; right: 14px; z-index: 1; }

.app-testa {
  padding: 26px 22px 20px; text-align: center; color: #fff;
  background:
    radial-gradient(260px 140px at 50% 18%, rgba(var(--alone), .45), transparent 70%),
    linear-gradient(160deg, #0a2f6e 0%, #1565c0 70%, #3f9ee8 100%);
}
.app-testa .occhiello { margin: 16px 0 4px; color: #ffd2a8; }
.app-testa h2 { margin: 0; font-family: var(--titoli); font-size: 30px; font-weight: 800; line-height: 1.05; text-transform: uppercase; }

/* mini schermata Home con l'icona Ludisport */
.app-home {
  margin: 0 auto; width: 236px; padding: 14px 16px; border-radius: 24px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; box-sizing: border-box;
  background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .22);
}
.app-home-vuota { aspect-ratio: 1; border-radius: 12px; background: rgba(255, 255, 255, .18); }
.app-home-nostra { display: grid; justify-items: center; gap: 4px; }
.app-home-nostra img {
  width: 100%; aspect-ratio: 1; border-radius: 12px; background: #fff;
  box-shadow: 0 0 0 3px rgba(var(--alone), .9), 0 8px 18px rgba(0, 0, 0, .3); animation: home-pulsa 2.2s ease-in-out infinite;
}
.app-home-nostra small { font-size: 9px; font-weight: 700; color: #fff; }
@keyframes home-pulsa { 50% { box-shadow: 0 0 0 6px rgba(var(--alone), .35), 0 8px 18px rgba(0, 0, 0, .3); } }

.app-vantaggi { list-style: none; margin: 14px auto 0; padding: 0; display: grid; gap: 6px; width: fit-content; text-align: left; }
.app-vantaggi li { display: flex; align-items: center; gap: 8px; font-size: 14px; color: rgba(255, 255, 255, .92); }
.app-vantaggi svg { flex: none; width: 18px; height: 18px; padding: 3px; border-radius: 50%; color: #fff; background: var(--arancio); }

.app-avviso, .app-nota, .app-oppure { margin: 14px 20px 0; font-size: 13px; line-height: 1.5; color: var(--inchiostro-tenue); }
.app-avviso { padding: 10px 12px; border-radius: 12px; background: #fff4e8; color: #8a3d12; }
.app-oppure { margin-top: 10px; text-align: center; }

.app-sistemi { display: flex; gap: 6px; margin: 18px 20px 0; padding: 5px; border-radius: 16px; background: #eef3fa; }
.app-sistemi button {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 10px; border: 0; border-radius: 12px;
  background: transparent; font-weight: 800; font-size: 15px; color: var(--inchiostro-tenue);
}
.app-sistemi button svg { width: 18px; height: 18px; }
.app-sistemi button[aria-selected="true"] { background: #fff; color: var(--blu-notte); box-shadow: 0 2px 8px rgba(10, 47, 110, .12); }

.app-installa-ora { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 16px 20px 0; width: calc(100% - 40px); }
.app-installa-ora svg { width: 20px; height: 20px; }

.passi { list-style: none; margin: 16px 20px 0; padding: 0; display: grid; gap: 14px; counter-reset: passo; }
.app-passo { margin: 0; display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: start; }
.passo-numero {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--titoli); font-size: 19px; font-weight: 800; color: #fff;
  background: linear-gradient(180deg, var(--arancio), var(--arancio-scuro)); box-shadow: 0 6px 14px rgba(220, 86, 26, .35);
}
.passo-corpo p { margin: 6px 0 8px; font-size: 15px; line-height: 1.4; }

/* finta interfaccia del telefono per ogni passaggio */
.finto {
  border-radius: 14px; background: #f3f6fa; border: 1px solid #e3e9f1; font-size: 13px; color: #3b4a60;
  box-shadow: inset 0 1px 0 #fff;
}
.finto svg { width: 18px; height: 18px; }
.evidenziato { position: relative; color: var(--blu) !important; box-shadow: 0 0 0 2px var(--arancio); animation: evidenzia 1.8s ease-in-out infinite; }
@keyframes evidenzia { 50% { box-shadow: 0 0 0 5px rgba(var(--alone), .35); } }
.finto-barra { display: flex; align-items: center; gap: 8px; padding: 7px 8px 7px 12px; }
.finto-url { flex: 1; min-width: 0; padding: 6px 10px; border-radius: 10px; background: #fff; color: #7a879a; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.finto-tasto { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: #fff; }
.finto-menu { display: grid; padding: 6px; gap: 2px; }
.finto-riga { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 11px; border-radius: 10px; color: #8692a6; }
.finto-riga.evidenziato { background: #fff; font-weight: 700; justify-content: flex-start; }
.finto-riga svg:last-child:not(:first-child) { margin-left: auto; }
.finto-conferma { display: flex; align-items: center; gap: 10px; padding: 10px 12px; }
.finto-conferma b { flex: 1; font-size: 13px; color: var(--inchiostro); }
.finto-conferma span:first-child { color: #8692a6; }
.finto-conferma img { border-radius: 7px; border: 1px solid #e3e9f1; background: #fff; }
.finto-conferma .evidenziato { padding: 6px 12px; border-radius: 9px; background: #fff; font-weight: 800; }

@media (max-width: 640px) {
  .barra-app { height: 38px; padding: 0 10px; }
  .barra-app span { display: none; }
  .invito-app { top: calc(var(--barra-h) + 20px); width: calc(100% - 20px); gap: 10px; padding: 9px; border-radius: 18px; }
  .invito-icona { width: 42px; height: 42px; border-radius: 11px; }
  .invito-testo b { font-size: 17px; }
  .invito-testo span { font-size: 12px; }
  .invito-btn { padding: 10px 14px; font-size: 13px; }
  .app-testa h2 { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) {
  .invito-app, .invito-app.visibile, .invito-app::before, .finestra-app[open] { transition: none; animation: none; }
  .invito-icona, .app-home-nostra img, .evidenziato { animation: none; }
}
