/* The Editor page (13.12, static/js/editorspace.js): four steps and one button, card-free like the rest of the app
   (flat.css): each step is set apart by space, a number and one hairline; a choice is marked by an accent line or an
   outline on its picture, never a box. Phones first; every colour is the page's own token, so both themes follow. */

/* the caption fonts added in 13.10, served at /fonts like the first nine (app.css), so each shows in its own face */
@font-face { font-family: 'cf-montserrat_black'; src: url('/fonts/Montserrat-Black.ttf') format('truetype'); font-weight: 900; font-display: swap; }
@font-face { font-family: 'cf-poppins_black'; src: url('/fonts/Poppins-Black.ttf') format('truetype'); font-weight: 900; font-display: swap; }
@font-face { font-family: 'cf-tiktok'; src: url('/fonts/TikTokSans-ExtraBold.ttf') format('truetype'); font-weight: 800; font-display: swap; }
@font-face { font-family: 'cf-archivo'; src: url('/fonts/ArchivoBlack-Regular.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'cf-inter'; src: url('/fonts/Inter-ExtraBold.ttf') format('truetype'); font-weight: 800; font-display: swap; }
@font-face { font-family: 'cf-atkinson'; src: url('/fonts/AtkinsonHyperlegible-Bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'cf-oswald'; src: url('/fonts/Oswald-Bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'cf-barlow'; src: url('/fonts/BarlowCondensed-ExtraBold.ttf') format('truetype'); font-weight: 800; font-display: swap; }
@font-face { font-family: 'cf-jost'; src: url('/fonts/Jost-800-Heavy.ttf') format('truetype'); font-weight: 800; font-display: swap; }
@font-face { font-family: 'cf-chakra'; src: url('/fonts/ChakraPetch-Bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'cf-plexmono'; src: url('/fonts/IBMPlexMono-Bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'cf-dmserif'; src: url('/fonts/DMSerifDisplay-Regular.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'cf-jakarta'; src: url('/fonts/PlusJakartaSans-ExtraBold.ttf') format('truetype'); font-weight: 800; font-display: swap; }
@font-face { font-family: 'cf-instrument'; src: url('/fonts/InstrumentSerif-Regular.ttf') format('truetype'); font-display: swap; }

.ez, .ez-run, .ez-recent { max-width: 980px; }
.ez [hidden], .ez-run [hidden] { display: none !important; }

/* ---------- a step: its number, its heading, what it asks ---------- */
.ez-step { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 0 14px; padding: 24px 0; border-top: 1px solid var(--rule); }
.ez-step:first-child { border-top: 0; padding-top: 4px; }
.ez-n { font-weight: 750; font-size: var(--fs-md); line-height: 1.5; color: var(--accent-text); font-variant-numeric: tabular-nums; }
.ez-step h2 { margin: 0 0 14px; font-size: var(--fs-md); font-weight: 650; letter-spacing: -.01em; line-height: 1.5; color: var(--text-hi); }
.ez-note { margin: 10px 0 0; line-height: 1.5; }
.ez-note:empty { display: none; }

/* ---------- 1. footage ---------- */
.ez-drop { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 26px 18px; }
.ez-drop b { color: var(--text-hi); font-size: var(--fs); font-weight: 650; }
.ez-drop.off { opacity: .6; cursor: not-allowed; }
.ez-files { margin-top: 12px; }
.ez-file { display: grid; grid-template-columns: 20px 52px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--rule); }
.ez-file:first-child { border-top: 0; }
.ez-ord { color: var(--text-3); font-weight: 650; text-align: right; font-size: var(--fs-sm); }
.ez-fthumb { width: 52px; height: 52px; border-radius: 9px; overflow: hidden; background: var(--media-bg); display: grid; place-items: center; color: var(--text-3); }
.ez-fthumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ez-fname { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ez-fname b { font-weight: 600; font-size: var(--fs-sm); color: var(--text-hi); }
.ez-fname .progress { margin-top: 4px; max-width: 320px; }
.ez-facts { display: flex; gap: 2px; }
.ez-facts .icon-btn { width: 36px; height: 36px; color: var(--text-3); }
.ez-facts .icon-btn:hover:not(:disabled) { color: var(--text-hi); }
.ez-facts .icon-btn:disabled { opacity: .35; cursor: default; }
.ez-up .icon { transform: rotate(180deg); }
.ez-total { margin-top: 8px; }
.ez-total:empty { display: none; }
.ez-link { margin-top: 18px; display: grid; gap: 7px; max-width: 560px; }
.ez-link .input:disabled { opacity: .55; }
.ez-link .icon { vertical-align: -3px; color: var(--mint); }
#ezLinkInfo:empty { display: none; }

/* ---------- 2. what to make: two shapes, then how many or how long ---------- */
.ez-modes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; max-width: 620px; }
.ez-mode { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; gap: 2px 12px; align-items: center; text-align: left;
  padding: 14px 0 10px; background: none; border: 0; border-top: 2px solid var(--rule); color: var(--text); cursor: pointer; font: inherit;
  transition: border-color var(--t) var(--spring); }
.ez-mode:hover { border-top-color: var(--rule-3); }
.ez-mode.on { border-top-color: var(--brand-ink); }
.ez-mode b { font-weight: 650; font-size: var(--fs); color: var(--text-hi); }
.ez-mode.on b { color: var(--accent-text); }
.ez-mode small { grid-column: 2; color: var(--text-3); font-size: var(--fs-xs); line-height: 1.4; }
.ez-shape { grid-row: 1 / span 2; border: 2px solid var(--text-3); border-radius: 4px; }
.ez-shape.tall { width: 18px; height: 32px; }
.ez-shape.wide { width: 34px; height: 19px; }
.ez-mode.on .ez-shape { border-color: var(--brand-ink); background: rgb(var(--aq) / .12); }
.ez-row { display: flex; flex-wrap: wrap; gap: 14px 28px; margin-top: 18px; }
.ez-row .seg button:disabled { opacity: .4; cursor: not-allowed; }

/* ---------- 3. style: the creator's own first frame in each look, with that style's captions ---------- */
.ez-styles { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 18px 14px; }
.ez-style { display: flex; flex-direction: column; gap: 4px; align-items: stretch; text-align: left; padding: 0; background: none; border: 0;
  color: var(--text); cursor: pointer; font: inherit; min-width: 0; }
.ez-style b { margin-top: 6px; font-weight: 650; font-size: var(--fs-sm); color: var(--text-hi); }
.ez-style small { color: var(--text-3); font-size: var(--fs-xs); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ez-style.on b { color: var(--accent-text); }
.ez-prev { position: relative; display: block; aspect-ratio: 9 / 16; border-radius: 10px; overflow: hidden;
  background: linear-gradient(165deg, #23466b 0%, #0b1426 58%, #3b2453 100%); transition: transform var(--t) var(--spring), box-shadow var(--t); }
.ez-style:hover .ez-prev { transform: translateY(-2px); }
.ez-style.on .ez-prev { outline: 2px solid var(--brand-ink); outline-offset: 3px; }
.ez-style:focus-visible { outline: none; }
.ez-style:focus-visible .ez-prev { outline: 2px solid var(--focus-ring); outline-offset: 3px; }
.ez-bg { position: absolute; inset: 0; }
.ez-bg img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ez-auto { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; }
.ez-auto .icon { width: 30px; height: 30px; opacity: .92; }
.ez-cap { position: absolute; left: 7%; right: 7%; bottom: 21%; text-align: center; color: #fff; line-height: 1.08; overflow-wrap: anywhere; }
.ez-cap i { font-style: normal; color: #ffe14d; }
.ez-cap.punchy { font-size: 17px; text-transform: uppercase; letter-spacing: .01em; -webkit-text-stroke: 1px #000; text-shadow: 0 2px 0 #000; }
.ez-cap.clean { font-size: 11px; font-weight: 800; text-shadow: 0 1px 4px #000, 0 0 2px #000; }
.ez-cap.boxed { font-size: 10.5px; font-weight: 800; }
.ez-cap.boxed span { background: rgba(0, 0, 0, .74); padding: 3px 6px; border-radius: 5px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.ez-fontbox { margin-top: 18px; }
.ez-fontbox summary { cursor: pointer; color: var(--text-2); font-size: var(--fs-sm); padding: 6px 0; list-style-position: inside; }
.ez-fontbox summary b { color: var(--text-hi); font-weight: 650; }
.ez-fonts { display: flex; flex-wrap: wrap; gap: 6px 20px; padding: 10px 0 4px; }
.ez-font { background: none; border: 0; border-bottom: 2px solid transparent; padding: 6px 0 5px; font-size: 19px; line-height: 1.2; color: var(--text);
  cursor: pointer; font-synthesis: none; }
.ez-font:hover { color: var(--text-hi); border-bottom-color: var(--rule-3); }
.ez-font.on { color: var(--accent-text); border-bottom-color: var(--brand-ink); }
.ez-end { margin-top: 16px; }

/* ---------- 4. the prompt ---------- */
.ez-prompt { width: 100%; min-height: 104px; font-size: var(--fs); line-height: 1.55; }
.ez-ideas { margin-top: 10px; line-height: 1.9; }
.ez-ideas .link { font-weight: 550; text-align: left; display: inline; }
.ez-name { margin-top: 16px; max-width: 420px; }

/* ---------- the button ---------- */
.ez-go { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; padding: 24px 0 8px 44px; border-top: 1px solid var(--rule); }
.ez-make { min-width: 200px; height: 48px; font-size: var(--fs-md); }
.ez-cost { margin: 0; color: var(--text-2); line-height: 1.5; max-width: 60ch; }

/* ---------- the projects ---------- */
.ez-recent { margin-top: 30px; }
.ez-list { border-top: 1px solid var(--rule); }
.ez-item { display: flex; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--rule); color: inherit; text-decoration: none; }
.ez-item:hover b { color: var(--accent-text); }
.ez-item > .icon { color: var(--text-3); flex: none; }
.ez-ithumb { width: 40px; height: 56px; flex: none; border-radius: 8px; overflow: hidden; background: var(--media-bg); display: grid; place-items: center; color: var(--text-3); }
.ez-ithumb.wide { width: 72px; height: 41px; }
.ez-ithumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ez-itext { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.ez-itext b { font-weight: 600; color: var(--text-hi); }

.ez-status { padding: 4px 0 24px; max-width: 720px; }
.ez-stage { display: flex; gap: 10px; align-items: center; font-size: var(--fs-md); color: var(--text-hi); }
.ez-stage b { font-weight: 650; }
.ez-status.ok .ez-stage .icon { color: var(--mint); }
.ez-status.bad .ez-stage .icon { color: var(--rose); }
.ez-status .progress { margin-top: 14px; height: 8px; border-radius: 4px; }
.ez-status p { margin: 12px 0 0; line-height: 1.5; }
.ez-acts { margin-top: 16px; gap: 10px; }
.ez-spin { width: 16px; height: 16px; flex: none; border-radius: 50%; border: 2px solid rgb(var(--aq) / .25); border-top-color: var(--brand-ink); animation: ezSpin .9s linear infinite; }
@keyframes ezSpin { to { transform: rotate(360deg); } }
.ez-results { padding: 22px 0 6px; border-top: 1px solid var(--rule); }
.ez-results .section-title { margin-top: 0; }
.ez-video { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 16px; align-items: center; }
.ez-video[data-act] { cursor: pointer; }
.ez-video[data-act]:hover b { color: var(--accent-text); }
.ez-vthumb { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: var(--media-bg); display: grid; place-items: center; color: var(--text-3); }
.ez-vthumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ez-vthumb .dur { position: absolute; right: 8px; bottom: 8px; font-size: 11px; font-weight: 700; padding: 0 6px; line-height: 19px; border-radius: 5px; background: rgba(0, 0, 0, .68); color: #fff; }
.ez-vtext { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ez-vtext b { font-weight: 650; color: var(--text-hi); }
.ez-asked { padding: 22px 0 6px; border-top: 1px solid var(--rule); max-width: 720px; }
.ez-asked .section-title { margin-top: 0; }
.ez-asked p { margin: 0 0 8px; line-height: 1.5; }
.ez-quote { margin: 0 0 10px; padding: 2px 0 2px 14px; border-left: 2px solid var(--brand-ink); color: var(--text-2); line-height: 1.55; }

@media (prefers-reduced-motion: reduce) { .ez-spin { animation: none; } .ez-style:hover .ez-prev { transform: none; } }

/* ---------- phones: one column, big targets, the button the width of the screen ---------- */
@media (max-width: 767px) {
  .ez-step { grid-template-columns: minmax(0, 1fr); padding: 20px 0; }
  .ez-n { font-size: var(--fs-sm); margin-bottom: 2px; }
  /* the styles in one row that scrolls sideways inside itself (the page never does), so the four steps stay short */
  .ez-styles { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(96px, 29%); gap: 12px;
    overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; padding: 5px 5px 12px; }
  .ez-style { scroll-snap-align: start; }
  .ez-style small { display: none; }
  .ez-cap.punchy { font-size: 14px; }
  .ez-cap.clean, .ez-cap.boxed { font-size: 9.5px; }
  .ez-file { grid-template-columns: 16px 44px minmax(0, 1fr) auto; gap: 10px; }
  .ez-fthumb { width: 44px; height: 44px; }
  .ez-facts .icon-btn { width: 34px; height: 40px; }
  .ez-row { gap: 14px; }
  .ez-row .field { width: 100%; }
  .ez-row .seg { display: flex; width: 100%; }
  .ez-row .seg button { flex: 1 1 auto; height: 36px; }
  .ez-go { padding-left: 0; }
  .ez-make { width: 100%; }
  .ez-font { font-size: 17px; }
  .ez-video { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 380px) { .ez-styles { grid-auto-columns: minmax(92px, 40%); } }

/* 13.13: Record a call or your screen, under the drop zone (callrec.js); on a phone it uploads a call's file */
.ez .ez-rec { margin-top: 12px; }
.ez .ez-rec .ez-call { width: 100%; justify-content: center; }

/* 13.13: each style's real caption look on the creator's own frame (a see-through tile, tools/caption_previews.py),
   where the captions sit in a short; and the Brand picker above the styles */
.ez-tilecap { position: absolute; left: 0; right: 0; bottom: 16%; width: 100%; height: auto; pointer-events: none; }
.ez .ez-brand { margin-bottom: 14px; max-width: 420px; }
