/* ═══════════════════════════════════════════════════════════
   Portal Update Popup — Google-style announcement

   Lots of whitespace, subtle abstract animation
   ═══════════════════════════════════════════════════════════ */

.update-popup {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              visibility 0.4s;
}

.update-popup--visible {
  opacity: 1;
  visibility: visible;
}

/* Backdrop with abstract blobs ───────────────────────────── */
.update-popup-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  cursor: default;
}

.dark .update-popup-backdrop {
  background: rgba(13, 16, 15, 0.92);
}

.update-popup-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  animation: update-popup-blob-float 18s ease-in-out infinite;
}

.update-popup-blob--1 {
  width: 320px;
  height: 320px;
  background: linear-gradient(135deg, rgba(0, 106, 107, 0.15), rgba(13, 148, 136, 0.08));
  top: -80px;
  right: -60px;
  animation-delay: 0s;
}

.update-popup-blob--2 {
  width: 280px;
  height: 280px;
  background: linear-gradient(225deg, rgba(0, 106, 107, 0.1), transparent);
  bottom: -40px;
  left: -40px;
  animation-delay: -6s;
}

.update-popup-blob--3 {
  width: 200px;
  height: 200px;
  background: linear-gradient(315deg, rgba(13, 148, 136, 0.12), transparent);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: -12s;
}

.update-popup-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 80% 50% at 50% 0%,
    rgba(0, 106, 107, 0.06),
    transparent 60%
  );
  pointer-events: none;
}

.dark .update-popup-glow {
  background: radial-gradient(
    ellipse 80% 50% at 50% 0%,
    rgba(77, 217, 218, 0.08),
    transparent 60%
  );
}

@keyframes update-popup-blob-float {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(12px, -8px) scale(1.02);
  }
  66% {
    transform: translate(-8px, 12px) scale(0.98);
  }
}

/* Card ───────────────────────────────────────────────────── */
.update-popup-card {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: calc(100vh - 3rem);
  overflow-y: auto;
  background: #ffffff;
  border-radius: 24px;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.04),
    0 8px 24px rgba(0, 0, 0, 0.06),
    0 24px 64px rgba(0, 0, 0, 0.08);
  transform: scale(0.96) translateY(8px);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.update-popup--visible .update-popup-card {
  transform: scale(1) translateY(0);
}

.dark .update-popup-card {
  background: var(--portal-surface-card, #1a1f1d);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.2),
    0 8px 24px rgba(0, 0, 0, 0.25),
    0 24px 64px rgba(0, 0, 0, 0.35);
}

/* Close button ───────────────────────────────────────────── */
.update-popup-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--portal-text-muted, #8a9390);
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  z-index: 2;
}

.update-popup-close:hover {
  background: rgba(0, 0, 0, 0.04);
  color: var(--portal-text, #0f1412);
}

.dark .update-popup-close:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--portal-text, #e8ecea);
}

.update-popup-close .material-symbols-outlined {
  font-size: 22px;
}

/* Content ────────────────────────────────────────────────── */
.update-popup-content {
  padding: 3rem 2.5rem 2.5rem;
}

.update-popup-badge {
  display: inline-block;
  padding: 0.35rem 0.875rem;
  background: rgba(0, 106, 107, 0.1);
  color: #006a6b;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 9999px;
  margin-bottom: 1.5rem;
  animation: update-popup-badge-in 0.5s 0.2s ease-out both;
}

.dark .update-popup-badge {
  background: rgba(77, 217, 218, 0.15);
  color: #4dd9da;
}

.update-popup-title {
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.25;
  color: var(--portal-text, #0f1412);
  margin: 0 0 1rem;
  animation: update-popup-fade-up 0.5s 0.25s ease-out both;
}

.update-popup-lead {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--portal-text-secondary, #5c6664);
  margin: 0 0 2.5rem;
  max-width: 42ch;
  animation: update-popup-fade-up 0.5s 0.3s ease-out both;
}

/* Features ───────────────────────────────────────────────── */
.update-popup-features {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  margin-bottom: 2.5rem;
}

.update-popup-feature {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  animation: update-popup-fade-up 0.5s ease-out both;
}

.update-popup-feature:nth-child(1) { animation-delay: 0.35s; }
.update-popup-feature:nth-child(2) { animation-delay: 0.4s; }
.update-popup-feature:nth-child(3) { animation-delay: 0.45s; }

.update-popup-feature-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 106, 107, 0.08);
  color: #006a6b;
  border-radius: 14px;
}

.dark .update-popup-feature-icon {
  background: rgba(77, 217, 218, 0.12);
  color: #4dd9da;
}

.update-popup-feature-icon .material-symbols-outlined {
  font-size: 22px;
}

.update-popup-feature-body h3 {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--portal-text, #0f1412);
  margin: 0 0 0.25rem;
}

.update-popup-feature-body p {
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--portal-text-secondary, #5c6664);
  margin: 0;
}

/* CTA ────────────────────────────────────────────────────── */
.update-popup-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  animation: update-popup-fade-up 0.5s 0.5s ease-out both;
}

.update-popup-dont-show {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--portal-text-secondary, #5c6664);
  cursor: pointer;
  user-select: none;
}

.update-popup-checkbox {
  width: 18px;
  height: 18px;
  accent-color: #006a6b;
  cursor: pointer;
}

.dark .update-popup-checkbox {
  accent-color: #4dd9da;
}

.update-popup-btn {
  width: 100%;
  padding: 1rem 1.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: inherit;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}

.update-popup-btn--primary {
  background: #006a6b;
  color: white;
}

.update-popup-btn--primary:hover {
  background: #005354;
}

.dark .update-popup-btn--primary {
  background: #4dd9da;
  color: #0d100f;
}

.dark .update-popup-btn--primary:hover {
  background: #6ee3e4;
}

.update-popup-btn:active {
  transform: scale(0.99);
}

/* Animations ─────────────────────────────────────────────── */
@keyframes update-popup-fade-up {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes update-popup-badge-in {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Mobile ─────────────────────────────────────────────────── */
@media (max-width: 559px) {
  .update-popup {
    padding: 1rem;
    align-items: flex-end;
  }

  .update-popup-card {
    max-height: 90vh;
    border-radius: 20px 20px 0 0;
  }

  .update-popup-content {
    padding: 2.5rem 1.5rem 2rem;
  }

  .update-popup-title {
    font-size: 1.5rem;
  }

  .update-popup-feature {
    gap: 1rem;
  }

  .update-popup-feature-icon {
    width: 40px;
    height: 40px;
  }

  .update-popup-feature-icon .material-symbols-outlined {
    font-size: 20px;
  }
}
