/* What's Happening: the "Slides (Story / Reel)" mode. Layered on top of ../newsletters/shared/editor.css. */
body[data-mode="image"] [data-only="slides"], body[data-mode="slides"] [data-only="image"] { display: none !important; }

.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin-top: 8px; }
.seg button { padding: 10px 8px; border: 1px solid var(--line); background: #fff; font-weight: 700; font-size: 13px; color: var(--ink-2); border-radius: 0; }
.seg button + button { border-left: 0; }
.seg button[aria-pressed="true"] { background: var(--cherry); border-color: var(--cherry); color: #fff; }
.panel label.check { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.panel label.check input { width: auto; margin: 0; }

.slides-stage { width: 100%; max-width: 760px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.slide-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; width: 100%; font-size: 13px; }
.slide-tools label { display: flex; align-items: center; gap: 8px; margin: 0; font-weight: 600; }
.slide-tools input[type=number] { width: 64px; padding: 6px 8px; border: 1px solid var(--line); background: #fff; }
.slide-tools .tool { padding: 8px 18px; border: 1px solid var(--charcoal); background: #fff; font-weight: 700; border-radius: 0; }
.slide-tools .tool.primary { background: var(--cherry); border-color: var(--cherry); color: #fff; }
.slide-tools .count-line { margin-left: auto; color: var(--ink-2); font-weight: 600; }

.slidewrap { position: relative; line-height: 0; box-shadow: 0 2px 6px rgba(35,31,32,.12), 0 24px 48px -16px rgba(35,31,32,.35); background: #fff; max-width: 100%; }
#slideOut { display: block; height: min(72vh, 760px); width: auto; aspect-ratio: 9 / 16; max-width: 100%; }
/* the guide is only drawn over the preview; it is never part of the PNGs */
.safezone { position: absolute; left: 7.4074%; right: 7.4074%; top: 13.0208%; bottom: 16.6667%; border: 2px dashed #ffd400; box-shadow: 0 0 0 1px rgba(0,0,0,.35); pointer-events: none; }
.safezone[hidden] { display: none; }
.safezone span { position: absolute; left: 4px; top: 4px; font: 700 11px/1.2 var(--sans); color: #231f20; background: #ffd400; padding: 2px 5px; }

.playbar { width: 100%; height: 4px; background: var(--line); overflow: hidden; }
.playbar i { display: block; height: 100%; width: 0; background: var(--cherry); }
.playbar i.run { animation: playfill var(--secs, 3s) linear forwards; }
@keyframes playfill { from { width: 0; } to { width: 100%; } }

.filmstrip { list-style: none; margin: 0; padding: 4px 2px 10px; display: flex; gap: 10px; width: 100%; overflow-x: auto; }
.film-item { flex: 0 0 auto; width: 118px; display: flex; flex-direction: column; gap: 4px; }
.film-item.over { outline: 2px dashed var(--turquoise); outline-offset: 2px; }
.film-pick { display: block; padding: 0; border: 3px solid transparent; background: #fff; line-height: 0; border-radius: 0; }
.film-item.on .film-pick { border-color: var(--cherry); }
.film-pick canvas { width: 100%; height: auto; aspect-ratio: 9 / 16; }
.film-name { font-size: 11.5px; font-weight: 600; line-height: 1.25; color: var(--ink); min-height: 2.5em; overflow: hidden; word-break: break-word; }
.film-btns { display: flex; gap: 4px; }
.film-btns button { flex: 1; padding: 4px 0; font-size: 12px; font-weight: 600; border: 1px solid var(--line); background: #fff; border-radius: 0; }
.film-btns button:disabled { opacity: .35; cursor: default; }
.film-btns button:not(:disabled):hover { border-color: var(--charcoal); }

@media (max-width: 900px) {
  body[data-mode="slides"] .stage { order: -1; padding: 12px; }
  #slideOut { height: auto; width: 100%; max-width: 360px; }
  .slidewrap { width: 100%; max-width: 360px; }
  .slide-tools .count-line { margin-left: 0; width: 100%; }
}

/* let the slide preview and filmstrip shrink to the screen (the filmstrip scrolls sideways by itself) */
body[data-mode="slides"] .stage { grid-template-columns: minmax(0, 1fr); }
.slides-stage { min-width: 0; }
.time-tip{margin:-4px 0 6px}
.time-tip .linkish{background:none;border:0;padding:0;color:#007a86;text-decoration:underline;cursor:pointer;font:inherit}
.time-tip[hidden]{display:none}
