/* SoftMit PWA install UI */

#softmit-pwa-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
}

#softmit-pwa-backdrop.open {
  display: flex;
}

#softmit-pwa-modal {
  background: linear-gradient(180deg, #1e293b, #0f172a);
  border: 1px solid #334155;
  border-radius: 20px;
  max-width: 440px;
  width: 100%;
  padding: 26px 22px;
  color: #cbd5e1;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.45);
  font-family: 'Segoe UI', Arial, sans-serif;
}

#softmit-pwa-modal .pwa-icon {
  font-size: 42px;
  text-align: center;
  margin-bottom: 8px;
}

#softmit-pwa-modal h3 {
  margin: 0 0 8px;
  color: #f8fafc;
  font-size: 20px;
  text-align: center;
}

#softmit-pwa-modal .pwa-lead {
  font-size: 14px;
  line-height: 1.65;
  color: #e2e8f0;
  margin-bottom: 12px;
  text-align: center;
}

#softmit-pwa-modal .pwa-ios-steps {
  display: none;
  background: rgba(37, 99, 235, 0.12);
  border: 1px solid rgba(96, 165, 250, 0.35);
  border-radius: 12px;
  padding: 14px;
  font-size: 13px;
  line-height: 1.7;
  margin-bottom: 14px;
}

#softmit-pwa-modal .pwa-http-warn {
  display: none;
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(251, 191, 36, 0.45);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 12px;
  line-height: 1.65;
  color: #fde68a;
  margin-bottom: 12px;
}

#softmit-pwa-modal .pwa-auto-hint {
  display: none;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(74, 222, 128, 0.35);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.6;
  color: #bbf7d0;
  margin-bottom: 12px;
  text-align: center;
}

#softmit-pwa-modal .pwa-manual-steps {
  display: none;
  background: rgba(37, 99, 235, 0.12);
  border: 1px solid rgba(96, 165, 250, 0.35);
  border-radius: 12px;
  padding: 14px;
  font-size: 13px;
  line-height: 1.7;
  margin-bottom: 14px;
}

#softmit-pwa-modal.ios-mode .pwa-ios-steps {
  display: block;
}

#softmit-pwa-modal.ios-mode #softmit-pwa-install-btn {
  display: none;
}

#softmit-pwa-modal.auto-mode .pwa-manual-steps,
#softmit-pwa-modal.auto-mode .pwa-http-warn {
  display: none;
}

#softmit-pwa-modal.manual-mode .pwa-manual-steps {
  display: block;
}

#softmit-pwa-modal.manual-mode #softmit-pwa-install-btn {
  display: none;
}

#softmit-pwa-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 16px;
}

.pwa-btn {
  padding: 12px 18px;
  border-radius: 10px;
  font-weight: 800;
  font-size: 13px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  min-height: 44px;
}

.pwa-btn-primary {
  background: #2563eb;
  color: #fff;
}

.pwa-btn-ghost {
  background: transparent;
  border: 1px solid #475569;
  color: #94a3b8;
}

#softmit-pwa-fab {
  display: none;
  position: fixed;
  right: max(14px, env(safe-area-inset-right));
  bottom: max(14px, env(safe-area-inset-bottom));
  z-index: 99990;
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 12px 16px;
  font-weight: 800;
  font-size: 12px;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.45);
  cursor: pointer;
  min-height: 44px;
}

#softmit-pwa-fab.show {
  display: block;
}

body.softmit-pwa-open {
  overflow: hidden;
}

@media (display-mode: standalone) {
  #softmit-pwa-backdrop,
  #softmit-pwa-fab {
    display: none !important;
  }
}
