/* Crop frame and GIF / animated SVG recording controls. */

.record-format {
  width: auto;
  min-width: 4.2em;
  height: 26px;
  padding: 2px 6px;
}

.record-crop {
  position: absolute;
  inset: 0;
  z-index: 4;
  touch-action: none;
  cursor: crosshair;
}

.record-frame {
  position: absolute;
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 9999px rgba(5, 7, 10, 0.55);
  cursor: move;
}

.record-crop.is-recording {
  pointer-events: none;
}

.record-crop.is-recording .record-frame {
  border-style: dashed;
  box-shadow: none;
}

.record-crop.is-recording .record-handle,
.record-crop.is-recording .record-crop-controls {
  display: none;
}

.record-handle {
  position: absolute;
  width: 10px;
  height: 10px;
  border: 1px solid var(--accent-2);
  border-radius: 2px;
  background: #edf0f3;
}

.record-handle.n,
.record-handle.s {
  left: 50%;
  margin-left: -5px;
  cursor: ns-resize;
}

.record-handle.e,
.record-handle.w {
  top: 50%;
  margin-top: -5px;
  cursor: ew-resize;
}

.record-handle.n { top: -6px; }
.record-handle.s { bottom: -6px; }
.record-handle.e { right: -6px; }
.record-handle.w { left: -6px; }
.record-handle.nw { top: -6px; left: -6px; cursor: nwse-resize; }
.record-handle.ne { top: -6px; right: -6px; cursor: nesw-resize; }
.record-handle.sw { bottom: -6px; left: -6px; cursor: nesw-resize; }
.record-handle.se { bottom: -6px; right: -6px; cursor: nwse-resize; }

.record-crop-controls {
  position: absolute;
  top: 10px;
  left: 50%;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--panel);
  color: var(--muted);
  font-size: 11px;
  transform: translateX(-50%);
  cursor: default;
}

.record-crop-controls label {
  display: flex;
  align-items: center;
  gap: 6px;
}

.record-crop-controls select,
.record-crop-controls input {
  width: auto;
  min-width: 0;
  padding: 4px 6px;
}

.record-aspect-custom input {
  width: 3.2em;
}

.record-crop-size {
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
}

.record-crop-controls .button {
  min-height: 26px;
  padding: 4px 8px;
  font-size: 11px;
}

.record-caption-place {
  position: absolute;
  z-index: 2;
  box-sizing: border-box;
  border: 1px dashed var(--accent);
  background: rgba(5, 7, 10, 0.28);
  cursor: crosshair;
  pointer-events: auto;
  touch-action: none;
}

.record-caption-hint {
  position: absolute;
  top: 8px;
  left: 50%;
  padding: 4px 8px;
  border-radius: 4px;
  background: var(--panel);
  color: var(--text);
  font-size: 11px;
  pointer-events: none;
  transform: translateX(-50%);
  white-space: nowrap;
}

.record-caption-box {
  position: absolute;
  box-sizing: border-box;
  border: 2px solid var(--success);
  background: rgba(20, 23, 27, 0.55);
  pointer-events: none;
}

