/* Popup Modal Styles */

.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.popup-overlay.popup-overlay-active {
  opacity: 1;
  pointer-events: auto;
}

.popup-modal {
  background: var(--card, #121621);
  border: 1px solid var(--card-border, #1c2434);
  border-radius: 16px;
  padding: 32px;
  max-width: 500px;
  width: 100%;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  position: relative;
  animation: popupSlideUp 0.3s ease;
}

@keyframes popupSlideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.popup-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  font-size: 28px;
  color: var(--muted, #9aa4b2);
  cursor: pointer;
  padding: 4px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.popup-close:hover {
  color: var(--text, #e6e9f0);
}

.popup-content {
  color: var(--text, #e6e9f0);
  line-height: 1.6;
  margin-bottom: 24px;
  word-wrap: break-word;
}

.popup-content h1,
.popup-content h2,
.popup-content h3 {
  margin: 16px 0 12px 0;
  color: var(--text, #e6e9f0);
}

.popup-content p {
  margin: 12px 0;
}

.popup-content a {
  color: var(--accent-2, #3fd0c9);
  text-decoration: underline;
}

.popup-content a:hover {
  text-decoration: none;
}

.popup-choices {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.popup-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--muted, #9aa4b2);
  transition: color 0.2s ease;
  user-select: none;
}

.popup-checkbox-label:hover {
  color: var(--text, #e6e9f0);
}

.popup-checkbox {
  cursor: pointer;
  width: 18px;
  height: 18px;
  accent-color: var(--accent, #7c5cff);
}

@media (prefers-color-scheme: light) {
  .popup-overlay {
    background: rgba(0, 0, 0, 0.4);
  }

  .popup-modal {
    background: #ffffff;
    border-color: #e4e8f2;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
  }

  .popup-content {
    color: #1c2230;
  }

  .popup-close {
    color: #5b6678;
  }

  .popup-close:hover {
    color: #1c2230;
  }

  .popup-choices {
    border-top-color: rgba(0, 0, 0, 0.08);
  }

  .popup-checkbox-label {
    color: #5b6678;
  }

  .popup-checkbox-label:hover {
    color: #1c2230;
  }
}

@media (max-width: 600px) {
  .popup-modal {
    padding: 24px;
  }

  .popup-content {
    font-size: 0.95rem;
  }

  .popup-checkbox-label {
    font-size: 0.85rem;
  }
}
