/* install.css — barra e finestra "Installa l'app" (usate da landing, pagina di accesso e app) */
.pwa-installed [data-install] { display: none !important; }

.pwa-banner {
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); z-index: 60;
  display: flex; align-items: center; gap: 12px;
  max-width: 560px; margin: 0 auto; padding: 12px 12px 12px 14px; border-radius: 18px;
  background: linear-gradient(135deg, #3446c8, #5b3fc4); color: #fff;
  box-shadow: 0 14px 40px rgba(30, 36, 90, .35);
  animation: pwa-up .35s cubic-bezier(.2, 1.2, .4, 1) .4s both;
  font-family: inherit;
}
.pwa-banner.in-slot { position: static; max-width: none; margin: 0 0 16px; animation: none; box-shadow: 0 6px 20px rgba(30, 36, 90, .2); }
@keyframes pwa-up { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .pwa-banner { animation: none; } }
.pwa-banner svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pwa-icon { display: grid; place-items: center; width: 42px; height: 42px; flex: none; border-radius: 12px; background: rgba(255, 255, 255, .18); }
.pwa-text { flex: 1; min-width: 0; line-height: 1.25; }
.pwa-text b { display: block; font-size: .98rem; }
.pwa-text small { display: block; font-size: .8rem; opacity: .85; margin-top: 2px; }
.pwa-go {
  flex: none; min-height: 42px; padding: 0 18px; border: 0; border-radius: 12px; cursor: pointer;
  background: #fff; color: #3446c8; font: inherit; font-weight: 750; font-size: .95rem;
}
.pwa-go:hover { filter: brightness(.96); }
.pwa-close { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 10px; background: transparent; color: #fff; cursor: pointer; opacity: .8; }
.pwa-close svg { width: 18px; height: 18px; }
@media (max-width: 380px) { .pwa-text small { display: none; } .pwa-go { padding: 0 14px; } }

.pwa-dialog {
  position: fixed; inset: 0; z-index: 200; display: grid; place-items: end center; padding: 16px;
  background: rgba(10, 12, 30, .5); font-family: inherit;
}
@media (min-width: 600px) { .pwa-dialog { place-items: center; } }
.pwa-card {
  position: relative; width: min(440px, 100%); max-height: 90vh; overflow-y: auto;
  padding: 26px 22px 20px; border-radius: 22px; background: var(--surface, #fff); color: var(--text, #1a1d2e);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .35); animation: pwa-up .25s ease-out both;
}
.pwa-card svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pwa-x { position: absolute; top: 10px; right: 10px; display: grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 10px; background: transparent; color: inherit; cursor: pointer; }
.pwa-hero { display: grid; place-items: center; width: 58px; height: 58px; margin: 0 auto 12px; border-radius: 16px; background: var(--primary-soft, #e3e7fb); color: var(--primary, #3446c8); }
.pwa-hero svg { width: 30px; height: 30px; }
.pwa-card h2 { margin: 0; text-align: center; font-size: 1.25rem; }
.pwa-intro { margin: 8px 0 0; text-align: center; color: var(--muted, #5d6280); font-size: .95rem; }
.pwa-steps { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.pwa-steps li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--surface-2, #eef0f8); font-size: .95rem; line-height: 1.35; }
.pwa-n { display: grid; place-items: center; width: 24px; height: 24px; flex: none; border-radius: 50%; background: var(--accent, #ffb547); color: #1a1d2e; font-weight: 800; font-size: .85rem; }
.pwa-ic { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 10px; background: var(--surface, #fff); color: var(--primary, #3446c8); }
.pwa-banner.ready { background: linear-gradient(135deg, #1f8a4c, #0f8f84); }
.pwa-banner.ready .pwa-go { color: #1f8a4c; animation: pwa-pulse 1.6s ease-in-out infinite; }
@keyframes pwa-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, .7); } 50% { box-shadow: 0 0 0 8px rgba(255, 255, 255, 0); } }
@media (prefers-reduced-motion: reduce) { .pwa-banner.ready .pwa-go { animation: none; } }

.pwa-ready-slot {
  display: flex; align-items: flex-start; gap: 10px; margin-top: 16px; padding: 12px 14px; border-radius: 14px;
  background: var(--primary-soft, #e3e7fb); color: var(--text, #1a1d2e); font-size: .9rem; line-height: 1.4;
}
.pwa-ready-slot.ready { display: block; padding: 0; background: none; }
.pwa-spin {
  flex: none; width: 18px; height: 18px; margin-top: 2px; border-radius: 50%;
  border: 3px solid var(--primary, #3446c8); border-right-color: transparent; animation: pwa-rot .9s linear infinite;
}
@keyframes pwa-rot { to { transform: rotate(360deg); } }
.pwa-now {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 56px;
  border: 0; border-radius: 14px; cursor: pointer; background: #1f8a4c; color: #fff; font: inherit; font-weight: 800; font-size: 1.05rem;
  animation: pwa-pulse-g 1.6s ease-in-out infinite;
}
@keyframes pwa-pulse-g { 0%, 100% { box-shadow: 0 0 0 0 rgba(31, 138, 76, .55); } 50% { box-shadow: 0 0 0 10px rgba(31, 138, 76, 0); } }
.pwa-notice {
  position: fixed; left: 50%; bottom: calc(110px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 210;
  width: min(420px, calc(100% - 32px)); padding: 12px 16px; border-radius: 12px; background: #1a1d2e; color: #fff; font-size: .92rem;
}
.pwa-ok {
  width: 100%; min-height: 48px; margin-top: 18px; border: 0; border-radius: 12px; cursor: pointer;
  background: var(--primary, #3446c8); color: var(--on-primary, #fff); font: inherit; font-weight: 700;
}
