/**
 * Notifal 404 page styles.
 *
 * Minimal layout using homepage design tokens and a frozen notification stack.
 *
 * @package Notifal
 * @since   1.3.3
 */

/* ===================== PAGE SHELL ===================== */
.notifal-404 {
  /* Full viewport minus fixed header offset */
  min-height: calc(100vh - var(--site-header-height));
  background: var(--grad-hero);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Soft purple glow overlay — matches homepage hero */
.notifal-404::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--grad-glow);
  pointer-events: none;
}

/* Centered content column */
.notifal-404__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-8);
  padding: var(--space-12) var(--space-6);
  max-width: 560px;
  width: 100%;
}

/* ===================== FROZEN SCENE ===================== */
.notifal-404__scene {
  width: 100%;
  max-width: 360px;
}

/* Mini browser frame — same language as homepage mockup */
.notifal-404-browser {
  border-radius: 14px;
  overflow: hidden;
  background: #fafafa;
  box-shadow:
    0 0 0 1px rgba(123, 44, 191, 0.14),
    0 20px 50px rgba(123, 44, 191, 0.22),
    0 6px 18px rgba(0, 0, 0, 0.08);
}

/* Browser chrome bar */
.notifal-404-browser__chrome {
  height: 34px;
  background: #f0e6fa;
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: var(--space-3);
}

/* Traffic-light dots */
.notifal-404-browser__dots {
  display: flex;
  gap: 5px;
  flex-shrink: 0;
}

.notifal-404-browser__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.notifal-404-browser__dot--red { background: #ff5f56; }
.notifal-404-browser__dot--yellow { background: #ffbd2e; }
.notifal-404-browser__dot--green { background: #27c93f; }

/* Broken URL in address bar */
.notifal-404-browser__url {
  flex: 1;
  text-align: center;
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--clr-text-muted);
  background: rgba(255, 255, 255, 0.72);
  border-radius: var(--radius-full);
  padding: 4px 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Empty page viewport — all notifications visible at once */
.notifal-404-browser__viewport {
  position: relative;
  height: 196px;
  background: #fff;
  overflow: hidden;
}

/* Faded skeleton lines — page that never loaded */
.notifal-404-browser__ghost {
  position: absolute;
  top: 52px;
  left: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  opacity: 0.35;
  z-index: 1;
}

.notifal-404-browser__ghost-line {
  display: block;
  height: 7px;
  border-radius: var(--radius-full);
  background: #e8dff3;
  width: 100%;
}

.notifal-404-browser__ghost-line--short {
  width: 58%;
}

/* Visitor dot — frozen mid-page, already missed by every notification */
.notifal-404-visitor {
  position: absolute;
  top: 50%;
  left: calc(50% - 5px);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--clr-primary);
  box-shadow: 0 0 0 3px rgba(123, 44, 191, 0.18);
  z-index: 2;
}

/* Shared emoji sizing inside notification elements */
.notifal-404-stack__emoji {
  flex-shrink: 0;
  font-size: 0.85rem;
  line-height: 1;
}

/* Top urgency bar — pinned open */
.notifal-404-stack__bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 4;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: linear-gradient(90deg, #3c096c 0%, #7b2cbf 52%, #9d4edd 100%);
  box-shadow: 0 4px 14px rgba(26, 5, 51, 0.16);
}

.notifal-404-stack__bar-text {
  font-size: 0.68rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.02em;
}

/* Corner toast — stuck open on the left */
.notifal-404-stack__toast {
  position: absolute;
  top: 46px;
  left: 12px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--clr-border);
  box-shadow: var(--shadow-md);
  max-width: calc(100% - 24px);
}

.notifal-404-stack__toast-text {
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--clr-text-secondary);
  line-height: 1.2;
  white-space: nowrap;
}

/* Center popup — shows the error code */
.notifal-404-stack__popup {
  position: absolute;
  bottom: 18px;
  left: 50%;
  z-index: 3;
  transform: translateX(-50%);
  min-width: 78px;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--grad-brand);
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.notifal-404-stack__popup-code {
  display: block;
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
  letter-spacing: -0.02em;
}

/* ===================== COPY ===================== */
.notifal-404__title {
  font-size: clamp(1.35rem, 3.5vw, 1.75rem);
  font-weight: 700;
  color: var(--clr-text-primary);
  line-height: 1.35;
  letter-spacing: -0.02em;
}

/* Second line uses brand gradient — flat, no animation */
.notifal-404__title-accent {
  display: block;
  margin-top: var(--space-2);
  background: var(--grad-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Primary CTA — matches homepage button */
.notifal-404__cta.btn-hero-primary {
  background: var(--grad-brand);
  color: #fff;
  padding: 14px 32px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: var(--text-base);
  box-shadow: 0 8px 24px rgba(123, 44, 191, 0.4);
  transition: transform var(--duration-fast), box-shadow var(--duration-fast), filter var(--duration-fast);
  display: inline-block;
  text-decoration: none;
}

.notifal-404__cta.btn-hero-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(123, 44, 191, 0.55);
  filter: brightness(1.06);
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 480px) {
  .notifal-404__inner {
    gap: var(--space-6);
    padding: var(--space-10) var(--space-4);
  }

  .notifal-404__scene {
    max-width: 300px;
  }

  .notifal-404-browser__viewport {
    height: 178px;
  }

  .notifal-404-stack__toast {
    top: 42px;
    left: 10px;
    padding: 6px 8px;
  }

  .notifal-404-stack__toast-text {
    font-size: 0.58rem;
  }
}
