/* whats-new.css — "What's New" changelog drawer.
 * Owns: drawer panel, backdrop, timeline entries, category icons, Got-it button.
 * Does NOT own: nav sidebar, hamburger, toast notifications (sw-update.js owns those).
 */

/* ── Backdrop ─────────────────────────────────────────────────────────────── */
.wn-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 3, 26, 0.72);
  z-index: 1800;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.wn-backdrop.wn-open {
  opacity: 1;
  pointer-events: auto;
}

/* ── Drawer panel ─────────────────────────────────────────────────────────── */
.wn-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 360px;
  max-width: 100vw;
  background: linear-gradient(180deg, #1a0a2e 0%, #120821 100%);
  border-left: 1px solid rgba(157, 78, 221, 0.35);
  z-index: 1900;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: -8px 0 40px rgba(157, 78, 221, 0.25);
}
.wn-drawer.wn-open {
  transform: translateX(0);
}

/* Mobile: bottom-sheet */
@media (max-width: 600px) {
  .wn-drawer {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-height: 88vh;
    border-left: none;
    border-top: 2px solid rgba(157, 78, 221, 0.5);
    border-radius: 18px 18px 0 0;
    transform: translateY(100%);
    box-shadow: 0 -8px 40px rgba(157, 78, 221, 0.3);
  }
  .wn-drawer.wn-open {
    transform: translateY(0);
  }
}

/* ── Header ───────────────────────────────────────────────────────────────── */
.wn-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem 0.875rem;
  border-bottom: 1px solid rgba(157, 78, 221, 0.2);
  flex-shrink: 0;
}
.wn-header-title {
  font-size: 1rem;
  font-weight: 800;
  color: #e0d7ff;
  letter-spacing: 0.01em;
}
.wn-header-version {
  font-size: 0.72rem;
  color: #9d4edd;
  font-weight: 600;
  margin-left: 0.5rem;
}
.wn-header-date {
  font-size: 0.7rem;
  color: #64748b;
  margin-left: 0.25rem;
}
.wn-close-btn {
  background: transparent;
  border: none;
  color: #7c6fa0;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 6px;
  line-height: 1;
  transition: color 0.15s, background 0.15s;
}
.wn-close-btn:hover {
  color: #e0d7ff;
  background: rgba(157, 78, 221, 0.12);
}

/* ── Scrollable body ──────────────────────────────────────────────────────── */
.wn-body {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.25rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(157, 78, 221, 0.3) transparent;
}
.wn-body::-webkit-scrollbar { width: 4px; }
.wn-body::-webkit-scrollbar-track { background: transparent; }
.wn-body::-webkit-scrollbar-thumb { background: rgba(157, 78, 221, 0.3); border-radius: 2px; }

/* ── Timeline ─────────────────────────────────────────────────────────────── */
.wn-timeline {
  position: relative;
  padding-left: 2rem;
}
.wn-timeline::before {
  content: '';
  position: absolute;
  left: 0.625rem;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 2px;
  background: linear-gradient(to bottom, rgba(157,78,221,0.6) 0%, rgba(157,78,221,0.1) 100%);
  border-radius: 1px;
}

/* ── Entry ────────────────────────────────────────────────────────────────── */
.wn-entry {
  position: relative;
  margin-bottom: 1.5rem;
  padding: 0.875rem 1rem;
  background: rgba(157, 78, 221, 0.06);
  border: 1px solid rgba(157, 78, 221, 0.15);
  border-radius: 10px;
  transition: border-color 0.2s;
}
.wn-entry:last-child {
  margin-bottom: 0;
}
.wn-entry.wn-newest {
  background: rgba(218, 165, 32, 0.07);
  border-color: rgba(218, 165, 32, 0.35);
  box-shadow: 0 2px 16px rgba(218, 165, 32, 0.08);
}

/* Timeline dot */
.wn-entry::before {
  content: '';
  position: absolute;
  left: -1.625rem;
  top: 1rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(157, 78, 221, 0.7);
  border: 2px solid #1a0a2e;
}
.wn-entry.wn-newest::before {
  background: #daa520;
  box-shadow: 0 0 8px rgba(218, 165, 32, 0.6);
}

/* ── Entry header ─────────────────────────────────────────────────────────── */
.wn-entry-head {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.wn-entry-icon {
  font-size: 1.05rem;
  flex-shrink: 0;
  margin-top: 0.05rem;
}
.wn-entry-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #e0d7ff;
  line-height: 1.3;
  flex: 1;
}
.wn-entry.wn-newest .wn-entry-title {
  color: #f0e68c;
}
.wn-entry-meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
}
.wn-entry-version {
  font-size: 0.68rem;
  color: #9d4edd;
  font-weight: 600;
  font-family: monospace;
}
.wn-entry-date {
  font-size: 0.68rem;
  color: #4a3060;
}
.wn-entry-category {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  margin-left: auto;
}
.wn-cat-feature  { color: #9d4edd; background: rgba(157,78,221,0.12); }
.wn-cat-fix      { color: #48bb78; background: rgba(72,187,120,0.12); }
.wn-cat-content  { color: #ed8936; background: rgba(237,137,54,0.12); }

/* ── Highlights list ──────────────────────────────────────────────────────── */
.wn-highlights {
  list-style: none;
  padding: 0;
  margin: 0 0 0.5rem;
}
.wn-highlights li {
  font-size: 0.78rem;
  color: #b39ddb;
  padding: 0.2rem 0;
  padding-left: 1.1rem;
  position: relative;
  line-height: 1.4;
}
.wn-highlights li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: rgba(157, 78, 221, 0.6);
}

/* ── Deep-link button ─────────────────────────────────────────────────────── */
.wn-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: transparent;
  border: 1px solid rgba(157, 78, 221, 0.35);
  color: #9d4edd;
  border-radius: 6px;
  padding: 0.28rem 0.65rem;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 0.25rem;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.wn-link-btn:hover {
  background: rgba(157, 78, 221, 0.12);
  border-color: rgba(157, 78, 221, 0.6);
  color: #c084fc;
}
.wn-link-btn::after { content: ' →'; }

/* ── Footer ───────────────────────────────────────────────────────────────── */
.wn-footer {
  padding: 0.875rem 1.25rem;
  border-top: 1px solid rgba(157, 78, 221, 0.15);
  flex-shrink: 0;
}
.wn-got-it-btn {
  width: 100%;
  padding: 0.6rem 1rem;
  background: linear-gradient(135deg, #9d4edd, #e040fb);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: opacity 0.15s, transform 0.1s;
}
.wn-got-it-btn:hover  { opacity: 0.9; }
.wn-got-it-btn:active { transform: scale(0.98); }

/* ── Hamburger gold dot (unseen entries indicator) ────────────────────────── */
.nav-hamburger {
  position: relative;
}
.wn-hamburger-dot {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #daa520;
  border: 2px solid #1a0a2e;
  box-shadow: 0 0 6px rgba(218, 165, 32, 0.7);
  display: none;
  pointer-events: none;
}
.wn-hamburger-dot.visible {
  display: block;
}

/* ── Nav footer "What's New" link ─────────────────────────────────────────── */
.wn-nav-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1rem;
  font-size: 0.78rem;
  color: #7c6fa0;
  background: transparent;
  border: none;
  border-top: 1px solid rgba(157, 78, 221, 0.12);
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: color 0.15s;
  white-space: nowrap;
  overflow: hidden;
}
.wn-nav-link:hover {
  color: #daa520;
}
.wn-nav-link-version {
  font-family: monospace;
  font-size: 0.7rem;
  color: #4a3060;
}
.wn-nav-link-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #daa520;
  box-shadow: 0 0 5px rgba(218, 165, 32, 0.6);
  flex-shrink: 0;
  display: none;
}
.wn-nav-link-dot.visible {
  display: block;
}
