/* The studio's tabs. kit.css (site-kit) and style.css (the pattern's admin
   page) load first and give the tokens: --text, --dim, --line, --soft, --accent. */

/* The B-roll Maker needs room for the photo beside its controls. */
main { max-width: 80rem; }

.broll { display: grid; grid-template-columns: minmax(0, 3fr) minmax(18rem, 2fr); gap: 1.5rem; align-items: start; }
@media (max-width: 56rem) { .broll { grid-template-columns: 1fr; } }

.drop {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 9rem;
  margin-bottom: 0.75rem;
  padding: 1rem;
  border: 2px dashed var(--line);
  border-radius: 6px;
  background: var(--soft);
  color: var(--dim);
  text-align: center;
  cursor: pointer;
}
.drop.dragging { border-color: var(--accent); color: var(--accent); }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }

#photo-canvas { display: block; width: 100%; height: auto; border-radius: 6px; cursor: crosshair; background: var(--soft); }
#photo-canvas:focus { outline: 2px solid var(--accent); outline-offset: 2px; }

#broll-form fieldset { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; margin: 0; padding: 0; border: 0; }
#broll-form legend { margin-bottom: 0.25rem; padding: 0; }
label.choice { display: flex; align-items: center; gap: 0.4rem; }
label.choice input { width: 1rem; height: 1rem; padding: 0; accent-color: var(--accent); }

.monitor { display: flex; justify-content: center; border-radius: 6px; background: #111111; }
#monitor-canvas { display: block; max-width: 100%; max-height: 22rem; }

.buttons { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin: 0; }
button:disabled { opacity: 0.5; cursor: default; }
progress { width: 100%; }

#made { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--line); display: grid; gap: 0.75rem; }
#made h3 { margin: 0; }
#made video { width: 100%; max-height: 22rem; border-radius: 6px; background: #111111; }

.warning { padding: 0.5rem 0.75rem; border: 1px solid var(--line); border-radius: 6px; background: var(--soft); }

.clip-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: 1rem; }
.clip { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: 6px; }
.clip .poster { display: flex; justify-content: center; background: #111111; }
.clip .poster img, .clip .poster video { display: block; max-width: 100%; max-height: 14rem; }
.clip .poster button { padding: 0; border: 0; background: none; }
.clip .body { display: flex; flex: 1; flex-direction: column; gap: 0.25rem; padding: 0.75rem; }
.clip h3 { margin: 0; color: var(--text); overflow-wrap: anywhere; }
.clip .buttons { margin-top: auto; padding-top: 0.5rem; }

/* The Video Maker: the storyboard beside a tall preview. */
.story-form { display: flex; flex-wrap: wrap; align-items: end; gap: 0.5rem; }
.story-form label { flex: 1 1 24rem; }
.story-card { margin: 1rem 0; padding: 0.75rem 1rem; border: 1px solid var(--line); border-radius: 6px; background: var(--soft); }
.story-card h3 { margin: 0 0 0.25rem; }
.maker { display: grid; grid-template-columns: minmax(0, 3fr) minmax(18rem, 2fr); gap: 1.5rem; align-items: start; }
@media (max-width: 56rem) { .maker { grid-template-columns: 1fr; } }
.maker .side { position: sticky; top: 1rem; display: grid; gap: 0.75rem; }
.monitor.tall canvas { display: block; width: auto; max-width: 100%; height: min(70vh, 40rem); aspect-ratio: 9 / 16; }
#scrub { width: 100%; }
.checks { padding: 0.5rem 0.75rem; border: 1px solid var(--line); border-radius: 6px; background: var(--soft); }
.checks h4 { margin: 0.25rem 0; }
.checks ul { margin: 0 0 0.5rem; padding-left: 1.25rem; }
.board-header, .scene-edit, .items .item { display: grid; gap: 0.5rem; }
.scenes { display: grid; gap: 1rem; margin: 1rem 0 0; padding: 0; list-style: none; }
.scene-edit { padding: 0.75rem; border: 1px solid var(--line); border-radius: 6px; }
.scene-edit h4 { display: flex; align-items: center; justify-content: space-between; margin: 0; }
.field { display: grid; gap: 0.25rem; }
.field textarea { resize: vertical; }
.items { display: grid; gap: 0.75rem; padding-left: 0.75rem; border-left: 3px solid var(--line); }
.items .item { grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr)); align-items: end; }
button.small { padding: 0.2rem 0.6rem; font-size: 0.875rem; }
.approve { display: grid; gap: 0.5rem; padding: 0.75rem; border: 1px solid var(--line); border-radius: 6px; }
#video-made { display: grid; gap: 0.75rem; padding-top: 1rem; border-top: 1px solid var(--line); }
#video-made h3 { margin: 0; }
#video-made video { width: 100%; max-height: 32rem; border-radius: 6px; background: #111111; }
#testers td button { white-space: nowrap; }
