/*
 * SlavBot.com: what the bot posts in Discord, shown where the pages talk about it (src/features/visuals.js, data/visuals.json).
 * Linked by the home, Commands, Games and Moderation pages, after site.css and motion.css; theme.css still comes last.
 *
 * Three things live here:
 *   - an example of a bot message (.msg): an ink slip with a gold EXAMPLE stamp, the message's accent as a thick bar down its
 *     left edge, the bot's words in the site's type, its buttons as flat blocks in the poster's colours. Not Discord's look on
 *     purpose: it is the bot's payload laid out by the site, never a screenshot. The slip is black in both themes, like the
 *     other black blocks, so everything inside it may use the brand colours (.msg-frame is a listed area in theme.test.js);
 *   - the memes on the mascot (.meme), on an ink ground, because the portrait is see-through where she is not;
 *   - the World War board (.shot-ww), in the frame the other samples use (.shot, cards.css).
 * No gradient, shadow, rounding, filter or motion of its own; sizes from the type tokens; colours from site.css's tokens.
 */

/* ---------- an example of a bot message ---------- */

.msg {
  max-width: 560px;
  margin: 30px 0 0;
}

.msg-frame {
  position: relative;
  padding: 34px 16px 16px;
  border: 3px solid var(--rule);
  background: var(--ink);
  color: var(--cream);
}

.raid .msg-frame {
  border-color: var(--muted-on-ink);
}

.msg-stamp {
  position: absolute;
  top: 0;
  left: 0;
  padding: 4px 10px 3px;
  background: var(--gold);
  color: var(--ink);
  font: 400 var(--fs-tiny)/1.2 var(--display);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
}

/* The accent: the colour the bot gives the message, as the poster draws it (visuals.js ACCENTS). */
.acc-gold {
  --acc: var(--gold);
}

.acc-green {
  --acc: var(--g-tokens);
}

.acc-red {
  --acc: var(--red);
}

.msg-frame .msg-card {
  padding: 4px 0 4px 14px;
  border-left: 6px solid var(--acc);
}

.msg-frame .msg-card + .msg-row,
.msg-frame .msg-card + .msg-card {
  margin-top: 12px;
}

.msg-frame .msg-text p {
  max-width: none;
  margin: 0;
  font-size: var(--fs-small);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.msg-frame .msg-text .md-gap {
  margin-top: 0.8em;
}

.msg-frame .msg-text .md-h {
  margin: 2px 0 6px;
  color: var(--gold);
  font: 400 var(--fs-4)/1.05 var(--display);
  letter-spacing: var(--ls-tight);
}

.msg-frame .msg-text .md-h3 {
  margin-bottom: 4px;
  font-weight: 700;
}

.msg-frame .md-sub,
.msg-frame .msg-text .md-sub {
  margin-top: 4px;
  color: var(--muted-on-ink);
  font-size: var(--fs-tiny);
}

.msg-frame code {
  padding: 0 4px;
  background: var(--off);
  color: var(--cream);
  font: 700 0.92em var(--mono);
}

.msg-frame .msg-title {
  max-width: none;
  margin: 0 0 6px;
  color: var(--cream);
  font: 700 var(--fs-lede)/1.25 var(--body);
}

.msg-frame .msg-fname {
  margin: 8px 0 2px;
  font-weight: 700;
}

.msg-frame .msg-sep {
  height: 3px;
  margin: 12px 0 2px;
  background: var(--off);
  color: var(--cream);
}

.msg-frame .msg-img {
  display: block;
  width: 100%;
  max-width: 340px;
  height: auto;
  margin-top: 12px;
}

/* A row of buttons. Each is a span, so nothing here pretends to be pressable. */
.msg-frame .msg-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.msg-frame .msg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 5px 12px;
  font: 700 var(--fs-small)/1.2 var(--body);
}

.msg-frame .s-primary {
  background: var(--gold);
  color: var(--ink);
}

.msg-frame .s-secondary,
.msg-frame .s-link {
  background: var(--off);
  color: var(--cream);
}

.msg-frame .s-success {
  background: var(--g-tokens);
  color: var(--ink);
}

.msg-frame .s-danger {
  background: var(--red);
  color: var(--cream);
}

/* Disabled is grey whatever the style, as everywhere on the site; the dashed edge says it cannot be pressed. */
.msg-frame .msg-btn.off {
  border: 2px dashed var(--muted-on-ink);
  background: var(--off);
  color: var(--muted-on-ink);
}

/* A button that is only an emoji (the Mines tiles) is a square. */
.msg-frame .msg-btn:not(:has(.msg-label)) {
  width: 44px;
  min-height: 40px;
  padding: 4px 0;
}

.msg-frame .msg-select {
  display: block;
  width: 100%;
  max-width: 380px;
  padding: 8px 12px;
  border: 3px solid var(--off);
  color: var(--muted-on-ink);
  font-size: var(--fs-small);
}

.msg figcaption {
  margin-top: 8px;
  color: var(--quiet);
  font-size: var(--fs-small);
  line-height: 1.45;
}

.raid .msg figcaption {
  color: var(--muted-on-ink);
}

/* Where the examples sit. */
.start-show {
  padding-top: 0;
}

.start-show .msg {
  margin-top: 0;
}

.shots-ui {
  display: grid;
  gap: 0 32px;
  align-items: start;
}

@media (min-width: 900px) {
  .shots-ui {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}

/* ---------- the memes ---------- */

.memes {
  margin-top: 40px;
  padding-top: 22px;
  border-top: 4px solid var(--rule);
}

.memes h3 {
  margin: 0 0 8px;
  font-size: var(--fs-3);
}

.memes-lede {
  max-width: 40em;
  margin: 0;
}

/* On a phone the wide meme takes the row and the other two share the next. Where there is room, one row at the width of the
   1x files (the wide meme is twice as wide as the others and the same height), so a 1x screen fetches exactly those. */
.meme-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
  margin-top: 22px;
}

.meme-row .meme-wide {
  grid-column: 1 / -1;
}

@media (min-width: 900px) {
  .meme-row {
    grid-template-columns: 418px 212px 212px;
    justify-content: start;
  }

  .meme-row .meme-wide {
    grid-column: auto;
  }
}

.meme {
  margin: 0;
}

/* The portrait is see-through around her: the ink is what shows there (the colour is only for the alt text, if it ever shows). */
.meme img {
  display: block;
  width: 100%;
  height: auto;
  border: 3px solid var(--rule);
  background: var(--ink);
  color: var(--cream);
}

.meme figcaption {
  margin-top: 8px;
  font-size: var(--fs-small);
  line-height: 1.4;
}

.meme-cmd {
  font: 700 var(--fs-small)/1.3 var(--mono);
}

.meme-said {
  color: var(--quiet);
}

/* The home page's one meme sits in the red ledger block, beside its heading where there is room. */
.what-head {
  display: grid;
  gap: 24px 48px;
  align-items: end;
}

.what-head h2 {
  margin: 0;
}

.home-meme .meme {
  max-width: 418px;
}

.red .meme img {
  border-color: var(--ink);
}

.red .meme figcaption,
.red .meme-said {
  color: var(--cream);
}

@media (min-width: 940px) {
  .what-head {
    grid-template-columns: minmax(0, 1fr) minmax(0, 418px);
  }
}

/* ---------- the World War board ---------- */

/* At most the width of its 1x file, so a 1x screen fetches that one and a sharp screen the 2x. */
.shot-ww {
  max-width: 906px;
}

/* ---------- the Dashboard's own screens (src/features/dashboard.js) ---------- */

/* On the ink band: a plain hard-edged cream frame, no device and no browser bar. Two figures, one per crop of the same render, each
   with its own words: the narrow crop (the first column) under 1000px of window, the wide crop (the whole first screen) from 1000px up.
   The one not shown is display: none, so its lazy picture is never fetched and its words are not read out. Each is at most the width of
   its 1x file plus the frame, so a 1x screen fetches that file and a sharp screen the 2x. */
.dash-shot {
  max-width: 966px;
  margin: 28px 0 0;
}

.dash-shot-wide {
  display: none;
}

.dash-shot-narrow {
  max-width: 614px;
}

@media (min-width: 1000px) {
  .dash-shot-wide {
    display: block;
  }

  .dash-shot-narrow {
    display: none;
  }
}

.ink .dash-shot img {
  display: block;
  width: 100%;
  height: auto;
  border: 3px solid var(--cream);
}

.ink .dash-shot figcaption {
  max-width: 46em;
  margin-top: 10px;
  color: var(--muted-on-ink);
  font-size: var(--fs-small);
  line-height: 1.45;
}
