/* ============================================================
   notifications.css — Toasts, lint panel, notifications.
   ============================================================ */

/* ---------- Toasts ---------- */

#toasts {
  position: fixed;
  right: 14px;
  bottom: 40px;
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  max-width: 340px;
  padding: 9px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-raised);
  color: var(--text);
  font-size: 0.85rem;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.in {
  opacity: 1;
  transform: translateY(0);
}

.toast.success {
  border-color: rgba(95, 185, 122, 0.5);
}

.toast.warn {
  border-color: rgba(229, 181, 103, 0.55);
}

/* ---------- Lint panel ---------- */

#lint-panel {
  position: fixed;
  inset-inline-start: calc(var(--workspace-nav-width, 0rem) + .625rem);
  bottom: 2.125rem;
  z-index: 460;
  width: 25rem;
  max-width: calc(100vw - var(--workspace-nav-width, 0rem) - 1.25rem);
  max-height: calc(100svh - var(--editor-toolbar-height, 2.75rem) - 2.75rem);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-raised);
  box-shadow: var(--shadow-raised);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

#lint-panel.hidden {
  display: none;
}

.lint-head {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-bottom: 1px solid var(--border-soft);
}

.lint-title {
  flex: 1;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
}

#lint-fix {
  padding: 3px 12px;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 0.78rem;
  cursor: pointer;
}

#lint-fix:hover {
  background: var(--accent);
  color: var(--white);
}

#lint-close {
  width: 24px;
  height: 24px;
  border: none;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text-faint);
  font-size: 1rem;
  cursor: pointer;
}

#lint-close:hover {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
}

#lint-list {
  min-height: 0;
  max-height: 13.75rem;
  overflow-y: auto;
  padding: 4px 0;
}

.lint-item {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 5px 12px;
  font-size: 0.82rem;
  color: var(--text-muted);
  cursor: pointer;
}

.lint-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.lint-line {
  flex-shrink: 0;
  min-width: 34px;
  font: 0.75rem var(--font-mono);
  color: var(--warning);
}

/* ---------- Stats popover ---------- */

#stats-pop {
  flex: none;
  max-height: 300px;
  overflow-y: auto;
  border-top: 1px solid var(--border-soft);
  background: var(--bg-panel);
  padding: 8px 10px 10px;
}

#stats-pop.hidden {
  display: none;
}

#stats-pop .sp-head {
  margin: 8px 2px 4px;
  font-size: 0.6875rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
}

#stats-pop .sp-head:first-child {
  margin-top: 0;
}

#stats-pop .sp-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 2px 4px;
  border-radius: var(--radius);
  font-size: 0.8125rem;
  color: var(--text-muted);
}

#stats-pop .sp-name {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

#stats-pop .sp-val {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text);
}

#stats-pop .sp-row.lv3 .sp-name { padding-inline-start: 14px; }
#stats-pop .sp-row.lv4 .sp-name,
#stats-pop .sp-row.lv5 .sp-name,
#stats-pop .sp-row.lv6 .sp-name { padding-inline-start: 28px; }

#stats-pop .sp-row.longest .sp-val {
  color: var(--accent);
}

#stats-pop .sp-row.warn {
  background: rgba(255, 176, 46, 0.08);
}

#stats-pop .sp-row.warn .sp-val {
  color: var(--warning-orange);
}
