/* PWA update toast — persistent until Update; dismiss hides for this page only */
.nsm-pwa-update {
  position: fixed;
  top: var(--nsm-overlay-top);
  left: 50%;
  z-index: var(--nsm-z-overlay);
  width: min(var(--nsm-overlay-max-width), calc(100vw - 2 * var(--nsm-overlay-inset-x)));
  transform: translateX(-50%);
  pointer-events: none;
  animation: nsm-pwa-update-in 0.28s ease-out;
}

.nsm-pwa-update[hidden] {
  display: none !important;
}

@keyframes nsm-pwa-update-in {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-0.5rem);
  }

  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.nsm-pwa-update__inner {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border-radius: 0.75rem;
  background: hsl(262 83% 58%);
  border: 1px solid hsl(262 70% 48%);
  color: #fff;
  box-shadow:
    0 4px 6px -1px rgba(0, 0, 0, 0.12),
    0 12px 28px -6px rgba(88, 28, 135, 0.35);
  pointer-events: auto;
}

html.dark .nsm-pwa-update__inner {
  background: hsl(262 55% 42%);
  border-color: hsl(262 45% 36%);
}

.nsm-pwa-update__icon {
  flex-shrink: 0;
  margin-top: 0.125rem;
  font-size: 1.25rem;
  color: #fff;
}

.nsm-pwa-update__dismiss i {
  color: #fff;
}

.nsm-pwa-update__copy {
  flex: 1 1 auto;
  min-width: 0;
}

.nsm-pwa-update__title {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 0.125rem;
}

.nsm-pwa-update__text {
  display: block;
  font-size: 0.8125rem;
  line-height: 1.4;
  opacity: 0.92;
}

.nsm-pwa-update__actions {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  flex-shrink: 0;
}

.nsm-pwa-update__btn {
  white-space: nowrap;
  color: hsl(262 83% 58%);
  background: #fff;
  border-color: #fff;
}

.nsm-pwa-update__btn:hover,
.nsm-pwa-update__btn:focus-visible {
  color: hsl(262 83% 48%);
  background: hsl(0 0% 96%);
  border-color: hsl(0 0% 96%);
}

.nsm-pwa-update__btn:disabled {
  opacity: 0.75;
}

.nsm-pwa-update__dismiss {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border: none;
  border-radius: 0.375rem;
  background: transparent;
  color: #fff;
  opacity: 0.8;
  cursor: pointer;
}

.nsm-pwa-update__dismiss:hover,
.nsm-pwa-update__dismiss:focus-visible {
  opacity: 1;
  background: rgba(255, 255, 255, 0.14);
}
