/* ═══════════════════════════════════════════════════════════
   Preview Wall — Auth gate overlay for protected pages
   ═══════════════════════════════════════════════════════════ */

/* Instantly hide preview wall for authenticated users.
   The ev-authed class is set synchronously before first paint
   by an inline script in base.njk that checks sessionStorage. */
body.ev-authed .preview-wall {
  display: none;
}

.preview-wall {
  position: fixed;
  inset: 0;
  z-index: 4000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.preview-wall[hidden] {
  display: none;
}

/* Backdrop — blurred overlay */
.preview-wall__backdrop {
  position: absolute;
  inset: 0;
  background: rgb(10 12 20 / 65%);
  backdrop-filter: blur(8px);
}

@media (prefers-reduced-motion: reduce) {
  .preview-wall__backdrop {
    backdrop-filter: none;
    background: rgb(10 12 20 / 85%);
  }
}

/* Card — centered CTA container */
.preview-wall__card {
  position: relative;
  z-index: 1;
  max-width: 420px;
  width: 100%;
  padding: 2.5rem 2rem;
  background: var(--color-surface, #1a1d2e);
  border: 1px solid var(--color-border, rgb(255 255 255 / 8%));
  border-radius: 12px;
  box-shadow: 0 24px 48px rgb(0 0 0 / 40%);
  text-align: center;
}

.preview-wall__icon {
  margin-block-end: 1rem;
  color: var(--color-primary, #58a6ff);
}

.preview-wall__title {
  margin: 0 0 0.5rem;
  font-size: 1.375rem;
  font-weight: 600;
  color: var(--color-text, #e6edf3);
  line-height: 1.3;
}

.preview-wall__description {
  margin: 0 0 1.5rem;
  font-size: 0.9375rem;
  color: var(--color-text-secondary, #8b949e);
  line-height: 1.6;
}

.preview-wall__actions {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.preview-wall__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-size: 0.9375rem;
  font-weight: 500;
  border-radius: 8px;
  text-decoration: none;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease;
  cursor: pointer;
  border: 1px solid transparent;
}

.preview-wall__btn--primary {
  background: var(--color-primary, #58a6ff);
  color: #fff;
}

.preview-wall__btn--primary:hover {
  background: var(--color-primary-hover, #79b8ff);
}

.preview-wall__btn--primary:focus-visible {
  outline: 2px solid var(--color-primary, #58a6ff);
  outline-offset: 2px;
}

.preview-wall__btn--ghost {
  background: transparent;
  color: var(--color-text-secondary, #8b949e);
  border-color: var(--color-border, rgb(255 255 255 / 12%));
}

.preview-wall__btn--ghost:hover {
  background: rgb(255 255 255 / 4%);
  color: var(--color-text, #e6edf3);
}

.preview-wall__btn--ghost:focus-visible {
  outline: 2px solid var(--color-primary, #58a6ff);
  outline-offset: 2px;
}

.preview-wall__note {
  margin: 1rem 0 0;
  font-size: 0.8125rem;
  color: var(--color-text-muted, #6e7681);
}

/* Prevent scrolling on body when wall is active */
body.has-preview-wall {
  overflow: hidden;
}

/* ═══════════════════════════════════════════════════════════
   Upgrade Prompt Dialog (injected by nav-auth.js)
   ═══════════════════════════════════════════════════════════ */

.nav-upgrade-prompt {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.nav-upgrade-prompt[hidden] {
  display: none;
}

.nav-upgrade-prompt__backdrop {
  position: absolute;
  inset: 0;
  background: rgb(10 12 20 / 50%);
  backdrop-filter: blur(4px);
}

@media (prefers-reduced-motion: reduce) {
  .nav-upgrade-prompt__backdrop {
    backdrop-filter: none;
    background: rgb(10 12 20 / 75%);
  }
}

.nav-upgrade-prompt__card {
  position: relative;
  z-index: 1;
  max-width: 360px;
  width: 100%;
  padding: 2rem 1.5rem;
  background: var(--color-surface, #1a1d2e);
  border: 1px solid var(--color-border, rgb(255 255 255 / 8%));
  border-radius: 10px;
  box-shadow: 0 16px 32px rgb(0 0 0 / 35%);
  text-align: center;
}

.nav-upgrade-prompt__title {
  margin: 0 0 0.5rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-text, #e6edf3);
}

.nav-upgrade-prompt__body {
  margin: 0 0 1.25rem;
  font-size: 0.875rem;
  color: var(--color-text-secondary, #8b949e);
  line-height: 1.5;
}

.nav-upgrade-prompt__actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.nav-upgrade-prompt__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 8px;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  background: none;
  font-family: inherit;
}

.nav-upgrade-prompt__btn--primary {
  background: var(--color-primary, #58a6ff);
  color: #fff;
}

.nav-upgrade-prompt__btn--primary:hover {
  background: var(--color-primary-hover, #79b8ff);
}

.nav-upgrade-prompt__btn--primary:focus-visible {
  outline: 2px solid var(--color-primary, #58a6ff);
  outline-offset: 2px;
}

.nav-upgrade-prompt__btn--ghost {
  color: var(--color-text-secondary, #8b949e);
}

.nav-upgrade-prompt__btn--ghost:hover {
  color: var(--color-text, #e6edf3);
}

.nav-upgrade-prompt__btn--ghost:focus-visible {
  outline: 2px solid var(--color-primary, #58a6ff);
  outline-offset: 2px;
}
