/* v4's own few lines, over v2's stylesheet (public/css/v2.css, read as it is). */

/* The story page is v2's: the rail, the video, the beats. The notes pull out over the video pane from the rail, as
   v1's and v2's sidebars do (same place, same width), and are closed until asked for. */
.v4-notes {
    position: fixed; top: 0; bottom: 0; left: 60px; /* the rail */
    width: 592px; /* = .media-pane */ max-width: calc(100vw - 60px);
    background: var(--sepia-panel); border-right: 1px solid var(--sepia-border); box-shadow: 0.5rem 0 1.5rem rgba(0, 0, 0, .15);
    z-index: 1030; overflow-y: auto; padding: 1rem 1.25rem;
    transform: translateX(-105%); visibility: hidden; transition: transform 0.18s ease, visibility 0s linear 0.18s;
}
.v4-notes.open { transform: none; visibility: visible; transition: transform 0.18s ease; }
.v4-side { font-size: 0.88rem; }
.v4-side h3 { font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--sol-base1); margin: 1rem 0 0.4rem; }
.v4-side .card-ish { border: 1px solid var(--sepia-border); border-radius: 0.5rem; padding: 0.55rem 0.7rem; background: var(--sepia-surface, rgba(255,255,255,.35)); }
.v4-side .doc-line { white-space: pre-line; color: var(--sol-base00); }

/* The prose, as v2 shows a beat. */
.beat-prose { line-height: 1.65; font-size: var(--prose-size, 1.02rem); color: var(--sol-base01); }
.beat-prose p { margin: 0 0 0.6rem; }
.beat-prose p:last-child { margin-bottom: 0; }
.beat-prose .beat-speaker { font-weight: 600; color: var(--sol-base01); }
.beat-prose .beat-to { font-weight: 400; color: var(--sol-base1); }
.beat-prose .beat-teller { font-size: 0.72em; letter-spacing: 0.05em; text-transform: uppercase; color: var(--sol-cyan); }
.beat-prose.editing { white-space: pre-wrap; outline: 1px dashed var(--sol-base1); outline-offset: 4px; background: rgba(255, 255, 255, 0.55); cursor: text; }
.beat-prose p.reading-now { background: rgba(181, 137, 0, 0.12); border-radius: 0.3rem; box-shadow: 0 0 0 0.3rem rgba(181, 137, 0, 0.12); }
.v4-live { white-space: pre-wrap; }
.v4-v2 { border-left-color: var(--sol-base2, #eee8d5) !important; }
.v4-used { font-size: 0.78rem; color: var(--sol-base0); }
.v4-used summary { cursor: pointer; list-style: none; }
.v4-used summary::-webkit-details-marker { display: none; }
.v4-used .body { white-space: pre-line; border-left: 2px solid var(--sepia-border); padding-left: 0.6rem; margin: 0.3rem 0 0.5rem; }

/* A chapter's head; chapters picked up from v2, by title. */
.v4-chapter-head { border-bottom: 1px solid var(--sepia-border); margin: 1.75rem 0 0.75rem; padding-bottom: 0.35rem; display: flex; gap: 0.75rem; align-items: baseline; flex-wrap: wrap; }
.v4-folded { color: var(--sol-base1); font-size: 0.85rem; margin: -0.4rem 0 0.75rem; }

/* The composer. */
.v4-ahead { font-size: 0.78rem; color: var(--sol-base0); min-height: 1.1rem; }
.v4-ahead .chip { font-size: 0.72rem; }
.v4-extra textarea, .v4-extra input { font-size: 0.85rem; }

/* The working line (seeding). */
.v4-working { border: 1px solid var(--sepia-border); border-radius: 0.6rem; padding: 0.75rem 1rem; background: rgba(38, 139, 210, 0.05); }

/* The people page. */
.v4-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(28rem, 1fr)); gap: 0.9rem; }
.v4-grid .card-ish { border: 1px solid var(--sepia-border); border-radius: 0.6rem; padding: 0.75rem; background: var(--sepia-surface, rgba(255,255,255,.35)); }
.v4-grid textarea, .v4-grid input, .v4-grid select { font-size: 0.85rem; }

/* The beats and the composer run the whole width of the pane, to the right edge: no cap on a paragraph's measure (the
   stylesheet's 80ch for pages of prose), no 1100px cap on the composer, and only a sliver of padding on the right.
   On the left, the reading boxes sit 10px in from the video pane. */
#story-pane > .container-fluid { padding-right: 0.5rem !important; padding-left: 10px !important; }
#story-pane .beat-prose p, #story-pane .composer, #story-pane .v4-used .body { max-width: none; }
#story-pane .beat-row { padding-right: 0.25rem; }

/* Ready to send: the pill beside the step button (green: nothing behind the page would hold a step sent now; amber: the
   keeper is on the last beat, or Jev has not read the words in the box yet), and the line under the box. */
.v4-ready { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.78rem; padding: 0.2rem 0.65rem; border-radius: 999px; border: 1px solid var(--sepia-border); color: var(--sol-base1); white-space: nowrap; }
.v4-ready .spinner-border { width: 0.75rem; height: 0.75rem; border-width: 0.12em; }
.v4-ready.is-ready { color: var(--sol-green, #859900); border-color: rgba(133, 153, 0, 0.45); background: rgba(133, 153, 0, 0.08); }
.v4-ready.is-busy { color: var(--sol-yellow, #b58900); border-color: rgba(181, 137, 0, 0.45); background: rgba(181, 137, 0, 0.08); }
.v4-ready-line span:empty { display: none; }
