/* ===================================
   ParikshaHub — PWA Install Popup
   File: pwa-popup.css
   =================================== */

/* Overlay — full screen dark bg */
.pwa-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: flex-end; /* bottom se aayega popup */
  justify-content: center;
  padding: 0 16px 24px;
  background: rgba(15, 23, 42, 0);
  pointer-events: none;
  transition: background 0.35s ease;
}

.pwa-overlay.pwa-visible {
  background: rgba(15, 23, 42, 0.45);
  pointer-events: all;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

/* Base Popup Card */
.pwa-popup {
  width: 100%;
  max-width: 420px;
  background: #ffffff;
  border-radius: 20px;
  padding: 28px 24px 24px;
  box-shadow:
    0 32px 64px rgba(0, 0, 0, 0.18),
    0 8px 24px rgba(37, 99, 235, 0.1);
  position: relative;
  transform: translateY(120%);
  opacity: 0;
  transition:
    transform 0.42s cubic-bezier(0.34, 1.56, 0.64, 1),
    opacity 0.35s ease;
  display: none; /* JS se show hoga */
}

.pwa-popup.pwa-show {
  transform: translateY(0);
  opacity: 1;
}

/* Close Button */
.pwa-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border: none;
  background: #f1f5f9;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  font-size: 14px;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
  z-index: 1;
}

.pwa-close:hover {
  background: #e2e8f0;
  color: #1e293b;
  transform: rotate(90deg);
}

.pwa-close:active {
  transform: rotate(90deg) scale(0.9);
}

/* Icon */
.pwa-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  border-radius: 14px;
  margin-bottom: 16px;
}

.pwa-device-icon {
  font-size: 24px;
  color: #2563eb;
}

/* Content */
.pwa-title {
  font-family: "Inter", sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 8px;
  line-height: 1.3;
}

.pwa-desc {
  font-family: "Inter", sans-serif;
  font-size: 14px;
  color: #475569;
  margin: 0;
  line-height: 1.6;
}

/* iPhone Steps */
.pwa-steps {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pwa-steps li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Inter", sans-serif;
  font-size: 14px;
  color: #334155;
  background: #f8fafc;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
}

.pwa-steps li i {
  color: #2563eb;
  font-size: 16px;
  flex-shrink: 0;
}

/* Action Buttons */
.pwa-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}

.pwa-btn-primary {
  width: 100%;
  padding: 13px 20px;
  background: #2563eb;
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-family: "Inter", sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.pwa-btn-primary:hover {
  background: #1d4ed8;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.38);
}

.pwa-btn-primary:active {
  transform: scale(0.97);
}

.pwa-btn-secondary {
  width: 100%;
  padding: 11px 20px;
  background: transparent;
  color: #64748b;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  font-family: "Inter", sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.pwa-btn-secondary:hover {
  background: #f8fafc;
  color: #334155;
  border-color: #cbd5e1;
}

/* iPhone popup — button margin */
.pwa-iphone .pwa-btn-secondary {
  margin-top: 16px;
}

/* Desktop popup */
.pwa-desktop .pwa-actions {
  margin-top: 20px;
}

/* ===== DESKTOP SCREEN — Center mein popup ===== */
@media (min-width: 768px) {
  .pwa-overlay {
    align-items: center; /* desktop pe center */
    padding: 0;
  }

  .pwa-popup {
    border-radius: 20px;
    max-width: 400px;
    transform: translateY(30px) scale(0.95);
  }

  .pwa-popup.pwa-show {
    transform: translateY(0) scale(1);
  }
}

