/* ==================== PWA Update Modal ==================== */

#updateModalOverlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 400;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
#updateModalOverlay.visible {
  display: flex;
}

/* Backdrop */
#updateModalOverlay .update-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Card */
#updateModalOverlay .update-card {
  position: relative;
  width: min(380px, 100%);
  border-radius: 24px;
  padding: 32px 24px 24px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.25);
  text-align: center;
}
html.dark #updateModalOverlay .update-card {
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Icon */
#updateModalOverlay .update-icon {
  font-size: 48px;
  color: #4A90E2;
  margin-bottom: 12px;
}
html.dark #updateModalOverlay .update-icon {
  color: #60a5fa;
}

/* Title */
#updateModalOverlay .update-title {
  font-weight: 700;
  font-size: 20px;
  line-height: 1.25;
  color: #0f172a;
  margin-bottom: 8px;
}
html.dark #updateModalOverlay .update-title {
  color: rgba(255, 255, 255, 0.95);
}

/* Body */
#updateModalOverlay .update-body {
  font-size: 14px;
  line-height: 1.5;
  color: rgba(15, 23, 42, 0.65);
  margin-bottom: 24px;
}
html.dark #updateModalOverlay .update-body {
  color: rgba(255, 255, 255, 0.6);
}

/* Button */
#updateModalOverlay .update-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 24px;
  border: none;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  background: #4A90E2;
  color: #fff;
  min-height: 52px;
  transition: background 0.15s, transform 0.1s;
  box-shadow: 0 4px 16px rgba(74, 144, 226, 0.35);
}
#updateModalOverlay .update-btn:hover:not(:disabled) {
  background: #357ABD;
}
#updateModalOverlay .update-btn:active:not(:disabled) {
  transform: scale(0.98);
}
#updateModalOverlay .update-btn:disabled {
  opacity: 0.8;
  cursor: wait;
}

/* Spinner */
#updateModalOverlay .update-spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: updateSpin 0.7s linear infinite;
}
@keyframes updateSpin {
  to { transform: rotate(360deg); }
}
