/* ============================================================================
 * sprint2.css — Sprint 2-A..2-E: Bluebook cite + Watchlist + URL state +
 * "What changed since last visit" + Tracker cross-link.
 * SMU CGI · 2026-05-28.
 *
 * Decorates the existing `.opinion` and `.alert` cards without touching their
 * markup. All selectors are namespaced (s2-*) so we can't collide with
 * existing class names.
 * ========================================================================== */

/* --------- 2-A + 2-B: per-card decoration row (star + cite + tracker chip) --------- */
.s2-tools {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-top: 10px; padding-top: 10px;
  border-top: 1px dashed rgba(10,30,58,0.10);
  font-family: var(--font-body);
}
.s2-tools__btn {
  appearance: none; cursor: pointer;
  font-family: var(--font-body); font-size: 12px; font-weight: 500;
  padding: 5px 11px; border-radius: 999px;
  border: 1px solid rgba(10,30,58,0.18);
  background: transparent; color: var(--ink-muted);
  display: inline-flex; align-items: center; gap: 6px;
  transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}
.s2-tools__btn:hover {
  background: rgba(10,30,58,0.05);
  border-color: rgba(10,30,58,0.32);
  color: var(--ink);
}
.s2-tools__btn[aria-pressed="true"] {
  background: rgba(217,101,68,0.10);
  border-color: var(--accent-warm);
  color: var(--accent-warm);
}
.s2-tools__btn svg { width: 13px; height: 13px; flex-shrink: 0; }
.s2-tools__btn--star[aria-pressed="true"] svg { fill: currentColor; stroke: currentColor; }
.s2-tools__chip-tracked {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 11px; border-radius: 999px;
  border: 1px solid rgba(15,110,86,0.32);
  background: rgba(15,110,86,0.08); color: var(--accent-teal);
  font-family: var(--font-body); font-size: 11.5px; font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
}
.s2-tools__chip-tracked:hover { background: rgba(15,110,86,0.16); border-color: var(--accent-teal); }

/* --------- 2-D: "What changed since last visit" panel --------- */
.s2-changed {
  margin: 16px auto 0;
  max-width: var(--container, 1180px);
  padding: 12px 18px;
  background: rgba(15,110,86,0.06);
  border: 1px solid rgba(15,110,86,0.22);
  border-radius: 10px;
  font-family: var(--font-body);
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px;
}
.s2-changed__head {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent-teal); font-weight: 600;
}
.s2-changed__body { font-size: 14px; color: var(--ink); flex: 1; min-width: 240px; }
.s2-changed__body strong { color: var(--accent-teal); font-weight: 700; }
.s2-changed__dismiss {
  appearance: none; background: transparent; border: none; cursor: pointer;
  font-size: 18px; color: var(--ink-subtle); padding: 0 4px;
}
.s2-changed__dismiss:hover { color: var(--ink); }

/* --------- 2-B: Watchlist drawer --------- */
.s2-watch-fab {
  position: fixed;
  right: 22px;
  bottom: 86px;            /* sits above the Subscribe FAB from Sprint 1-G */
  z-index: 90;
  width: 46px; height: 46px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 999px;
  background: var(--navy);
  color: var(--cream);
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 18px rgba(10,30,58,0.28);
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}
.s2-watch-fab:hover { background: #102a52; transform: translateY(-1px); }
.s2-watch-fab__badge {
  position: absolute; top: -4px; right: -4px;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px;
  background: var(--accent-warm); color: white;
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center;
}
.s2-watch-fab[data-count="0"] .s2-watch-fab__badge { display: none; }
.s2-watch-fab svg { width: 18px; height: 18px; color: var(--accent-warm); }

.s2-watch-drawer {
  position: fixed; right: 22px; bottom: 142px;
  width: min(380px, calc(100vw - 44px));
  max-height: calc(100vh - 200px);
  overflow: auto;
  background: var(--cream);
  border-radius: 14px;
  box-shadow: 0 22px 60px rgba(0,0,0,0.30);
  padding: 18px 20px 16px;
  z-index: 91;
  display: none;
  font-family: var(--font-body);
}
.s2-watch-drawer.is-open { display: block; }
.s2-watch-drawer__head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.s2-watch-drawer__title { font-family: var(--font-display); font-size: 1.1rem; font-weight: 600; margin: 0; }
.s2-watch-drawer__sub { font-size: 11px; color: var(--ink-subtle); font-family: var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; }
.s2-watch-drawer__empty { font-style: italic; color: var(--ink-muted); font-size: 14px; padding: 10px 0; }
.s2-watch-drawer__list { list-style: none; padding: 0; margin: 10px 0 4px; max-height: 360px; overflow: auto; }
.s2-watch-drawer__item { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; border-top: 1px solid rgba(10,30,58,0.06); font-size: 13px; line-height: 1.5; }
.s2-watch-drawer__item:first-child { border-top: none; }
.s2-watch-drawer__item-body { flex: 1; min-width: 0; }
.s2-watch-drawer__item-body small { display: block; color: var(--ink-subtle); font-size: 11px; margin-top: 2px; }
.s2-watch-drawer__item-link { color: var(--accent-warm); text-decoration: none; font-weight: 600; word-break: break-word; }
.s2-watch-drawer__item-link:hover { text-decoration: underline; }
.s2-watch-drawer__item-remove {
  appearance: none; background: transparent; border: none; cursor: pointer;
  color: var(--ink-subtle); font-size: 16px; line-height: 1; padding: 2px 4px;
}
.s2-watch-drawer__item-remove:hover { color: var(--accent-warm); }
.s2-watch-drawer__foot { font-size: 11px; color: var(--ink-subtle); margin-top: 12px; line-height: 1.5; }

/* --------- 2-C: shared-view toast (minor reuse) --------- */
.s2-toast {
  position: fixed; left: 50%; bottom: 100px; transform: translateX(-50%);
  background: var(--navy); color: var(--cream); padding: 10px 18px; border-radius: 999px;
  font-family: var(--font-body); font-size: 0.88rem; box-shadow: 0 8px 24px rgba(10,30,58,0.3);
  z-index: 300; opacity: 0; pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.s2-toast.is-shown { opacity: 1; transform: translateX(-50%) translateY(-10px); }

@media (max-width: 640px) {
  .s2-watch-fab { right: 14px; bottom: 78px; }
  .s2-watch-drawer { right: 14px; bottom: 134px; }
}
