/* Range Shoot Log: Video Studio (see studio.js) */

/* Buttons are only for the admin (photographer) */
.rx-studio-top { display: none !important; }
body.rx-is-admin #appShell:has(#logScreen:not(.hidden)) .rx-studio-top { display: grid !important; }
/* Open shoot: Delete · Duplicate · Studio · Save */
#shootForm .actions:has(#studioFormBtn:not(.hidden)) { grid-template-columns: 56px 56px 56px minmax(0, 1fr); }
#studioFormBtn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
#studioFormBtn svg path { stroke-width: 1.2; }

.rx-studio-top svg, .rx-studio .st-icon svg {
  width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.rx-studio-top {
  place-items: center; width: 48px; height: 48px; margin-right: 10px; padding: 0;
  border: 1px solid var(--rx-line); border-radius: 50%; background: var(--rx-card); color: var(--rx-blue); cursor: pointer;
}
.rx-studio-top svg { width: 22px; height: 22px; }

/* Sheet */
.rx-studio { align-items: stretch !important; padding: 0 !important; }
.rx-studio-sheet {
  width: 100%; max-width: 1280px; margin: 0 auto; height: 100dvh; overflow-y: auto;
  padding: max(14px, env(safe-area-inset-top)) 16px calc(24px + env(safe-area-inset-bottom));
  background: var(--color-bg); color: var(--rx-ink); font-family: var(--app-font);
}
@media (min-width: 900px) { .rx-studio { padding: 24px !important; } .rx-studio-sheet { height: auto; max-height: calc(100dvh - 48px); border-radius: 24px; } }
.st-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.st-head > div { flex: 1; min-width: 0; }
.st-head h2 { margin: 0; font-size: 24px; letter-spacing: -0.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-caption { margin: 0; font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--rx-blue); }
.st-icon { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border: 0; border-radius: 50%; background: var(--rx-track); color: var(--rx-ink); cursor: pointer; }
.st-icon.hidden, .rx-studio .hidden { display: none !important; }
.st-muted { margin: 0; color: var(--rx-muted); font-size: 14px; font-weight: 400; }
.st-hint { margin: 4px 0 0; font-size: 13px; color: var(--rx-muted); }

/* Pick a shoot */
.st-pick { display: grid; gap: 12px; max-width: 640px; }
.st-blank { min-height: 52px; margin: 0; }
.st-pick input[type=search] { min-height: 46px; margin: 0; }
.st-list { display: grid; gap: 8px; }
.st-item {
  display: grid; gap: 3px; width: 100%; padding: 12px 14px; margin: 0; text-align: left;
  border: 1px solid var(--rx-line); border-radius: 14px; background: var(--rx-card); color: var(--rx-ink); font-family: inherit; cursor: pointer;
}
.st-item:hover { border-color: var(--rx-blue); }
.st-item strong { font-size: 15.5px; }
.st-item small { font-size: 13px; color: var(--rx-muted); }

/* Edit: form left, previews right; stacked on phones */
.st-edit { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: 22px; }
@media (max-width: 900px) { .st-edit { grid-template-columns: minmax(0, 1fr); } }
.st-form { display: flex; flex-direction: column; gap: 16px; padding: 18px; border: 1px solid var(--rx-line); border-radius: 16px; background: var(--rx-card); align-self: start; }
.st-form label, .st-lab { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 600; }
.st-form select, .st-form input[type=text] { width: 100%; min-height: 44px; margin: 0; }
.st-form input[type=range] { width: 100%; accent-color: var(--rx-blue); }
.st-seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.st-seg label { margin: 0; }
.st-seg input { position: absolute; opacity: 0; }
.st-seg span { display: flex; align-items: center; justify-content: center; min-height: 44px; border: 1px solid var(--rx-line); border-radius: 10px; font-weight: 600; font-size: 14px; cursor: pointer; background: var(--color-bg); }
.st-seg input:checked + span { background: var(--rx-blue); border-color: var(--rx-blue); color: var(--on-primary); }
.st-seg input:focus-visible + span { outline: 2px solid var(--rx-blue); outline-offset: 2px; }
.st-add { display: flex; gap: 6px; margin-top: 8px; }
.st-add input { flex: 1; }
.st-add button { flex: none; min-height: 44px; margin: 0; padding: 0 14px; }
.st-ghost { border: 0; background: none; color: var(--rx-blue); font: 600 14px var(--app-font); padding: 6px 2px; cursor: pointer; }
.st-check { display: flex !important; align-items: center; gap: 10px; font-weight: 500 !important; margin: 0 !important; }
.st-check input { width: 20px; height: 20px; accent-color: var(--rx-blue); }
.st-row-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.st-row-btns button { margin: 0; min-height: 44px; }
.st-previews { display: flex; flex-direction: column; gap: 18px; }
.st-card { padding: 16px; border: 1px solid var(--rx-line); border-radius: 16px; background: var(--rx-card); }
.st-card h3 { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin: 0 0 10px; font-size: 16px; }
.st-card h3 small { font-weight: 400; color: var(--rx-muted); font-size: 13px; }
.st-stage { border-radius: 10px; overflow: hidden; line-height: 0; }
.st-checker { background: repeating-conic-gradient(#8a97a8 0 25%, #6f7c8d 0 50%) 0 0 / 28px 28px; }
.st-stage canvas { width: 100%; height: auto; display: block; }
.st-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.st-row .secondary-btn, .st-row .primary-btn { margin: 0; min-height: 44px; padding: 0 16px; }

/* ---------- Computer: the whole Studio fits on one screen, no scrolling ---------- */
.st-checker canvas { background: repeating-conic-gradient(#8a97a8 0 25%, #6f7c8d 0 50%) 0 0 / 28px 28px; }
@media (min-width: 1000px) and (min-height: 620px) {
  .rx-studio-sheet { display: flex; flex-direction: column; height: calc(100dvh - 48px); max-height: none; overflow: hidden; padding: 14px 18px 16px; }
  .st-head { margin-bottom: 10px; }
  .st-pick { flex: 1; min-height: 0; overflow-y: auto; }
  .st-edit { flex: 1; min-height: 0; grid-template-columns: minmax(0, 330px) minmax(0, 1fr); gap: 16px; }
  .st-form { gap: 11px; padding: 14px 16px; align-self: stretch; height: 100%; max-height: 100%; overflow-y: auto; }
  .st-form label, .st-lab { margin-bottom: 4px; font-size: 13.5px; }
  .st-form select, .st-form input[type=text], .st-seg span, .st-row-btns button { min-height: 40px; }
  .st-hint { font-size: 12px; margin-top: 3px; }
  .st-previews { min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
  .st-card { display: flex; flex-direction: column; min-height: 0; padding: 10px 14px 12px; }
  .st-card h3 { margin-bottom: 8px; font-size: 15px; }
  .st-stage { position: relative; flex: 1; min-height: 0; border-radius: 0; }
  .st-checker { background: none; }
  .st-stage canvas { position: absolute; inset: 0; margin: auto; width: auto; height: auto; max-width: 100%; max-height: 100%; border-radius: 8px; }
  .st-row { margin-top: 8px; }
  .st-row .secondary-btn, .st-row .primary-btn { min-height: 40px; }
}
/* ▶ Studio sits right next to + */
.rx-studio-top { margin-left: auto; }
