/* goonlab: the Start box on a ready bot's page (templates/bots/_panel.html,
   docs/bots/spec/42-the-stream-page.md, section 1). The site's own sheets
   style the buttons and the panel; nothing here touches another page. */

.bot-start { display: flex; flex-direction: column; gap: 0.7rem; width: 100%; }
.bot-start p { margin: 0; }
.bot-start-lists { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }
.bot-start-field { display: flex; flex-direction: column; gap: 0.3rem; min-width: 0; }
.bot-start-label {
  font-family: var(--mono); font-size: 0.72rem; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.06em;
}
.bot-start-time input { max-width: 9rem; }
.bot-start-more[hidden], .bot-start-estimate p[hidden] { display: none; }
.bot-start textarea, .bot-start select, .bot-start input[type="number"] {
  width: 100%;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  padding: 0.55rem 0.75rem;
  font: inherit;
  /* at least 16 pixels: a phone zooms the page into a smaller field */
  font-size: 16px;
}
.bot-start textarea { resize: vertical; min-height: 4.5rem; }
.bot-start textarea:focus, .bot-start select:focus, .bot-start input[type="number"]:focus { border-color: var(--accent); outline: none; }
.bot-start-estimate { display: flex; flex-direction: column; gap: 0.15rem; }
.bot-start-estimate p:last-child { color: var(--muted); font-size: 0.9rem; }
.bot-start-few {
  border-left: 3px solid var(--warn);
  padding: 0.45rem 0.8rem;
  background: rgba(232, 196, 104, 0.08);
  border-radius: 6px;
}
.bot-start-few[hidden] { display: none; }
.bot-start-other { display: flex; flex-direction: column; gap: 0.6rem; }

/* a box prepared for a continue or a sequel (docs/bots/spec/84-continue-a-stream-and-
   the-sequel.md, section 3): its line above the choices in the look of the line about
   more pictures, the link that leaves the preparation under it, his text for a sequel
   in the look of the persona's field; a refusal in the look of the floor's sentence */
.bot-start-follow {
  width: 100%;
  border-left: 3px solid var(--accent);
  padding: 0.45rem 0.8rem;
  border-radius: 6px;
  background: var(--tint);
  /* the address of a prepared box lands here: below the site's header, with the
     box's heading "Start a stream" still in sight */
  scroll-margin-top: 9rem;
}
.bot-start-follow p { margin: 0; overflow-wrap: anywhere; }
.bot-start-follow p + p { margin-top: 0.35rem; }
.bot-start-follow a { color: var(--accent); text-decoration: underline; text-underline-offset: 0.15em; }
.bot-start-addendum { display: flex; flex-direction: column; gap: 0.5rem; width: 100%; min-width: 0; }
.bot-start-addendum .hint { font-size: 0.8rem; color: var(--muted); margin: 0; overflow-wrap: anywhere; }
.bot-start-addendum textarea {
  width: 100%;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  padding: 0.55rem 0.75rem;
  font: inherit;
  font-size: 16px;
  resize: vertical;
  min-height: 4.5rem;
}
.bot-start-addendum textarea:focus { border-color: var(--accent); outline: none; }
.bot-start-refused {
  width: 100%;
  margin: 0;
  border-left: 3px solid var(--warn);
  padding: 0.45rem 0.8rem;
  background: rgba(232, 196, 104, 0.08);
  border-radius: 6px;
  scroll-margin-top: 9rem;
}
.bot-start-buttons { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }
.bot-start-buttons .btn { min-height: 44px; }

@media (max-width: 720px) {
  .bot-start-lists { grid-template-columns: 1fr; }
  .bot-start-buttons .btn { flex: 1 1 auto; }
  /* no text under 12 pixels on a phone (docs/bots/spec/93-corrections-for-phones.md,
     section 5): the small headings and the "?" of "Speed", in their own letters */
  .bot-start-label, .bot-start .tip .tip-btn { font-size: 12.5px; }
}

/* the tick "Indefinitely" beside the time (docs/bots/spec/71-indefinitely.md),
   and the tick "Wait for my answer" drawn the same way (docs/bots/spec/81-she-
   waits-for-his-answer.md), and the tick "Pause the stream when I switch to
   another window" under it */
.bot-start-indefinite, .bot-start-wait, .bot-start-pause { display: inline-flex; align-items: center; gap: 0.5rem; cursor: pointer; }
.bot-start-indefinite input, .bot-start-wait input, .bot-start-pause input { flex: none; width: 1.05rem; height: 1.05rem; accent-color: var(--accent); }
/* a tick's own note in the box (the owner, 2026-11-21 00:27 CET: "the description of the checkbox does not make
   it obvious that it describes the checkbox, bad ui"): right under the tick's words and in line with them (the
   box's width and the gap), close to its tick and apart from the next part */
/* the box's parts stand 0.7rem apart: the note is drawn 0.15rem under its tick */
.bot-start .hint.tick-note { margin: -0.55rem 0 0 1.55rem; }
/* the words of "Pause the stream when I switch to another window" wrap in the box's column: its box stays
   beside their first line, as the box of the tick about typing does */
.bot-start-pause { align-items: flex-start; }
.bot-start-pause input { margin: 0.2em 0 0; }
.bot-start-pause span { min-width: 0; overflow-wrap: anywhere; }

/* the tick "When you type in chat, ..." right after "Wait for my answer" (docs/bots/
   spec/105-the-character-waits-while-he-types.md, section 2), drawn as that tick; its
   sentence is long and wraps, so the box stays beside its first line */
.bot-start-typing { display: inline-flex; align-items: flex-start; gap: 0.5rem; cursor: pointer; }
.bot-start-typing input { flex: none; width: 1.05rem; height: 1.05rem; margin: 0.2em 0 0; accent-color: var(--accent); }
.bot-start-typing span { min-width: 0; overflow-wrap: anywhere; }

/* "Where you are" (docs/bots/spec/106-how-he-is-there.md, section 1): the choice of
   "Which pictures does your bot show?" on the form that makes a bot (static/css/
   goonlab.css, radio-stack; static/bots/build.css, each choice's words over its note),
   under a heading in the look of the box's others */
.bot-start-presence { border: 0; margin: 0; padding: 0; min-width: 0; }
.bot-start-presence legend { padding: 0; margin-bottom: 0.3rem; }
.bot-start-presence .radio-stack { margin-top: 0; }
.bot-start-presence-choices > div { display: flex; flex-direction: column; gap: 0.6rem; }
.bot-start-presence-text { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.bot-start-presence-text strong { color: var(--text); }
.bot-start-presence-text .hint { overflow-wrap: anywhere; }

/* the two modes Quality and Fast (docs/bots/spec/118, section 1), drawn as "Where you
   are" just above: radio buttons, each choice's words in bold over its note, under a
   heading in the look of the box's others */
.bot-start-modes { border: 0; margin: 0; padding: 0; min-width: 0; }
.bot-start-modes legend { padding: 0; margin-bottom: 0.3rem; }
.bot-start-modes .radio-stack { margin-top: 0; }
.bot-start-modes-choices > div { display: flex; flex-direction: column; gap: 0.6rem; }
.bot-start-mode-text { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.bot-start-mode-text strong { color: var(--text); }
.bot-start-mode-text .hint { overflow-wrap: anywhere; }

/* "Advanced" (section 3): a part closed at first under the modes, its heading drawn as
   "Edit your personas" (static/bots/personas.css); the choice of every AI, the warning
   for a slow AI and the three ticks inside it, spaced as the box's other parts */
.bot-start-advanced { width: 100%; min-width: 0; }
.bot-start-advanced > summary { list-style: none; cursor: pointer; display: inline-block; }
.bot-start-advanced > summary::-webkit-details-marker { display: none; }
.bot-start-advanced[open] > summary { margin-bottom: 0.6rem; }
.bot-start-advanced-parts { display: flex; flex-direction: column; gap: 0.7rem; min-width: 0; }
@media (max-width: 720px) {
  .bot-start-advanced > summary.btn { min-height: 44px; }
}

/* the warning for a slow AI (section 4): the site's yellow notice (static/css/parts.css,
   notice-warn), with no room under it beyond the box's own gap */
.bot-start-slow { margin: 0; overflow-wrap: anywhere; }
.bot-start-slow[hidden] { display: none; }

/* "Start (free)" beside the box's own button: THE SAME LOOK, no rule of its own (the owner,
   2026-11-20 21:41 CET: "the "Start (free)" button should have the exact same css as the
   normal start"); the note under them is the box's hint, no warning colour */
.bot-start-free-note { overflow-wrap: anywhere; }

/* the slider "Speed" (docs/bots/spec/76-the-speed-of-a-stream.md, section 3.1):
   the video form's "Subtitle speed" with its "?" (static/css/studio.css, "the [?]
   marks" and "the extras"), the same rules, held inside the Start box because the
   bot's pages do not load the video form's sheet */
.bot-start-speed .bot-start-label { display: inline-flex; align-items: center; gap: 0.45rem; }
.bot-start-speed .bot-start-label label { cursor: pointer; }
.bot-start .slider-row { display: flex; align-items: center; gap: 0.8rem; }
.bot-start .slider-row input[type="range"] { flex: 1; min-width: 0; accent-color: var(--accent); }
.bot-start .slider-row output { font-family: var(--mono); color: var(--accent); min-width: 3rem; text-align: right; }
.bot-start .tip { position: relative; display: inline-flex; align-items: center; vertical-align: middle; }
.bot-start .tip-btn {
  width: 1.25rem; height: 1.25rem; border-radius: 50%; padding: 0;
  border: 1px solid var(--line); background: var(--panel-2); color: var(--muted);
  font-family: var(--sans); font-size: 0.74rem; font-weight: 700; line-height: 1;
  display: grid; place-items: center; cursor: help;
  transition: border-color 0.12s ease, color 0.12s ease, background 0.12s ease;
}
.bot-start .tip-btn:hover, .bot-start .tip:focus-within .tip-btn, .bot-start .tip.is-open .tip-btn {
  border-color: var(--accent); color: var(--accent); background: var(--tint);
}
.bot-start .tip-pop {
  position: absolute; z-index: 45; top: calc(100% + 9px); left: 50%;
  transform: translateX(-50%) translateY(-4px);
  width: 19rem; max-width: calc(100vw - 2rem);
  background: #241a30; border: 1px solid var(--accent-dim); border-radius: 10px;
  padding: 0.7rem 0.85rem; color: var(--text);
  font-family: var(--sans); font-size: 0.82rem; font-weight: 400; line-height: 1.45;
  text-transform: none; letter-spacing: 0; text-align: left; white-space: normal;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.55);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 0.12s ease, transform 0.12s ease, visibility 0.12s;
}
.bot-start .tip-pop::before {
  content: ""; position: absolute; top: -5px; left: 50%;
  width: 8px; height: 8px; background: #241a30;
  border-left: 1px solid var(--accent-dim); border-top: 1px solid var(--accent-dim);
  transform: translateX(-50%) rotate(45deg);
}
.bot-start .tip:hover .tip-pop, .bot-start .tip:focus-within .tip-pop, .bot-start .tip.is-open .tip-pop {
  opacity: 1; visibility: visible; pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
@media (prefers-reduced-motion: reduce) { .bot-start .tip-pop { transition: none; } }
/* phones and small tablets: the explanation becomes a sheet above the tab bar,
   never clipped (as on the video form) */
@media (max-width: 899px) {
  .bot-start .tip-pop {
    position: fixed; left: 1rem; right: 1rem; top: auto; width: auto; max-width: none;
    bottom: calc(var(--tabbar-space, 58px) + 0.8rem + var(--actionbar-space, 0px)); transform: none;
  }
  /* the "?" of "Speed" stands between the choice of the AI (21 px over its
     middle) and the slider (15 px under it): its finger's area reaches both
     and covers neither (docs/bots/spec/93-corrections-for-phones.md, section 4) */
  .bot-start-speed .tip-btn::before { inset: -12px -13px -6px; }
  .bot-start .tip:hover .tip-pop, .bot-start .tip:focus-within .tip-pop, .bot-start .tip.is-open .tip-pop { transform: none; }
  .bot-start .tip-pop::before { display: none; }
}

/* the bar at the foot of a phone's screen (docs/bots/spec/93-corrections-for-phones.md,
   section 1): the order form's bar (static/css/parts.css, action-bar and price-bar),
   shown by start.js on a narrow screen while the box's own button is not on the
   screen. The order form's bar shows under 900 pixels; this one only on the bots'
   narrow screen, and never while it carries "hidden". */
.action-bar.bot-start-bar[hidden] { display: none; }
@media (min-width: 721px) {
  .action-bar.bot-start-bar[data-action-bar] { display: none; }
}
.bot-start-bar .action-cost { margin: 0; }
.bot-start-bar .btn-block { min-height: 44px; }
/* every button of the bar keeps its whole words inside the screen (the audit of 2026-11-21:
   "End it and start this one (free)" ran past the right edge at 320 pixels): its words wrap
   inside it where the screen is narrower than they are, never wider than the bar */
.bot-start-bar .btn { min-width: 0; max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
/* with "Start (free)" the bar holds two buttons (docs/bots/spec/118, section 5): side by
   side where each fits on one line, otherwise one under the other */
.bot-start-bar-buttons { display: flex; flex-wrap: wrap; gap: 0.5rem; min-width: 0; }
.bot-start-bar .bot-start-bar-buttons .btn { flex: 1 1 auto; width: auto; }
/* why the bar's start button cannot be pressed (the audit of 2026-11-21): the top's sentence
   for too few tokens, in its look, right above the bar's buttons, a little smaller so that the
   bar stays low; its link "Get more tokens" takes a finger's press a little around its words */
.bot-start-bar .bot-start-few { font-size: 0.9rem; padding: 0.35rem 0.7rem; overflow-wrap: anywhere; }
.bot-start-bar .bot-start-few a { position: relative; }
.bot-start-bar .bot-start-few a::before { content: ""; position: absolute; inset: -0.5rem -0.35rem; }

/* THE TWO MODES AS TWO BIG CARDS at the top of the box (templates/bots/_start_top.html; the
   owner, 2026-11-20 22:48 CET: "BIG MASSIVE ... TOGGLE BUTTONS LIKE IN THE ... VIDEO PAGE"): the
   order form's cards (static/css/parts.css, fieldset.choices and label.choice), the two side by
   side, each holding its mode's word alone in bigger letters */
fieldset.choices.bot-start-modes { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; width: 100%; }
.bot-start-modes label.choice { justify-content: center; min-height: 3.4rem; }
.bot-start-modes .choice-title { font-size: 1.2rem; }
/* the one line of the estimate under the two modes (23:00 CET the same day: "a simple "Estiamted X
   tokens a minute""), and the free sentence that stands in its place */
.bot-start-rate { margin: 0; color: var(--text); overflow-wrap: anywhere; }
.bot-start-rate[hidden] { display: none; }
/* the one-time price of more pictures for a long stream, right under that line since 2026-11-21
   (the owner, 02:20:19 CET: "make sure the making the bot estimate is visible where the other
   esimate is now"): the box's hint style (.hint), its letters as big as that line's, on every
   screen */
.bot-start-top .bot-start-more { font-size: inherit; overflow-wrap: anywhere; }
.bot-start-estimate[hidden] { display: none; }

/* THE START BUTTONS AT THE VERY TOP OF THE BOX, above its heading (templates/bots/
   _start_top.html; the owner, 2026-11-20 21:41 CET: "Move them above to the very top"): the
   part takes the box's width; its buttons share the row and fill it, each as wide as its
   words need at least, one under the other where they do not fit side by side; under them
   the sentence for too few tokens and the note about free time, with the form's own spacing */
.bot-start-top { display: flex; flex-direction: column; gap: 0.6rem; width: 100%; min-width: 0; }
.bot-start-top p { margin: 0; }
.bot-start-top .bot-start-buttons .btn {
  flex: 1 1 auto; justify-content: center; text-align: center;
  padding-left: 1rem; padding-right: 1rem;
}

/* the time's field while "Indefinitely" is ticked: a locked field takes no press itself, so
   the press goes through to its label, where start.js takes the tick off and puts the cursor
   into the field (the owner, 2026-11-20 21:46 CET, could not type into it and did not see why) */
.bot-start-time input:disabled { pointer-events: none; }
.bot-start-time:has(input:disabled) { cursor: pointer; }

/* his persona's two buttons in one row: "Create a persona" and "Edit your personas"; the
   opened part takes the whole width under them (static/bots/personas.css gives it the width) */
.bot-start-persona-buttons { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: flex-start; width: 100%; min-width: 0; }
.bot-start-persona-buttons > .bot-start-personas { width: auto; }
.bot-start-persona-buttons > .bot-start-personas[open] { width: 100%; flex: 1 1 100%; }
.bot-start-persona-buttons > .btn[hidden] { display: none; }
@media (max-width: 720px) {
  .bot-start-persona-buttons > .btn { min-height: 44px; }
}

/* "SET UP YOUR TOY" (docs/bots/spec/124-a-toy-is-set-up-before-the-stream-starts.md, section 1):
   a part closed at first under "Advanced", its heading drawn as "Advanced" (a ghost button), and
   under it, in the heading itself so that it is seen while the part is closed, the sentence that
   says the toy connects by itself (start.js shows it). The Device panel in it is the stream
   page's own (templates/bots/_toy.html); the bot's pages do not load the stream page's sheet, so
   its look is given here by the same rules as there (static/bots/stream/page.css, "the Device
   button and its panel": the panel, its rows, its status lines, How far it moves, the fold of the
   way through an app, The Handy's box, its tick, and on a narrow screen held upright every thing
   to tap 44 pixels high), each held inside this part. The button Test stands in a row of the
   panel with its note in the look of The Handy's note. */
.bot-start-toy { width: 100%; min-width: 0; }
.bot-start-toy > summary {
  list-style: none; cursor: pointer;
  display: flex; flex-direction: column; align-items: flex-start; gap: 0.35rem;
}
.bot-start-toy > summary::-webkit-details-marker { display: none; }
.bot-start-toy[open] > summary { margin-bottom: 0.6rem; }
.bot-start-toy-ready { overflow-wrap: anywhere; }
@media (max-width: 720px) {
  .bot-start-toy > summary .btn { min-height: 44px; display: inline-flex; align-items: center; }
}
.bot-start-toy .bots-room-toy {
  display: grid;
  gap: 10px;
  padding: 10px 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 0.9rem;
  color: var(--text);
  min-width: 0;
}
.bot-start-toy .bots-room-toy p { margin: 0; }
.bot-start-toy .bots-room-toy-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.bot-start-toy .bots-room-toy-row .btn { min-height: 40px; }
.bot-start-toy .bots-room-toy-status { color: var(--muted); }
.bot-start-toy .bots-room-toy-status.is-ok { color: var(--text); }
.bot-start-toy .bots-room-toy-status.is-bad { color: var(--warn); }
.bot-start-toy .bots-room-toy-range {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 16px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.bot-start-toy .bots-room-toy-range legend { float: left; margin: 0 4px 0 0; padding: 0; font-weight: 650; }
.bot-start-toy .bots-room-toy-range label { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.bot-start-toy .bots-room-toy-range input { width: 7rem; accent-color: var(--accent); }
.bot-start-toy .bots-room-toy-range output {
  min-width: 2.6rem; text-align: right; color: var(--accent);
  font-family: var(--mono); font-variant-numeric: tabular-nums;
}
.bot-start-toy .bots-room-toy-help { margin: 0; }
.bot-start-toy .bots-room-toy-help p { margin: 0 0 0.5em; }
.bot-start-toy .bots-room-toy-help p:last-child { margin-bottom: 0; }
.bot-start-toy .bots-room-toy-handy { display: grid; gap: 8px; }
.bot-start-toy .bots-room-toy-handy-note, .bot-start-toy .bots-room-toy-test-note { color: var(--muted); }
.bot-start-toy .bots-room-toy-key {
  display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px 8px;
  max-width: 100%; min-width: 0; color: var(--muted);
}
.bot-start-toy .bots-room-toy-key input {
  width: 14rem; max-width: 100%; min-height: 40px;
  background: var(--panel-2); border: 1px solid var(--line-strong); border-radius: var(--radius);
  color: var(--text); padding: 0.45rem 0.7rem; font: inherit; font-family: var(--mono);
}
.bot-start-toy .bots-room-toy-key input:focus { border-color: var(--accent); }
.bot-start-toy .bots-room-toy-key input:disabled { opacity: 0.6; }
.bot-start-toy .bots-room-toy-auto { display: flex; align-items: flex-start; gap: 0.5rem; cursor: pointer; justify-self: start; }
.bot-start-toy .bots-room-toy-auto input { flex: none; width: 1.05rem; height: 1.05rem; margin: 0.15em 0 0; accent-color: var(--accent); }
.bot-start-toy .bots-room-toy-auto span { min-width: 0; overflow-wrap: anywhere; }
.bot-start-toy .bots-room-toy-test-note { min-width: 0; overflow-wrap: anywhere; }
/* "When it moves" (docs/bots/spec/122, section 2), as the stream page's sheet draws it */
.bot-start-toy .bots-room-toy-when { border: 0; margin: 0; padding: 0; min-width: 0; }
.bot-start-toy .bots-room-toy-when legend { padding: 0; margin: 0 0 0.3rem; font-weight: 650; }
.bot-start-toy .bots-room-toy-when .radio-stack { margin-top: 0; }
.bot-start-toy .bots-room-toy-when-choices > div { display: flex; flex-direction: column; gap: 0.5rem; }
.bot-start-toy .bots-room-toy-when .radio-stack label { font-size: inherit; }
.bot-start-toy .bots-room-toy-when-text { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.bot-start-toy .bots-room-toy-when-text strong { color: var(--text); }
.bot-start-toy .bots-room-toy-when-text .hint { font-size: inherit; overflow-wrap: anywhere; }
@media (max-width: 899px) and (orientation: portrait) {
  .bot-start-toy .bots-room-toy-when .radio-stack label { min-height: 44px; }
  .bot-start-toy .bots-room-toy-row .btn { min-height: 44px; }
  .bot-start-toy .bots-room-toy-key input { min-height: 44px; font-size: 16px; }
  .bot-start-toy .bots-room-toy-auto { min-height: 44px; align-items: center; }
  .bot-start-toy .bots-room-toy-auto input { margin: 0; }
  .bot-start-toy .bots-room-toy-range label { min-height: 44px; }
  .bot-start-toy .bots-room-toy-help summary { min-height: 44px; }
}
