/* ---------------------------------------------------------------------------
   Peltify — the post composer.

   Twitter's compose dialog: X top-left, Drafts top-right, avatar beside a big
   field, toolbar bottom-left, Post bottom-right. It sits on `.ig-scrim` /
   `.ig-dialog` from ig.css and adds only what a compose box needs.

   The textarea GROWS rather than scrolling, up to 420px, because a person
   writing about a record should be able to see the whole thing they wrote.
   --------------------------------------------------------------------------- */

.cmp { padding: 0; overflow: visible; }
.cmp-scrim { align-items: start; padding-top: 8vh; }

.cmp-head { display: flex; align-items: center; gap: 8px; padding: 6px 8px; }
.cmp-grow { flex: 1 1 auto; }
.cmp-drafts { font-size: 13px; }
.cmp-badge {
  display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px; background: var(--violet); color: #fff; font-size: 11px; font-weight: 800;
}

.cmp-body { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; padding: 4px 16px 8px; }
.cmp-av { flex: none; }
.cmp-fields { display: grid; gap: 8px; min-width: 0; }

.cmp-title {
  width: 100%; padding: 6px 0;
  border: 0; border-bottom: 1px solid transparent;
  background: none; font-size: 18px; font-weight: 800;
}
.cmp-title:focus { outline: none; border-bottom-color: var(--line); }
.cmp-title::placeholder { color: var(--ink-faint); font-weight: 700; }

.cmp-anchor { position: relative; min-width: 0; }
.cmp-ta {
  display: block; width: 100%; min-height: 96px; max-height: 420px;
  padding: 4px 0; border: 0; background: none;
  font-size: 19px; line-height: 1.45; resize: none; overflow-y: auto;
}
.cmp-ta:focus { outline: none; }
.cmp-ta::placeholder { color: var(--ink-faint); }

/* ----------------------------------------------------------------- strip --- */

.cmp-strip {
  display: flex; gap: 8px; overflow-x: auto; overflow-y: hidden;
  padding-bottom: 4px;
}
.cmp-chip {
  display: flex; align-items: center; gap: 8px; flex: 0 0 auto; max-width: 220px;
  padding: 5px 6px 5px 5px;
  border: 1px solid var(--line); border-radius: var(--r-box); background: var(--paper);
}
.cmp-chip-art { width: 34px; height: 34px; flex: none; border-radius: var(--r-art); overflow: hidden; line-height: 0; }
.cmp-chip-art img { width: 100%; height: 100%; object-fit: cover; }
.cmp-chip-art.is-blank { display: grid; place-items: center; background: var(--paper-deep); color: var(--ink-faint); }
.cmp-chip-t { display: grid; min-width: 0; line-height: 1.25; }
.cmp-chip-t b { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmp-chip-t span { font-size: 11.5px; color: var(--ink-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmp-chip-x {
  display: grid; place-items: center; width: 24px; height: 24px; flex: none;
  border: 0; border-radius: 50%; background: none; color: var(--ink-faint); cursor: pointer;
}
.cmp-chip-x:hover { background: var(--paper-deep); color: var(--ink); }

/* ---------------------------------------------------------------- review --- */

.cmp-review { display: grid; gap: 8px; padding: 10px 0 2px; border-top: 1px solid var(--line-soft); }
.cmp-hint { margin: 0; font-size: 13px; color: var(--ink-faint); }
.cmp-rev-one { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.cmp-summary { margin: 0; font-size: 13.5px; color: var(--ink-soft); }
.cmp-summary b { color: var(--ink); }

.cmp-rev-list { display: grid; gap: 4px; }
.cmp-rev-row {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 8px; border: 1px solid transparent; border-radius: var(--r-box);
  cursor: pointer;
}
.cmp-rev-row:hover { background: var(--paper); }
.cmp-rev-row.is-on { border-color: var(--violet); background: var(--violet-wash); }
.cmp-rev-art { width: 30px; height: 30px; flex: none; border-radius: var(--r-art); overflow: hidden; line-height: 0; }
.cmp-rev-art img { width: 100%; height: 100%; object-fit: cover; }
.cmp-rev-art.is-blank { display: grid; place-items: center; background: var(--paper-deep); color: var(--ink-faint); }
.cmp-rev-t { flex: 1 1 auto; min-width: 0; display: grid; line-height: 1.25; }
.cmp-rev-t b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmp-rev-t span { font-size: 11.5px; color: var(--ink-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* The stars inside a row are smaller than the single-work case, because there
   are five of them stacked and the row must still be one line tall. */
.cmp-rev-row .st svg { width: 18px; height: 18px; }

/* ------------------------------------------------------------------ foot --- */

.cmp-err:empty { display: none; }
.cmp-err { margin: 0; padding: 0 16px 6px; font-size: 13px; color: var(--coral-dark); }

.cmp-foot {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; border-top: 1px solid var(--line);
}
.cmp-count { margin-left: auto; white-space: nowrap; }
.cmp-tools { display: flex; align-items: center; gap: 4px; min-width: 0; }
.cmp-tool { font-size: 13px; padding: 0 10px; color: var(--violet); }
.cmp-tool.is-on { background: var(--violet-wash); }
.cmp-count { font-size: 12.5px; color: var(--ink-faint); }
.cmp-count.is-over { color: var(--coral-dark); font-weight: 800; }
.cmp-post { min-height: 36px; padding: 0 20px; }

/* WHO CAN SEE IT (2026-09-07). "A little subtle": a globe or a lock beside
   Post, with the one word it means. Friends-only gets the violet wash the
   review toggle uses when it is on, so "different from the default" reads the
   same way everywhere in this dialog. */
.cmp-vis {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 36px; padding: 0 10px;
  font-size: 13px; font-weight: 700; color: var(--ink-soft);
  border: 1px solid var(--line);
}
.cmp-vis-i { display: inline-grid; place-items: center; line-height: 0; }
.cmp-vis-i svg { width: 15px; height: 15px; }
.cmp-vis.is-friends { color: var(--violet); border-color: var(--violet); background: var(--violet-wash); }

/* --------------------------------------------------------------- drafts ---- */

.cmp-drafts-scrim { z-index: 70; }
.cmp-drafts-list { display: grid; gap: 4px; padding: 12px; }
.cmp-draft { display: flex; align-items: center; gap: 8px; padding: 6px; border-radius: var(--r-box); }
.cmp-draft:hover { background: var(--paper); }
.cmp-draft-t { flex: 1 1 auto; min-width: 0; display: grid; border: 0; background: none; padding: 0; text-align: left; cursor: pointer; }
.cmp-draft-t b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmp-draft-t span { font-size: 12px; color: var(--ink-faint); }

@media (max-width: 600px) {
  .cmp-scrim { padding-top: 0; }
  .cmp-body { grid-template-columns: minmax(0, 1fr); }
  .cmp-av { display: none; }
  .cmp-foot { padding-bottom: calc(10px + env(safe-area-inset-bottom)); gap: 4px; }
  /* One row on a phone: the tool labels go, the glyphs stay, Post keeps the
     right edge — Twitter's own footer. */
  .cmp-tool { padding: 0 8px; }
  .cmp-tool > :not(svg) { display: none; }
  .cmp-tool svg { width: 22px; height: 22px; }
  .cmp-count { font-size: 12px; }
  .cmp-ta { font-size: 17px; }
  /* The word goes on a phone, the glyph stays — the label lives in the title. */
  .cmp-vis { padding: 0 8px; }
  .cmp-vis-w { display: none; }
}

/* ADD REVIEW LIVES BESIDE THE TITLE (Nick, 2026-09-04: "make the 'add review'
   feature at the top maybe?"). The toggle is the same node the toolbar built;
   it is placed here, so the footer keeps only Mention media. */
.cmp-titlerow { display: flex; align-items: center; gap: 8px; }
.cmp-titlerow .cmp-title { flex: 1 1 auto; min-width: 0; }
.cmp-titlerow .cmp-toggle { flex: none; border: 1px solid var(--line); }
.cmp-titlerow .cmp-toggle.is-on { border-color: var(--violet); }

/* 28.1 (l) — "the image title in the media mentioner preview is too big": a
   work named in the composer's field reads one step below the body. */
.cmp .rin-chip { font-size: 0.9em; }
