/* ============================================================
   Kardup AI — PWA CSS v5
   Classi identiche a usagropoli/admin_pwa_config.php
   ============================================================ */

/* ── Overlay ─────────────────────────────────────────────── */
.pwa-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 9998;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* ── Modal (slide dal basso al centro) ───────────────────── */
.new-pwa-modal {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 480px;
  background-color: #fff;
  border-radius: 20px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.35);
  z-index: 9999;
  padding: 28px 24px 20px;
  animation: pwaSlideUp 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes pwaSlideUp {
  from {
    opacity: 0;
    transform: translate(-50%, 100%);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

/* ── Contenuto modal ─────────────────────────────────────── */
.pwa-modal-content {
  width: 100%;
  text-align: center;
}

/* ── Icona app ───────────────────────────────────────────── */
.pwa-img-area {
  display: flex;
  justify-content: center;
  margin-bottom: 14px;
}

.pwa-app-icon {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  background: linear-gradient(135deg, #7c3aed, #2563eb);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.4);
}

/* ── Testi ───────────────────────────────────────────────── */
.pwa-content {
  text-align: center;
  margin-bottom: 12px;
}

.pwa-content h4 {
  font-size: 22px;
  font-weight: 700;
  color: #111827;
  margin: 0 0 4px;
  font-family: 'Inter', sans-serif;
}

.pwa-content p {
  font-size: 14px;
  color: #6b7280;
  margin: 0;
}

.pwa-messages {
  margin-bottom: 18px;
}

/* Forza colori scuri su TUTTI i testi dentro il modal */
.new-pwa-modal p,
.new-pwa-modal b,
.new-pwa-modal span,
.new-pwa-modal strong {
  color: #111827 !important;
}

.new-pwa-modal p {
  font-size: 14px;
  line-height: 1.6;
  margin: 0 0 8px;
}

.new-pwa-modal b,
.new-pwa-modal strong {
  font-weight: 700;
}

.pwa-install-label {
  font-size: 15px;
  font-weight: 700;
  color: #111827;
  margin: 0 0 8px;
}

.pwa-desc {
  font-size: 14px;
  color: #4b5563;
  line-height: 1.6;
  margin: 0 0 12px;
}

/* ── Istruzioni iOS ──────────────────────────────────────── */
.pwa-ios-steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 12px 0;
  text-align: left;
}

.pwa-ios-step {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: #374151;
}

.pwa-ios-icon {
  color: #2563eb;
  flex-shrink: 0;
}

.pwa-browsers-label {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin: 12px 0 8px;
}

.pwa-browser-icons {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 4px;
}

.pwa-browser-icon {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

/* ── Pulsanti ────────────────────────────────────────────── */
.pwa-button-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.install-app-btn {
  background-color: #00875f;
  color: white;
  border: none;
  padding: 14px 24px;
  width: 100%;
  text-align: center;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background-color 0.2s, transform 0.1s;
  font-family: 'Inter', sans-serif;
}

.install-app-btn:hover {
  background-color: #006e4c;
}

.install-app-btn:active {
  transform: scale(0.98);
}

.dismiss-pwa {
  color: #6b7280;
  text-decoration: none;
  font-size: 14px;
  cursor: pointer;
  padding: 4px 0;
  display: block;
  font-family: 'Inter', sans-serif;
}

.dismiss-pwa:hover {
  color: #374151;
  text-decoration: underline;
}

/* ── Pulsante iOS "Magari più tardi" ─────────────────────── */
.ios-button {
  text-align: center;
  margin-top: 8px;
}

.ios-btn,
.pwa-btn-later-ios {
  color: #2563eb;
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
}

.ios-btn:hover,
.pwa-btn-later-ios:hover {
  text-decoration: underline;
}

/* ── Pulsante notifiche push nella topbar ────────────────── */
.btn-push-notif {
  position: relative;
  color: var(--text-secondary, #9ca3af);
  transition: color 0.2s;
}

.btn-push-notif:hover {
  color: var(--text-primary, #f9fafb);
}

.btn-push-notif.push-active {
  color: #7c3aed;
}

.btn-push-notif.push-active::after {
  content: '';
  position: absolute;
  top: 4px;
  right: 4px;
  width: 7px;
  height: 7px;
  background: #22c55e;
  border-radius: 50%;
  border: 1.5px solid var(--bg-primary, #0a0a0f);
}

/* ── Responsive mobile ───────────────────────────────────── */
@media (max-width: 480px) {
  .new-pwa-modal {
    width: 94%;
    padding: 22px 18px 16px;
    border-radius: 16px;
  }

  .install-app-btn {
    font-size: 16px;
    padding: 13px 20px;
  }
}
