/* The replay viewer's own layout and banner. A file rather than a <style>
   block, so the app origin's Content-Security-Policy can refuse inline style
   (server/headers.rs). */

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body { display: flex; flex-direction: column; font-family: var(--sans); }

/* Matches the app header (.appbar): light, hairline, wordmark + breadcrumb.
   Its values come from /assets/tokens.css, which viewer.html links first. */
#banner {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1rem;
  background: var(--page);
  color: var(--ink);
  font-size: var(--t-sm);
  border-bottom: 1px solid var(--rule);
  /* Sit above the replayed page (isolated in its iframe below) with a soft
     shadow, so the banner always reads as indice's chrome regardless of the
     archived page's own background. */
  position: relative;
  z-index: 1;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}
#banner a.home {
  color: var(--ink);
  font-weight: var(--w-bold);
  font-size: var(--t-lg);
  letter-spacing: -0.01em;
  text-decoration: none;
}
#banner .sep { color: var(--rule); }
#banner a#collection,
#banner a#collection-name {
  color: var(--accent-dk);
  text-decoration: none;
  white-space: nowrap;
}
#banner a#collection:hover,
#banner a#collection-name:hover { text-decoration: underline; }
/* The banner's main fact: when the page in view was captured. */
#captured {
  margin-left: var(--s-3);
  font-weight: var(--w-bold);
  white-space: nowrap;
}
#captured:empty { display: none; }
#current-url {
  color: var(--muted);
  font-family: var(--mono);
  font-size: var(--t-xs);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
  margin-left: 0.3rem;
}

/* A phone is too narrow for one line: the crumbs and the Notes button, then
   when the page was captured, then its URL, each on a line of its own. */
@media (max-width: 720px) {
  #banner { flex-wrap: wrap; row-gap: var(--s-1); }
  #banner a#collection,
  #banner a#collection-name { white-space: normal; }
  #anno-toggle { margin-left: auto; }
  #captured { order: 1; flex-basis: 100%; margin-left: 0; }
  #current-url { order: 2; flex-basis: 100%; margin-left: 0; }
}

#stage { flex: 1 1 auto; display: flex; min-height: 0; position: relative; }
#replay-container { flex: 1 1 auto; position: relative; min-height: 0; min-width: 0; }
#replay-frame { display: block; width: 100%; height: 100%; border: 0; }
#error { padding: 2rem; color: var(--danger); }

