
/* The creation-type menu is teleported from the composer to the page body. */
body:has(.jc-studio:is(.studio-image, .studio-video)) > .creation-kind-popover {
  display: grid;
  grid-auto-rows: max-content;
  align-content: start;
  row-gap: 4px;
}

.zr-dialog.zr-tool-frame {
  width: min(1060px, calc(100vw - 32px));
  height: min(780px, calc(100dvh - 40px));
  max-height: none;
  overflow: hidden;
}
.zr-tool-frame[open] {
  display: flex;
  flex-direction: column;
}
.zr-tool-frame > header { flex: none; }
.zr-tool-frame > iframe {
  display: block;
  width: 100%;
  min-height: 0;
  flex: 1;
  border: 0;
}
.zr-tool-frame > iframe[hidden], .zr-tool-frame-status:empty { display: none; }
.zr-tool-frame-status {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #b8b8c0;
}
@media (max-width: 600px) {
  .zr-dialog.zr-tool-frame {
    width: calc(100vw - 16px);
    height: calc(100dvh - 24px);
  }
}

.zr-reference-dialog .zr-reference-body{display:grid;gap:16px}
.zr-reference-dialog .zr-reference-preview,.zr-reference-dialog .zr-reference-unavailable{display:block;box-sizing:border-box;width:100%;height:clamp(90px,28dvh,220px);object-fit:contain;background:#161619;border-radius:10px}
.zr-reference-dialog .zr-reference-unavailable{display:grid;place-items:center;margin:0;color:#b5b5bd}
.zr-reference-dialog .zr-reference-field{display:grid;gap:6px;color:#d4d4dc;font-size:13px}
.zr-reference-dialog select{box-sizing:border-box;width:100%;min-height:36px;padding:6px 10px;border:1px solid #45454d;border-radius:8px;background:#29292e;color:#eeeef2;font:inherit;color-scheme:dark}
.zr-reference-dialog footer{gap:8px}
.zr-reference-dialog footer .zr-reference-cancel{background:transparent;color:#dddde5}
.zr-reference-dialog header .zr-icon{font-size:22px;line-height:1}
.zr-reference-dialog footer button:disabled{opacity:.45}
@media(pointer:coarse){.zr-reference-dialog :is(select,footer button,header button){min-height:44px}.zr-reference-dialog header button{min-width:44px}}

.zr-image-video {
  box-sizing: border-box;
  margin: auto;
  padding: 0;
  width: min(540px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  overflow: auto;
  color: #f1f1f3;
  color-scheme: dark;
  background: #222225;
  border: 1px solid #424247;
  border-radius: 16px;
  font: 13px/1.5 system-ui, sans-serif;
}
.zr-image-video::backdrop { background: #08080bad; }
.zr-image-video header, .zr-image-video footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.zr-image-video header { padding: 14px 20px; border-bottom: 1px solid #39393e; }
.zr-image-video h2 { margin: 0; font-size: 16px; }
.zr-image-video header button { border: 0; background: transparent; color: inherit; font: 20px/1 system-ui; width: 28px; height: 28px; cursor: pointer; }
.zr-image-video form { display: grid; gap: 14px; margin: 0; padding: 16px 20px 18px; }
.zr-image-video img { width: auto; max-width: 100%; max-height: min(19dvh, 120px); object-fit: contain; border-radius: 8px; }
.zr-image-video fieldset { border: 0; display: grid; gap: 12px; margin: 0; min-width: 0; padding: 0; }
.zr-image-video .iv-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; }
.zr-image-video label { display: grid; gap: 4px; min-width: 0; color: #c7c7cc; }
.zr-image-video :is(select,textarea,input) { box-sizing: border-box; width: 100%; min-width: 0; color: #ededf0; background: #19191c; border: 1px solid #44444a; border-radius: 7px; padding: 6px 9px; font: inherit; }
.zr-image-video textarea { resize: vertical; min-height: 50px; }
.zr-image-video details > summary { cursor: pointer; color: #c9c9d1; }
.zr-image-video details[open] > summary { margin-bottom: 8px; }
.zr-image-video footer { align-items: end; border-top: 1px solid #38383d; padding-top: 12px; }
.zr-image-video footer p { margin: 0; color: #bdbdc5; }
.zr-image-video .iv-submit { margin-left: auto; flex: none; font: inherit; font-weight: 600; border-radius: 8px; padding: 8px 13px; color: #202024; border: 0; background: #eeeeef; cursor: pointer; }
.zr-image-video :disabled { cursor: default; }
.zr-image-video button:disabled { opacity: .5; }
.zr-image-video [hidden] { display: none; }
.zr-image-video :focus-visible { outline: 2px solid #b4b9ce; outline-offset: 2px; }
@media (max-width: 480px) {
  .zr-image-video header { padding: 10px 14px; }
  .zr-image-video form { padding: 12px 14px; gap: 10px; }
  .zr-image-video img { max-height: 68px; }
}
