/* Explicit geometry instead of browser-native range/file appearance.
   Keep engine-specific pseudo-elements in separate rules. */
input[type="range"], .video-editor input[type="range"] {
  --range-track: #4c4c44;
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 22px;
  min-height: 22px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  cursor: pointer;
  accent-color: var(--accent);
}
html[data-theme="light"] input[type="range"] { --range-track: #bcbcb4; }
input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  border: 0;
  border-radius: 4px;
  box-shadow: inset 0 0 0 1px #8b8b82;
  background: linear-gradient(to right, var(--accent) var(--range-fill, 50%), var(--range-track) var(--range-fill, 50%));
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  margin-top: -4px;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: none;
}
input[type="range"]::-moz-range-track {
  height: 6px;
  border: 0;
  border-radius: 4px;
  box-shadow: inset 0 0 0 1px #8b8b82;
  background: linear-gradient(to right, var(--accent) var(--range-fill, 50%), var(--range-track) var(--range-fill, 50%));
}
input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: none;
}
input[type="range"]::-moz-range-progress { background: transparent; }
input[type="range"]:disabled { cursor: not-allowed; opacity: .5; }
input[type="range"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.video-editor input[type="file"] {
  --file-button-bg: #66665f;
  --file-button-text: #f0f0eb;
  color: var(--paper);
  font-family: inherit;
  font-size: .75rem;
}
html[data-theme="light"] .video-editor input[type="file"] {
  --file-button-bg: #d0d0c8;
  --file-button-text: #262621;
}
.video-editor input[type="file"]::file-selector-button {
  -webkit-appearance: none;
  appearance: none;
  border: 1px solid #8b8b82;
  border-radius: 2px;
  background: var(--file-button-bg);
  color: var(--file-button-text);
  font: inherit;
  padding: 2px 7px;
  margin: 0 7px 0 0;
  cursor: pointer;
}
.video-editor input[type="file"]::-webkit-file-upload-button {
  -webkit-appearance: none;
  appearance: none;
  border: 1px solid #8b8b82;
  border-radius: 2px;
  background: var(--file-button-bg);
  color: var(--file-button-text);
  font: inherit;
  padding: 2px 7px;
  margin: 0 7px 0 0;
  cursor: pointer;
}
@media (forced-colors: active) {
  input[type="range"]::-webkit-slider-runnable-track { background: Canvas; box-shadow: inset 0 0 0 1px CanvasText; }
  input[type="range"]::-webkit-slider-thumb { background: Highlight; border: 1px solid CanvasText; }
  input[type="range"]::-moz-range-track { background: Canvas; box-shadow: inset 0 0 0 1px CanvasText; }
  input[type="range"]::-moz-range-thumb { background: Highlight; border: 1px solid CanvasText; }
  .video-editor input[type="file"]::file-selector-button { background: ButtonFace; color: ButtonText; border-color: ButtonText; }
  .video-editor input[type="file"]::-webkit-file-upload-button { background: ButtonFace; color: ButtonText; border-color: ButtonText; }
}
