/* SnipyCut / OpenReel: preview-first layout for compact editor.
 * The upstream compact grid assigns just 48% of the workspace to the stage.
 * Its player header and two control rows leave too little room for video.
 * Keep this as a separate, versioned override instead of editing minified assets.
 */

/* Taller phones: give the player more room while retaining an editable timeline. */
@media (max-width: 699px) and (min-height: 650px) {
  .editor-shell.editor-compact .editor-workspace {
    grid-template-rows: minmax(290px, 60%) minmax(0, 1fr) !important;
  }
  .editor-shell.editor-compact [data-tour="preview"] > .flex-1 {
    padding: 4px !important;
  }
}

/* iPad / tablet compact layout: stage gets priority, timeline stays visible. */
@media (min-width: 700px) and (min-height: 600px) {
  .editor-shell.editor-compact .editor-workspace {
    grid-template-rows: minmax(340px, 68%) minmax(0, 1fr) !important;
  }
  .editor-shell.editor-compact [data-tour="preview"] > .flex-1 {
    padding: 6px !important;
  }
}

/* Very short screens keep OpenReel's existing 42% landscape arrangement. */

/* Step 5 — visual readability, 2026-11-05.
 * UI-only, light theme. Do not change --screen-bg, canvas pixels, geometry,
 * transport overlays, timeline type colors or dark-theme tokens.
 */
html[data-theme="light"] .editor-shell {
  --bg: var(--sc-bg, #f6f4ef);
  --bg-2: var(--sc-surface-2, #eff2ed);
  --bg-3: var(--sc-surface-2, #eff2ed);
  --border: var(--sc-line, #d4ded7);
  --border-strong: #859b90;
  --fg-2: var(--sc-text, #253731);
  --fg-3: var(--sc-muted, #52645d);
  --fg-muted: var(--sc-muted, #52645d);
  --hover: var(--sc-soft, #e5f3ee);
  --selected: var(--sc-soft, #e5f3ee);
  --accent: var(--sc-action, #166b61);
  --accent-strong: var(--sc-action-hover, #10564e);
  --accent-soft: var(--sc-soft, #e5f3ee);
  --accent-fg: #ffffff;
  --primary: 173 65% 25%;
  --ring: 173 65% 25%;
}

/* The artboard keeps its native background; only the surrounding UI changes. */
html[data-theme="light"] .editor-shell [data-tour="preview"] > .flex-1 {
  background-color: #e6ebe5 !important;
}
html[data-theme="light"] .editor-shell [data-tour="preview"] > .flex-1 > .relative.isolate {
  box-shadow: 0 0 0 1px var(--sc-muted, #52645d), 0 4px 16px rgb(25 35 52 / 18%);
}

/* Inset outlines do not change button size or existing compact hit targets. */
html[data-theme="light"] .editor-shell [data-tour="assets"] > .flex > button[aria-pressed="true"],
html[data-theme="light"] .editor-shell [data-preview-tools] button[aria-pressed="true"],
html[data-theme="light"] .editor-shell > .editor-workspace-tabs button[aria-pressed="true"] {
  color: var(--sc-action-hover, #10564e) !important;
  background-color: var(--sc-soft, #e5f3ee) !important;
  box-shadow: inset 0 0 0 1px var(--sc-action, #166b61);
}

/* Non-overlay controls: distinct edges and keyboard focus. Tablet/phone
 * playback keeps the approved white-on-video treatment.
 */
html[data-theme="light"] .editor-shell :is(input:not([type="range"]):not([type="checkbox"]):not([type="color"]),textarea,select):not([data-preview-timecode] *) {
  border-color: #859b90;
}
html[data-theme="light"] .editor-shell :is(button,input,textarea,select):focus-visible {
  outline: 2px solid var(--sc-action, #166b61);
  outline-offset: 2px;
}
html[data-theme="light"] .editor-shell :is(input,textarea)::placeholder {
  color: var(--sc-muted, #52645d);
  opacity: 1;
}
html[data-theme="light"] .editor-shell [data-timeline-clip][aria-pressed="true"] {
  outline: 2px solid var(--sc-action, #166b61);
  outline-offset: -2px;
}

/* Keep hover legible without changing the selected state. */
@media (hover: hover) {
  html[data-theme="light"] .editor-shell [data-tour="assets"] > .flex > button[aria-pressed="false"]:hover {
    color: var(--sc-text, #253731);
    background-color: var(--sc-soft, #e5f3ee);
  }
}
