/* =========================================================================
   Layout editor (compose-editor.js): rules only its setups use. Every rule
   is scoped to .is-compose, which compose-editor.js puts on the body.
   ========================================================================= */

/* Export: Format and Download stay in view at the foot of a long size
   list (the dialog scrolls; its padding is 20 px). */
.is-compose dialog#edExport { max-height: calc(100dvh - 24px); }
.is-compose .cp-export-foot {
  position: sticky;
  bottom: -20px;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 0 -20px -20px;
  padding: 16px 20px 20px;
  background: var(--surface);
  border-top: 1px solid var(--line);
}

/* Meta tags after a Link Preview export: a code pane. */
.is-compose .cp-meta {
  font-family: var(--font-code);
  font-size: 12px;
  line-height: 18px;
  white-space: pre;
  overflow-x: auto;
  resize: vertical;
}

/* Accent words: one toggle per word of the headline. */
.is-compose .cp-accent { flex-wrap: wrap; }
.is-compose .cp-accent .btn { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Picked, as the Designs switcher marks the design shown. */
.is-compose .cp-accent .btn[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); font-weight: 700; }
@media (max-width: 1023px), (any-pointer: coarse) {
  .is-compose .cp-accent .btn { min-height: 44px; }
}

/* Starting Layouts (Social Images, YouTube): two to a row, each drawn
   with the person's own design. */
.is-compose .cp-layouts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 8px; }
.is-compose .cp-layouts .cp-look-pic { aspect-ratio: 16 / 10; }
.is-compose .cp-layouts .cp-look-name { white-space: normal; }

/* Arrows panel: the marks on the image, one toggle each, and the add row. */
.is-compose .cp-marks, .is-compose .cp-mark-add { flex-wrap: wrap; }
.is-compose .cp-marks .btn[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); font-weight: 700; }
@media (max-width: 1023px), (any-pointer: coarse) {
  .is-compose .cp-marks .btn, .is-compose .cp-mark-add .btn { min-height: 44px; }
}

/* Use Camera: the preview mirrored, as a mirror shows it. */
.is-compose .cp-cam { width: min(680px, calc(100vw - 32px)); }
.is-compose .cp-cam[open] { display: flex; flex-direction: column; gap: 16px; }
.is-compose .cp-cam-video { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; background: #000; transform: scaleX(-1); }
.is-compose .cp-cam-actions { justify-content: flex-end; }

/* App Icon Sizes, Small Sizes: the icon at real size on a light and a
   dark home screen color. The colors are the preview's own, so they stay
   in dark mode. */
.is-compose .cp-small { display: grid; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.is-compose .cp-small-row, .is-compose .cp-small-names { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: center; justify-items: center; }
.is-compose .cp-small-row { min-height: 76px; padding: 8px 4px; }
.is-compose .cp-small-row.is-light { background: #E9E7E1; }
.is-compose .cp-small-row.is-dark { background: #1C1C1E; }
.is-compose .cp-small-cell { display: flex; align-items: center; justify-content: center; }
.is-compose .cp-small canvas { display: block; }
.is-compose .cp-small-names { padding: 6px 4px; background: var(--surface); color: var(--muted); font-size: 13px; line-height: 18px; }
/* Export: a group's helper line sits under its sizes. */
.is-compose .st-sizes > .helper { margin: 4px 0 0; }
