/* Video editor: layer list and settings panel (features/vedit_panels.js). */
:is(.ve, .ve-cpop) .ve-ic { display: inline-flex; width: 16px; height: 16px; flex: none; }
:is(.ve, .ve-cpop) .ve-ic svg { display: block; }
.ve .btn.ve-ibtn { display: inline-flex; align-items: center; gap: 5px; padding: 4px 6px; line-height: 1; }
.ve .btn.ve-ibtn span:not(.ve-ic) { font-size: 12px; }
.ve .ve-toolgap { flex: 1; }
.ve .ve-tools.tight { margin-top: 0; }

/* layer list */
.ve .ve-layerlist { position: relative; user-select: none; }
.ve .ve-layer { grid-template-columns: 22px minmax(0, 1fr) 22px 22px; padding: 3px 6px; border: 1px solid transparent; }
.ve .ve-layer.on { background: var(--brand); color: var(--brand-ink, #fff); }
.ve .ve-layer.locked .ve-lname { opacity: .75; }
.ve .ve-layer.in-group { margin-left: 12px; border-left: 2px solid var(--line); border-radius: 0 8px 8px 0; }
.ve .ve-layer.in-group.on { border-left-color: var(--brand); }
.ve .ve-layer .ve-icon { opacity: .45; display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 5px; }
.ve .ve-layer:hover .ve-icon, .ve .ve-layer.hidden .ve-icon:first-of-type, .ve .ve-layer.locked .ve-icon:last-of-type, .ve .ve-layer.on .ve-icon { opacity: .95; }
.ve .ve-layer .ve-icon:hover { background: rgba(127, 127, 127, .18); }
.ve .ve-layer .ve-icon:focus-visible { opacity: 1; outline: 2px solid var(--brand); }
.ve .ve-layerlist.dragging { cursor: grabbing; }
.ve .ve-layerlist.dragging .ve-layer { cursor: grabbing; }
.ve .ve-layer.moving { opacity: .45; }
.ve .ve-dropline { position: absolute; left: 0; right: 0; height: 2px; background: #38a3ff; border-radius: 2px; pointer-events: none; display: none; z-index: 2; }
.ve .ve-dropline.show { display: block; }
.ve .ve-dropline::before { content: ''; position: absolute; left: -3px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: #38a3ff; }
.ve .ve-lrename { width: 100%; min-width: 0; font: inherit; font-size: 13px; padding: 1px 4px; border: 1px solid var(--brand); border-radius: 5px; background: var(--panel); color: var(--ink); }
.ve .ve-lgroup { display: grid; grid-template-columns: 18px 22px minmax(0, 1fr) auto; align-items: center; gap: 4px; padding: 3px 6px; border-radius: 8px; cursor: pointer; font-size: 13px; font-weight: 600; }
.ve .ve-lgroup:hover { background: var(--soft); }
.ve .ve-lgroup.on { background: var(--soft); outline: 1px solid var(--brand); }
.ve .ve-gfold { display: inline-flex; align-items: center; justify-content: center; transition: transform .12s; }
.ve .ve-lgroup.folded .ve-gfold { transform: rotate(-90deg); }
.ve .ve-gcount { color: var(--muted); font-weight: 400; }
.ve .ve-thumb { width: 20px; height: 20px; border-radius: 4px; display: inline-grid; place-items: center; overflow: hidden; flex: none; font-size: 12px; line-height: 1; font-family: var(--ve-font, system-ui, sans-serif); }
.ve .ve-thumb.img { background-color: #2a2f3a; background-image: repeating-conic-gradient(#3a404c 0 25%, #2a2f3a 0 50%); background-size: 8px 8px; }
.ve .ve-thumb.img img { width: 100%; height: 100%; object-fit: contain; }
.ve .ve-thumb.txt { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); }
.ve .ve-thumb.shp { background: #2a2f3a; }
.ve .ve-thumb.grp { color: var(--muted); }
.ve .ve-layer.on .ve-thumb { box-shadow: 0 0 0 1px rgba(255, 255, 255, .6); }

/* panel: sections */
.ve .ve-phead { display: flex; align-items: center; gap: 8px; }
.ve .ve-phead h3 { margin: 0 !important; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ve .ve-phead .ve-thumb { width: 26px; height: 26px; font-size: 15px; }
.ve .ve-sec { border-top: 1px solid var(--line); padding-top: 4px; }
.ve .ve-sechead { display: flex; align-items: center; gap: 6px; width: 100%; border: 0; background: none; padding: 4px 0; font: inherit; font-size: 13px; font-weight: 700; color: var(--ink); cursor: pointer; text-align: left; }
.ve .ve-sechead:hover { color: var(--brand); }
.ve .ve-sechead .ve-ic { transition: transform .12s; }
.ve .ve-sec.shut .ve-sechead .ve-ic { transform: rotate(-90deg); }
.ve .ve-secbody { display: grid; gap: 8px; padding: 4px 0 8px; }
.ve .ve-sec.shut .ve-secbody { display: none; }
.ve .ve-row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; align-items: end; }
.ve .ve-onoff { gap: 6px; }
.ve .ve-onoff.open { background: var(--soft); }
.ve .ve-onoffbody { display: grid; gap: 6px; }
.ve .ve-capsbox { align-self: end; padding-bottom: 6px; }

/* number fields: unit inside the box, slider beside it, label scrubbing */
.ve .ve-num { display: flex; align-items: center; gap: 6px; min-width: 0; }
.ve .ve-numbox { position: relative; display: flex; align-items: center; flex: 1 1 auto; min-width: 0; }
.ve .ve-num.with-range .ve-numbox { flex: 0 0 82px; }
.ve .ve-numbox input[type=number] { width: 100%; min-width: 0; }
.ve .ve-numbox .ve-unit { position: absolute; right: 8px; color: var(--muted); font-size: 11px; pointer-events: none; }
.ve .ve-numbox:has(.ve-unit) input[type=number] { padding-right: 24px; }
.ve .ve-numbox input[type=number] { -moz-appearance: textfield; appearance: textfield; }
.ve .ve-numbox input[type=number]::-webkit-inner-spin-button, .ve .ve-numbox input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.ve .ve-range { flex: 1 1 auto; min-width: 50px; accent-color: var(--brand); }
.ve .ve-flabel.ve-scrub { cursor: ew-resize; user-select: none; touch-action: none; }
.ve .ve-flabel.ve-scrub:hover { color: var(--ink); }
body.ve-scrubbing, body.ve-scrubbing * { cursor: ew-resize !important; }
.ve .ve-unit { color: var(--muted); font-size: 11px; }

/* buttons in a row, one pressed */
.ve .ve-seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; width: max-content; max-width: 100%; }
.ve .ve-segbtn { border: 0; border-right: 1px solid var(--line); background: var(--panel); color: var(--ink); padding: 4px 9px; cursor: pointer; display: inline-flex; align-items: center; font-size: 12px; }
.ve .ve-segbtn:last-child { border-right: 0; }
.ve .ve-segbtn:hover { background: var(--soft); }
.ve .ve-segbtn.on { background: var(--brand); color: var(--brand-ink, #fff); }
.ve .ve-quick { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.ve .ve-quick .ve-flabel { margin-right: 2px; }
.ve .ve-chipbtn { border: 1px solid var(--line); background: var(--panel); color: var(--ink); border-radius: 12px; padding: 1px 8px; font-size: 12px; cursor: pointer; }
.ve .ve-chipbtn:hover { border-color: var(--brand); }
.ve .ve-chipbtn.on { background: var(--brand); border-color: var(--brand); color: var(--brand-ink, #fff); }
.ve .ve-fitbtn { align-self: end; white-space: nowrap; }

/* picture size */
.ve .ve-sizerow { display: grid; grid-template-columns: 1fr 26px 1fr; gap: 4px; align-items: end; }
.ve .ve-ratio { width: 26px; height: 30px; display: inline-flex; align-items: center; justify-content: center; border-radius: 6px; color: var(--muted); }
.ve .ve-ratio.on { color: var(--brand); background: var(--soft); }

/* 3x3 spots (anchor, which part stays in view) */
.ve .ve-anchorrow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ve .ve-grid9 { display: grid; grid-template-columns: repeat(3, 18px); gap: 3px; padding: 3px; border: 1px solid var(--line); border-radius: 7px; width: max-content; }
.ve .ve-g9 { width: 18px; height: 18px; border: 0; padding: 0; border-radius: 4px; background: var(--soft); cursor: pointer; display: grid; place-items: center; }
.ve .ve-g9 span { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); opacity: .5; }
.ve .ve-g9:hover span { opacity: 1; }
.ve .ve-g9.on { background: var(--brand); }
.ve .ve-g9.on span { background: var(--brand-ink, #fff); opacity: 1; }
.ve .ve-posrow { display: flex; gap: 10px; align-items: flex-start; }
.ve .ve-pospick { position: relative; width: 150px; height: 90px; background: #232832; border-radius: 6px; overflow: hidden; cursor: grab; touch-action: none; flex: none; }
.ve .ve-pospick:active { cursor: grabbing; }
.ve .ve-pospick video, .ve .ve-pospick img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; pointer-events: none; }
.ve .ve-posnone { position: absolute; inset: 0; display: grid; place-items: center; }
.ve .ve-poswin { position: absolute; outline: 2px solid #fff; box-shadow: 0 0 0 999px rgba(0, 0, 0, .45); pointer-events: none; }
.ve .ve-posdot { position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: #ff3d8b; border: 2px solid #fff; pointer-events: none; }
.ve .ve-poscol { display: grid; gap: 6px; justify-items: start; }

/* colours */
:is(.ve, .ve-cpop) .ve-sw { position: relative; display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; padding: 0; overflow: hidden;
  background-color: #fff; background-image: repeating-conic-gradient(#cfd4da 0 25%, #fff 0 50%); background-size: 8px 8px; }
:is(.ve, .ve-cpop) .ve-swfill { position: absolute; inset: 0; border-radius: 50%; }
:is(.ve, .ve-cpop) .ve-swplus { position: relative; font-size: 15px; font-weight: 700; color: var(--muted); }
:is(.ve, .ve-cpop) .ve-swmore { border-style: dashed; }
.ve-cpop { position: fixed; z-index: 200; width: 264px; background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow, 0 8px 30px rgba(0, 0, 0, .25)); padding: 10px; display: grid; gap: 8px; }
.ve-cprow { display: grid; gap: 4px; }
.ve-cptitle { font-size: 11px; color: var(--muted); }
.ve-cpop .ve-swatches { gap: 4px; }
.ve-cpop .ve-sw { width: 22px; height: 22px; }
.ve-cpedit { grid-template-columns: 30px 1fr 34px; align-items: center; gap: 6px; }
.ve-cpprev { position: relative; width: 30px; height: 30px; border-radius: 7px; overflow: hidden; border: 1px solid var(--line);
  background-color: #fff; background-image: repeating-conic-gradient(#cfd4da 0 25%, #fff 0 50%); background-size: 8px 8px; }
.ve-cpprev .ve-swfill { border-radius: 0; }
.ve-cphex { width: 100%; border: 1px solid var(--line); background: var(--panel); color: var(--ink); border-radius: 7px; padding: 5px 7px; font: 13px ui-monospace, Menlo, Consolas, monospace; }
.ve-cphex.bad { border-color: var(--danger); }
.ve-cpedit input[type=color] { width: 34px; height: 30px; padding: 0; border: 1px solid var(--line); border-radius: 7px; background: none; cursor: pointer; }
.ve-cpalpha { grid-template-columns: auto 1fr 36px; align-items: center; gap: 8px; }
.ve-cpalpha input[type=range] { accent-color: var(--brand); min-width: 0; }
.ve-cpfoot { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.ve-cpfoot .ve-ibtn { margin-right: auto; }
.ve-cpop .btn.ve-ibtn { display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px; font-size: 12px; }
.ve .ve-thumb.img video { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
