/*
 * dossier.css — styling for the animated trip dossier beat (issue #8).
 *
 * The finished itinerary as a stack of typed rows (flight / stay / ticket / dining / activity)
 * that POP IN one after another. Each row carries a per-type icon badge and shows its title,
 * detail, and — the payoff — its confirmation/check-in CODE expanded and visible, so the
 * viewer sees that every important credential was gathered, parsed, and stored.
 *
 * Tokens (--ink/--accent/--line/…) come from crew-feed.css / reveal.css (the house style);
 * this file reuses them, so load it alongside those. Mobile-first single column.
 */

.dossier {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
}
.dossier-head {
  margin: 0 0 12px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted);
  font-weight: 700;
}

/* The fixed-height scroll window. Keeps a tall dossier inside the snapped viewport: rows stream
 * into this capped, internally-scrollable area (auto-following the newest row) instead of growing
 * the section below the fold. Mirrors crew-feed's `.feed-scroll`. The cap is set per-context
 * (story.css sizes it for step 3); this default keeps it sane wherever else the dossier is used. */
.dossier-scroll {
  max-height: 60vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-right: 2px;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
.dossier-scroll::-webkit-scrollbar {
  width: 7px;
}
.dossier-scroll::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 999px;
}

.dossier-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
  /* A hair of top/bottom room so the first/last row's shadow + pop-in aren't clipped by the
   * scroll window's edge. */
  padding: 2px 0;
}

/* A row, hidden until it pops in (deterministic: the reel/test drives the .show toggle). */
.dossier-item {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-card);
  opacity: 0;
  transform: translateY(8px) scale(0.98);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.dossier-item.show {
  opacity: 1;
  transform: none;
}

/* Per-type icon badge. Colored backings keep each kind distinct at a glance. */
.dossier-icon {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  background: var(--surface-sunken);
}
/* Soft tints of the warm crew family (Skip/Nest/Ledger/Sage/Scout). */
.dossier-item[data-type='flight'] .dossier-icon {
  background: #dfe9ee; /* Skip — dusty teal-blue tint */
}
.dossier-item[data-type='stay'] .dossier-icon {
  background: #f3e8cf; /* Nest — ochre tint */
}
.dossier-item[data-type='ticket'] .dossier-icon {
  background: #ece0ef; /* Ledger — plum tint */
}
.dossier-item[data-type='dining'] .dossier-icon {
  background: var(--clay-tint); /* Sage — clay tint */
}
.dossier-item[data-type='activity'] .dossier-icon {
  background: var(--pine-tint); /* Scout — pine tint */
}

.dossier-body {
  flex: 1;
  min-width: 0;
}
.dossier-kind {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--muted);
}
.dossier-title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
  margin-top: 1px;
}
.dossier-detail {
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.35;
  margin-top: 2px;
}

/* The codes/subs: expanded and visible — the whole point of the beat. The hard credential
 * (code) reads as a monospaced "stored" chip; the soft note (sub) sits beside it. */
.dossier-codes {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-top: 7px;
}
.dossier-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  font-weight: 600;
  color: var(--pine);
  background: var(--pine-tint);
  border: 1px solid #cfe0d6;
  border-radius: 7px;
  padding: 2px 8px;
}
.dossier-sub {
  font-size: 12px;
  color: var(--muted);
}

@media (prefers-reduced-motion: reduce) {
  .dossier-item {
    transition: none;
  }
}
