* {

  box-sizing: border-box;
}

body {
  height: 100vh;
  margin: 0;
  padding: 0;
  font-family: Verdana;
  font-size: 12px;
  background: var(--wf2-body-bg);
  color: var(--wf2-text-primary);
}

#zoomview-container,
#overview-container {
  width: 100%;
  height: 100px;
}

.peaks-overview-shell {
  position: relative;
  width: 100%;
  height: 100px;
}

#zoomview-container {
  touch-action: pan-y;
}

#overview-container {
  background: var(--wf2-surface-overview);
  border: 1px solid var(--wf2-border-overview);
  border-radius: 6px;
  overflow: hidden;
}

#overview-container canvas,
#overview-container .waveform,
#overview-container .overview-container,
#overview-container .zoom-container {
  background: transparent !important;
}

.peaks-viewer-chart {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 20;
  width: 100%;
  height: 38px;
  pointer-events: none;
}

.peaks-viewer-tooltip {
  position: absolute;
  bottom: 42px;
  z-index: 30;
  padding: 2px 4px;
  border: 1px solid var(--wf2-viewer-line);
  border-radius: 2px;
  background: var(--wf2-viewer-tooltip-bg);
  color: var(--wf2-viewer-tooltip-text);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 10px;
  line-height: 1.2;
  white-space: nowrap;
  pointer-events: none;
  transform: translateX(-50%);
}

.video-list-wrap {
  width: 99%;
  border: 1px solid var(--wf2-border-subtle);
  background: var(--wf2-surface-card);
  max-height: 640px;
  overflow: auto;
  margin: 0;
}

.video-list-toggle {
  margin: 6px 0 8px 0;
}

.video-list-toggle label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.video-list {
  width: 100%;
}

.video-list-head {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--wf2-surface-header);
  border-bottom: 1px solid var(--wf2-border-subtle);
}

.video-list-head-inner,
.video-row-summary {
  display: grid;
  grid-template-columns: 132px 70px 120px;
  gap: 6px;
  align-items: start;
}

.video-list-head-inner {
  padding: 3px 8px 3px 11px;
  grid-template-columns: 132px 70px 120px 22px;
}

.video-list-head-cell {
  text-align: left;
  line-height: 1.2;
  font-weight: 700;
}

.video-list-locate-active {
  width: 22px;
  height: 18px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--wf2-text-muted);
  cursor: pointer;
  font: inherit;
  font-size: 15px;
  line-height: 1;
}

.video-list-locate-active:hover,
.video-list-locate-active:focus-visible {
  color: var(--wf2-focus-accent);
}

.video-list-locate-active:focus-visible {
  outline: 1px solid var(--wf2-focus-accent);
  outline-offset: 1px;
}

.video-list-body {
  display: flex;
  flex-direction: column;
  position: relative;
}

.video-list-search-loader {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  min-height: 100%;
  padding: 72px 12px 12px;
  background: rgba(15, 23, 42, 0.58);
  color: var(--wf2-text-strong);
  pointer-events: auto;
}

.video-list-search-loader[hidden] {
  display: none;
}

.video-list-search-loader__panel {
  position: sticky;
  top: 72px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: calc(100% - 24px);
  padding: 8px 12px;
  border: 1px solid var(--wf2-border-soft);
  border-radius: 8px;
  background: var(--wf2-surface-floating);
  box-shadow: var(--wf2-shadow-floating);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}

.video-list-search-loader__spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(226, 232, 240, 0.68);
  border-top-color: var(--wf2-focus-accent);
  border-radius: 999px;
  flex: 0 0 auto;
  animation: video-fix-spin 0.9s linear infinite;
}

.video-list-loading {
  margin: 0;
  padding: 10px 8px;
  color: var(--wf2-text-muted);
  font-size: 10px;
  font-weight: 600;
}

.video-list-loading.is-error {
  color: var(--wf2-text-danger);
}

.video-row {
  cursor: pointer;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 2px;
  border-left: 6px solid var(--video-path-accent, var(--wf2-path-accent-default));
  border-bottom: 1px solid var(--wf2-border-row-divider);
  font-size: 10px;
  line-height: 1.12;
  letter-spacing: 0.01em;
  background: var(--wf2-surface-card);
  transition: background 0.12s ease, box-shadow 0.12s ease;
}

.video-row:hover {
  background: var(--wf2-surface-row-hover);
}

.video-row.selected {
  box-shadow: inset 0 0 0 2px var(--wf2-selected-ring);
}

.video-row--path-rumble {
  --video-path-accent: var(--wf2-path-accent-rumble);
}

.video-row--path-youtube {
  --video-path-accent: var(--wf2-path-accent-youtube);
}

.video-row--path-kick {
  --video-path-accent: var(--wf2-path-accent-kick);
}

.video-row--path-la {
  --video-path-accent: var(--wf2-path-accent-la);
}

.video-row--path-roce {
  --video-path-accent: var(--wf2-path-accent-roce);
}

.video-row--path-default {
  --video-path-accent: var(--wf2-path-accent-default);
}

.video-row--rumble-parent {
  background: var(--wf2-surface-rumble-parent);
  color: var(--wf2-text-rumble-parent);
}

.video-row--rumble-parent:hover {
  background: var(--wf2-surface-rumble-parent-hover);
}

.video-row--rumble-child {
  background: var(--wf2-surface-rumble-child);
  color: var(--wf2-text-rumble-child);
}

.video-row--rumble-child:hover {
  background: var(--wf2-surface-rumble-child-hover);
}

.video-row-summary {
  line-height: 1.1;
}

.video-row-detail {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  flex-wrap: wrap;
}

.video-row-search-results {
  display: grid;
  margin: 2px -2px -2px;
  padding-left: 6px;
  border-top: 1px solid var(--wf2-border-subtle);
  background: var(--wf2-surface-panel-subtle);
  cursor: default;
}

.video-row-search-results .waveform2-content-search-result {
  grid-template-columns: auto auto minmax(0, 1fr);
  gap: 2px 4px;
  min-height: 0;
  padding: 1px 2px;
  border-bottom-color: var(--wf2-border-subtle-soft);
  border-radius: 0;
  font-size: 9px;
  line-height: 1.1;
}

.video-row-search-results .waveform2-content-search-result:last-child {
  border-bottom: 0;
}

.video-row-search-results .waveform2-content-search-result[hidden] {
  display: none;
}

.video-row-search-results .waveform2-content-search-result__time {
  font-size: 9px;
}

.video-row-search-results .waveform2-content-search-result__text {
  line-height: 1.1;
}

.video-row-title {
  font-weight: 600;
  font-size: 10px;
}

.video-row-context-menu {
  position: fixed;
  z-index: 3000;
  min-width: 190px;
  padding: 4px;
  border: 1px solid var(--wf2-border-default);
  border-radius: 6px;
  background: var(--wf2-surface-card);
  box-shadow: var(--wf2-shadow-popup);
}

.video-row-context-menu[hidden] {
  display: none;
}

.video-row-context-menu button {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 6px 8px;
  text-align: left;
  cursor: pointer;
  border-radius: 4px;
}

.video-row-context-menu button:hover {
  background: var(--wf2-surface-hover);
}

.video-row-context-menu button.is-danger {
  color: var(--wf2-text-danger);
}

.video-row-context-menu button.is-danger:hover {
  background: var(--wf2-surface-danger-hover);
}

.video-fix-modal {
  width: min(420px, calc(100vw - 32px));
  max-width: none;
  padding: 0;
  border: 0;
  border-radius: 12px;
  box-shadow: var(--wf2-shadow-dialog);
}

.video-fix-modal::backdrop {
  background: var(--wf2-backdrop-modal);
}

.video-fix-modal__content {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px 20px 16px;
  background: var(--wf2-surface-card);
  color: var(--wf2-text-strong);
}

.video-fix-modal__title {
  font-size: 14px;
  font-weight: 700;
}

.video-fix-modal__body {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.video-fix-modal__spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--wf2-border-soft);
  border-top-color: var(--wf2-border-accent);
  border-radius: 999px;
  flex: 0 0 auto;
  animation: video-fix-spin 0.9s linear infinite;
}

.video-fix-modal__spinner[hidden] {
  display: none;
}

.video-fix-modal__text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.video-fix-modal__status {
  line-height: 1.35;
}

.video-fix-modal__countdown {
  color: var(--wf2-text-secondary);
  font-variant-numeric: tabular-nums;
}

.video-fix-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.video-fix-modal__button {
  min-width: 92px;
  border: 1px solid var(--wf2-border-soft);
  border-radius: 8px;
  padding: 6px 12px;
  background: var(--wf2-surface-soft);
  color: var(--wf2-text-strong);
  cursor: pointer;
}

.video-fix-modal__button:hover:not(:disabled) {
  background: var(--wf2-surface-button-hover);
}

.video-fix-modal__button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.video-fix-modal__button--primary {
  background: var(--wf2-surface-primary);
  border-color: var(--wf2-border-accent);
  color: var(--wf2-text-on-accent);
}

.video-fix-modal__button--primary:hover:not(:disabled) {
  background: var(--wf2-surface-primary-hover);
}

@keyframes video-fix-spin {
  to {
    transform: rotate(360deg);
  }
}

.video-col-start-at {
  white-space: nowrap;
}

.video-col-duration {
  white-space: nowrap;
}

.video-col-pois {
  white-space: nowrap;
  text-align: left;
}

.video-badges {
  display: inline-flex;
  align-items: center;
  gap: 0.2em;
  margin: 0;
  vertical-align: middle;
}

.video-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: auto;
  padding: 0.12em 0.3em;
  border-radius: 0.3em;
  font-weight: 700;
  font-size: 0.8em;
  line-height: 1.1;
  white-space: nowrap;
  border: 1px solid transparent;
}

.video-badge--subtitle {
  color: var(--wf2-text-success);
  background: var(--wf2-surface-success-soft);
  border-color: var(--wf2-border-success);
}

.video-badge--chat {
  color: var(--wf2-text-danger-soft);
  background: var(--wf2-surface-danger-soft);
  border-color: var(--wf2-border-danger);
}

.video-badge--stream {
  color: var(--wf2-text-info);
  background: color-mix(in srgb, var(--wf2-blue-500) 12%, transparent);
  border-color: color-mix(in srgb, var(--wf2-border-accent) 72%, transparent);
}

.video-badge--poi {
  color: var(--wf2-orange-450);
  background: var(--wf2-surface-warning-soft);
  border-color: var(--wf2-border-warning);
}

.video-badge--video {
  color: var(--wf2-text-info);
  background: color-mix(in srgb, var(--wf2-blue-500) 18%, transparent);
  border-color: var(--wf2-border-accent);
}

.video-col-categories {
  margin-left: 4px;
}

.video-category-inline-list {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 2px;
  vertical-align: middle;
}

.video-category-inline-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  border: 1px solid var(--wf2-border-tag);
  border-radius: 0;
  padding: 2px 4px;
  background: var(--wf2-surface-tag);
  color: var(--wf2-text-tag);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.05;
  white-space: nowrap;
}

.video-category-inline-dot {
  width: 6px;
  height: 6px;
  border-radius: 0;
  border: 1px solid var(--wf2-border-soft-dark);
}

.playerVideo {
  left: auto;
  right: auto;

}

.layout {
  display: flex;
  gap: 0;
  align-items: stretch;
  width: 100%;
  --layout-left-width: 46%;
}

.waveform2-page {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 8px;
}

.waveform2-main {
  order: 1;
  width: 70%;
  flex: 0 1 70%;
  min-width: 0;
  transition: width 0.5s ease, flex-basis 0.5s ease;
}

.waveform2-filters-sidebar {
  order: 2;
  width: 30%;
  flex: 0 0 30%;
  min-width: 0;
  position: sticky;
  top: 8px;
  max-height: calc(100vh - 16px);
  overflow: hidden;
  opacity: 1;
  transform: translateX(0);
  transition: width 0.5s ease, flex-basis 0.5s ease, opacity 0.5s ease, transform 0.5s ease;
}

.left {
  flex: 0 0 var(--layout-left-width);
  min-width: 0;
  padding-right: 12px;
}

.layout-resizer {
  position: relative;
  flex: 0 0 18px;
  cursor: col-resize;
  touch-action: none;
}

.layout-resizer::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  transform: translateX(-50%);
  background: var(--wf2-border-soft);
}

.layout-resizer-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.92);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 34px;
  padding: 0 8px;
  border: 1px solid var(--wf2-border-soft);
  border-radius: 999px;
  background: var(--wf2-surface-floating);
  color: var(--wf2-text-secondary);
  box-shadow: var(--wf2-shadow-floating);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease, background 0.18s ease;
  user-select: none;
}

.layout-resizer:hover .layout-resizer-handle,
.layout.is-resizing .layout-resizer-handle {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.layout.is-resizing .layout-resizer-handle {
  background: var(--wf2-surface-accent-soft);
  color: var(--wf2-text-accent);
}

.right {
  flex: 1 1 auto;
  min-width: 0;
  padding-left: 12px;
  flex-direction: column;
  gap: 8px;
}

.layout.is-resizing,
.layout.is-resizing * {
  cursor: col-resize !important;
  user-select: none;
}

.waveform2-page.filters-hidden .waveform2-filters-sidebar {
  width: 0;
  flex-basis: 0;
  opacity: 0;
  transform: translateX(12px);
  pointer-events: none;
}

.waveform2-page.filters-hidden .waveform2-main {
  width: 100%;
  flex-basis: 100%;
}

#subtitles_wrapper {
  display: block;
  position: relative;
  margin-top:1em;
}

#pois_container[data-active-tab="gmap"] #subtitles_wrapper,
#pois_container[data-active-tab="screenshots"] #subtitles_wrapper {
  display: none;
}

#pois_container[data-active-tab="poi-empty"] .poi-tab-panel {
  display: none;
}

#pois_container[data-active-tab="poi-empty"] #existing_pois {
  display: none;
}

.waveform2-mobile-prod-tab {
  display: none;
}

.waveform2-content-search-title {
  margin: 0 0 6px;
  color: var(--wf2-text-primary);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
}

#subtitles_wrapper .subtitle-tools {
  position: relative;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 4px;
}

#subtitles_wrapper .subtitle-timeline-scale {
  display: inline-flex;
  align-items: center;
  border-left: 1px solid var(--wf2-border-default);
  padding-left: 6px;
}

#subtitles_wrapper .subtitle-timeline-scale button {
  min-width: 46px;
  border-radius: 0;
}

#subtitles_wrapper .subtitle-timeline-scale button:first-child {
  border-radius: 4px 0 0 4px;
}

#subtitles_wrapper .subtitle-timeline-scale button:last-child {
  border-radius: 0 4px 4px 0;
}

#subtitles_wrapper .subtitle-timeline-scale button + button {
  margin-left: -1px;
}

#subtitles_wrapper .subtitle-tools button[aria-pressed="true"],
#subtitles_wrapper .subtitle-tools button.is-active {
  background: var(--wf2-surface-button-active);
  color: var(--wf2-text-button-active);
  border-color: var(--wf2-border-button-active);
  box-shadow: inset 0 0 0 1px var(--wf2-focus-accent);
}

#poi_msg {
  width: 90%;
  height: 60px;
}

#poi_add:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  filter: grayscale(1);
}

.playerVideo {
  width: 100%;
  margin-top: 0;
  transition: filter 0.2s ease, transform 0.2s ease;
}

.player-video-shell {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: var(--wf2-surface-media-placeholder);
}

.player-video-shell .playerVideo {
  display: block;
}

.kick-hls-player-shell {
  display: contents;
}

.kick-hls-player-shell--enabled {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.kick-hls-player-shell[hidden] {
  display: none;
}

.kick-hls-player-shell--enabled .playerVideo {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.kick-hls-player-shell--enabled:fullscreen,
.kick-hls-player-shell--enabled:-webkit-full-screen {
  width: 100vw !important;
  width: 100dvw !important;
  height: 100vh !important;
  height: 100dvh !important;
  max-width: none !important;
  max-height: none !important;
  aspect-ratio: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden;
  background: #000;
}

.kick-hls-player-shell--enabled:fullscreen .playerVideo,
.kick-hls-player-shell--enabled:-webkit-full-screen .playerVideo {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  object-fit: contain;
}

.player-video-shell .playerVideo[hidden],
.youtube-player-shell[hidden],
.rumble-player-shell[hidden],
.public-video-unavailable[hidden] {
  display: none;
}

.youtube-player-shell,
.rumble-player-shell {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.youtube-player,
.youtube-player-shell iframe,
.rumble-player,
.rumble-player-fallback {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.rumble-player {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.rumble-player-mount,
.rumble-player-mount > * {
  width: 100%;
  height: 100%;
}

.rumble-player-mount {
  position: absolute;
  inset: 0;
}

.rumble-player-fallback {
  position: absolute;
  inset: 0;
}

.rumble-player-fallback[hidden] {
  display: none;
}

.public-video-unavailable {
  display: grid;
  min-height: 12rem;
  place-items: center;
  padding: 1rem;
  color: var(--wf2-text-muted);
  background: var(--wf2-surface-media-placeholder);
  border: 1px solid var(--wf2-border-subtle);
  text-align: center;
}

.rumble-playback-notice {
  margin: 0.3rem 0 0;
  padding: 0.35rem 0.5rem;
  color: var(--wf2-yellow-350);
  background: var(--wf2-surface-warning-soft);
  border-left: 2px solid var(--wf2-border-warning);
  font-size: 0.78rem;
  line-height: 1.35;
}

.rumble-playback-notice[hidden] {
  display: none;
}

.chat-overlay-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 25%;
  height: 100%;
  padding: 6px;
  pointer-events: none;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: var(--wf2-chat-overlay-bg);
  border-left: 1px solid var(--wf2-chat-overlay-border);
  color: var(--wf2-chat-overlay-text);
  z-index: 2;
}

.chat-overlay-panel[hidden] {
  display: none;
}

.chat-overlay-messages {
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 4px;
}

.chat-overlay-message {
  padding: 3px 5px;
  background: var(--wf2-chat-overlay-message-bg);
  border: 1px solid var(--wf2-chat-overlay-message-border);
  border-radius: 3px;
  color: var(--wf2-chat-overlay-text);
  font-size: 10px;
  line-height: 1.25;
  word-break: break-word;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
}

.chat-overlay-user {
  color: var(--wf2-chat-overlay-user);
  font-weight: 700;
  margin-right: 4px;
}

.chat-overlay-content {
  color: inherit;
}

.playerVideo.is-alert-blurred {
  filter: blur(18px);
}

.playerVideo.is-flipped {
  transform: scaleX(-1);
}

.playerVideo.is-flipped::-webkit-media-controls-enclosure,
.playerVideo.is-flipped::-webkit-media-controls-panel,
.playerVideo.is-flipped::-webkit-media-controls-overlay-enclosure {
  transform: scaleX(-1);
}

.speed-controls {
  display: flex;
  align-items: center;
  gap: 3px;
  flex-wrap: nowrap;
  min-height: 20px;
  margin: 0 0 4px 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.speed-controls::-webkit-scrollbar {
  display: none;
}

.speed-controls button {
  min-height: 20px;
  height: 20px;
  padding: 0 6px;
  border: 1px solid var(--wf2-border-button);
  border-radius: 4px;
  background: var(--wf2-surface-button);
  font-size: 10px;
  line-height: 1;
  white-space: nowrap;
  flex: 0 0 auto;
}

.speed-controls .playback-rate-btn.is-active,
.speed-controls .playback-rate-btn[aria-pressed="true"] {
  background: var(--wf2-surface-accent-strong);
  color: var(--wf2-text-accent);
  border-color: var(--wf2-border-accent-strong);
  box-shadow: inset 0 0 0 1px var(--wf2-focus-accent);
}

.speed-controls .playback-rate-btn:focus-visible {
  outline: 2px solid var(--wf2-focus-accent);
  outline-offset: 1px;
}

.speed-controls .playback-rate-slider-control {
  display: inline-flex;
  align-items: center;
  margin-left: 1px;
  min-height: 20px;
  flex: 0 0 auto;
}

.speed-controls .playback-rate-slider-control input {
  width: 112px;
  height: 20px;
  margin: 0;
  accent-color: var(--wf2-border-accent-strong);
  cursor: ew-resize;
}

.speed-controls .sync-offset-control {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: 2px;
  min-height: 20px;
  flex: 0 0 auto;
}

.speed-controls .sync-offset-control label {
  font-weight: 600;
  white-space: nowrap;
  font-size: 10px;
  line-height: 1;
}

.speed-controls .sync-offset-control input {
  width: 72px;
  min-height: 20px;
  height: 20px;
  padding: 0 4px;
  font-size: 10px;
  border: 1px solid var(--wf2-border-button);
  border-radius: 4px;
}

.speed-controls .sync-offset-control input.is-invalid {
  border-color: var(--wf2-border-danger-strong);
  outline-color: var(--wf2-border-danger-strong);
}

.speed-controls .speed-controls-actions {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex: 0 0 auto;
}

.speed-controls .alert-toggle-btn {
  background: var(--wf2-surface-alert);
  color: var(--wf2-text-on-accent);
  border: 1px solid var(--wf2-border-alert);
  font-weight: 700;
  padding: 0 7px;
  min-height: 20px;
  height: 20px;
  border-radius: 4px;
  font-size: 10px;
  line-height: 1;
}

.speed-controls .alert-toggle-btn.is-active {
  background: var(--wf2-surface-alert-active);
  border-color: var(--wf2-border-alert-active);
}

.speed-controls .alert-toggle-btn:focus-visible {
  outline: 2px solid var(--wf2-focus-danger);
  outline-offset: 1px;
}

.speed-controls .screenshot-action-btn {
  background: var(--wf2-surface-success-action);
  color: var(--wf2-text-on-accent);
  border: 1px solid var(--wf2-border-success-strong);
  font-weight: 700;
  padding: 0 7px;
  min-height: 20px;
  height: 20px;
  border-radius: 4px;
  font-size: 10px;
  line-height: 1;
}

.speed-controls .screenshot-action-btn:hover:not(:disabled) {
  background: var(--wf2-surface-success-action-hover);
  border-color: var(--wf2-border-success-deep);
}

.speed-controls .screenshot-action-btn:focus-visible {
  outline: 2px solid var(--wf2-focus-success);
  outline-offset: 1px;
}

.speed-controls .screenshot-action-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.speed-controls .flip-toggle-btn {
  background: var(--wf2-surface-button);
  color: var(--wf2-text-button);
  border: 1px solid var(--wf2-border-button);
  font-weight: 600;
  padding: 0 7px;
  min-height: 20px;
  height: 20px;
  border-radius: 4px;
  font-size: 10px;
  line-height: 1;
}

.speed-controls .flip-toggle-btn:hover {
  background: var(--wf2-surface-button-ghost-hover);
  border-color: var(--wf2-border-strong);
}

.speed-controls .flip-toggle-btn.is-active {
  background: var(--wf2-surface-accent-strong);
  color: var(--wf2-text-accent);
  border-color: var(--wf2-border-accent-strong);
  box-shadow: inset 0 0 0 1px var(--wf2-focus-accent);
}

.speed-controls .flip-toggle-btn:focus-visible {
  outline: 2px solid var(--wf2-focus-accent);
  outline-offset: 1px;
}

.speed-controls .chat-overlay-toggle-btn {
  background: var(--wf2-surface-button);
  color: var(--wf2-text-button);
  border: 1px solid var(--wf2-border-button);
  font-weight: 600;
  padding: 0 7px;
  min-height: 20px;
  height: 20px;
  border-radius: 4px;
  font-size: 10px;
  line-height: 1;
}

.speed-controls .chat-overlay-toggle-btn:hover:not(:disabled) {
  background: var(--wf2-surface-button-ghost-hover);
  border-color: var(--wf2-border-strong);
}

.speed-controls .chat-overlay-toggle-btn.is-active {
  background: var(--wf2-surface-accent-strong);
  color: var(--wf2-text-accent);
  border-color: var(--wf2-border-accent-strong);
  box-shadow: inset 0 0 0 1px var(--wf2-focus-accent);
}

.speed-controls .chat-overlay-toggle-btn:focus-visible {
  outline: 2px solid var(--wf2-focus-accent);
  outline-offset: 1px;
}

.speed-controls .chat-overlay-toggle-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

#existing_pois li,
#existing_gps_entries li {
  display: flex;
  align-items: flex-start;
  gap: 1px;
}

#existing_pois button,
#existing_gps_entries button {
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0;
  margin: 0;

  display: flex;
  align-items: center;
  justify-content: center;

  width: 16px;
  height: 16px;
  line-height: 1;
  /* ou 16px */
  font-size: 14px;
}

#existing_pois,
#existing_pois * {
  font-size: 9px;
}

#existing_pois li {
  align-items: baseline;
  gap: 4px;
  min-height: 0;
  padding: 1px 2px;
  border-bottom: 1px solid var(--wf2-border-subtle-soft);
  color: var(--wf2-text-primary);
  line-height: 1.1;
}

#existing_pois li:last-child {
  border-bottom: 0;
}

#existing_pois .poi-timecode {
  color: var(--wf2-text-info);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 9px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

#existing_pois .poi-type-prefix {
  color: var(--wf2-orange-450);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}

#existing_pois .poi-text-container {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--wf2-text-primary);
  line-height: 1.1;
}

#existing_pois .poi-text {
  color: var(--wf2-text-primary);
  font-size: 9px;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

#existing_pois .poi-text[data-editing="1"] {
  display: inline-flex;
  width: 100%;
}

#existing_pois .poi-inline-edit-input {
  box-sizing: border-box;
  width: 100%;
  min-width: 80px;
  padding: 2px 5px;
  border: 1px solid var(--wf2-border-accent-strong);
  border-radius: 3px;
  outline: none;
  background: var(--wf2-surface-panel-subtle);
  color: var(--wf2-text-primary);
  font: inherit;
}

#existing_pois .poi-inline-edit-input:focus {
  box-shadow: 0 0 0 1px var(--wf2-focus-accent);
}

#existing_pois .poi-category-display-list {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
  margin-left: 4px;
}

#existing_pois .poi-category-display-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: auto;
  height: auto;
  min-height: 12px;
  padding: 0 3px;
  border: 1px solid var(--wf2-border-tag);
  border-radius: 0;
  background: var(--wf2-surface-tag);
  color: var(--wf2-text-tag);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.05;
  white-space: nowrap;
  cursor: default;
}

#existing_pois .poi-category-display-chip * {
  font-size: 9px;
}

#existing_pois button {
  width: 14px;
  height: 14px;
  font-size: 11px;
}

#existing_pois .poi-category-display-chip .wf2-chip-dot {
  flex: 0 0 auto;
}

#existing_pois button.edit,
#existing_gps_entries button.edit {
  color: var(--wf2-text-edit);
}

#existing_pois button.seek,
#existing_gps_entries button.seek {
  color: var(--wf2-text-seek);
}

#existing_pois button.cut {
  color: var(--wf2-text-accent);
}

#existing_pois button:focus,
#existing_gps_entries button:focus {
  outline: none;
}

#existing_pois,
#existing_gps_entries {
  max-height: 58vh;
  overflow-y: auto;
  margin: 0;
  padding-left: 0;
  list-style: none;
}

#existing_pois li.selected-poi {
  background: var(--wf2-surface-selected);
}

#existing_pois li.poi-readonly {
  cursor: pointer;
}

#existing_pois li.poi-readonly:hover,
#existing_pois li.poi-readonly:focus-visible {
  background: var(--wf2-surface-row-hover);
}

#existing_pois li.poi-readonly:focus-visible {
  outline: 1px solid var(--wf2-focus-accent);
  outline-offset: -1px;
}

#existing_pois li.marked-poi-range {
  background: var(--wf2-surface-warning-soft);
  box-shadow: inset 3px 0 0 var(--wf2-border-warning);
}

#existing_gps_entries {
  max-height: 24vh;
}

#existing_gps_entries li.selected-gps {
  background: var(--wf2-surface-selected);
}

.poi-tabs {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  border-bottom: 1px solid var(--wf2-border-default);
}

.poi-tabs .poi-tab {
  padding: 2px 6px;
  margin: 0;
  border: 1px solid var(--wf2-border-default);
  border-bottom: none;
  border-radius: 4px 4px 0 0;
  background: var(--wf2-surface-tab);
  cursor: pointer;
  color: inherit;
  font: inherit;
  appearance: none;
  font-size: 10px;
}

.poi-tabs .poi-tab.is-active {
  background: var(--wf2-surface-card);
  font-weight: 700;
}

.poi-tabs .poi-tabs-action {
  margin-left: auto;
  display: flex;
  align-items: flex-end;
}

.poi-tabs .poi-tabs-action .poi-tab-toggle {
  margin: 0;
}

.poi-tab-panel {
  display: none;
}

.poi-tab-panel.is-active {
  display: block;
}

.poi-filter-toolbar {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 8px;
}

.poi-category-filter-buttons {
  flex: 1 1 auto;
  min-width: 0;
  margin-top: 0;
  max-height: 44px;
  overflow: hidden;
}

.bouton_categorie {
  flex: 0 0 auto;
}

.bouton_categorie.is-active,
.poi-private-filter-btn[aria-pressed="true"] {
  background: var(--wf2-surface-button-active);
  border-color: var(--wf2-focus-accent);
  color: var(--wf2-text-strong);
}

.poi-private-filter-btn {
  position: sticky;
  right: 0;
  z-index: 12;
  margin-left: auto;
  box-shadow: -8px 0 10px var(--wf2-surface-panel-subtle);
}

.poi-tab-search {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
}

.poi-tab-search input {
  flex: 1;
}

#waveform2_content_search_frame {
  height: auto;
  max-height: 30rem;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--wf2-border-default);
  border-radius: 0 0 8px 8px;
  background: var(--wf2-surface-panel-subtle);
  padding: 8px;
}

.waveform2-content-search-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.waveform2-content-search-types {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
}

.waveform2-content-search-type {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-height: 22px;
  padding: 2px 5px;
  border: 1px solid var(--wf2-border-button);
  border-radius: 4px;
  background: var(--wf2-surface-button);
  color: var(--wf2-text-button);
  cursor: pointer;
  font-size: 11px;
  user-select: none;
}

.waveform2-content-search-type input {
  margin: 0;
  accent-color: var(--wf2-focus-accent);
}

.waveform2-content-search-type--subtitle:has(input:checked) {
  border-color: var(--wf2-border-success-strong);
  color: var(--wf2-text-success-strong);
}

.waveform2-content-search-type--chat:has(input:checked) {
  border-color: var(--wf2-border-danger-strong);
  color: var(--wf2-text-danger);
}

.waveform2-content-search-type--poi:has(input:checked) {
  border-color: var(--wf2-orange-450);
  color: var(--wf2-orange-450);
}

.waveform2-content-search-toolbar > .wf2-input-clear,
.waveform2-content-search-toolbar > input {
  flex: 1 1 180px;
  min-width: 140px;
}

.waveform2-content-search-toolbar > .wf2-input-clear > input,
.waveform2-content-search-toolbar > input {
  box-sizing: border-box;
  width: 100%;
}

.waveform2-content-search-results {
  flex: 0 1 auto;
  min-height: 0;
  max-height: 20rem;
  overflow-x: hidden;
  overflow-y: auto;
  border-top: 1px solid var(--wf2-border-subtle);
}

.waveform2-content-search-empty {
  margin: 8px 0 2px;
  color: var(--wf2-text-dim);
  font-size: 11px;
}

.waveform2-content-search-result {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: baseline;
  gap: 4px 6px;
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--wf2-border-subtle-soft);
  background: transparent;
  color: var(--wf2-text-primary);
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.waveform2-content-search-result:hover,
.waveform2-content-search-result:focus-visible {
  background: var(--wf2-surface-hover);
}

.waveform2-content-search-result:focus-visible {
  outline: 1px solid var(--wf2-focus-accent);
  outline-offset: -1px;
}

.waveform2-content-search-result__time {
  color: var(--wf2-text-info);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 10px;
  white-space: nowrap;
}

.waveform2-content-search-result__prefix {
  font-weight: 800;
  white-space: nowrap;
}

.waveform2-content-search-result--sub .waveform2-content-search-result__prefix {
  color: var(--wf2-text-success-strong);
}

.waveform2-content-search-result--chat .waveform2-content-search-result__prefix {
  color: var(--wf2-text-danger);
}

.waveform2-content-search-result--poi .waveform2-content-search-result__prefix {
  color: var(--wf2-orange-450);
}

.waveform2-content-search-result__text {
  min-width: 0;
  overflow-wrap: anywhere;
}

.waveform2-content-search-match {
  border-radius: 2px;
  padding: 0 1px;
  font-weight: 800;
}

.waveform2-content-search-match--sub {
  background: var(--wf2-surface-success-highlight);
  color: var(--wf2-text-success-strong);
}

.waveform2-content-search-match--chat {
  background: var(--wf2-surface-danger-soft);
  color: var(--wf2-text-danger);
}

.waveform2-content-search-match--poi {
  background: var(--wf2-surface-warning-soft);
  color: var(--wf2-orange-450);
}

@media (max-width: 600px) {
  .waveform2-content-search-toolbar {
    align-items: stretch;
  }

  .waveform2-content-search-types,
  .waveform2-content-search-toolbar > .wf2-input-clear,
  .waveform2-content-search-toolbar > input {
    flex: 1 1 100%;
    width: 100%;
  }

  .waveform2-content-search-types {
    justify-content: stretch;
  }

  .waveform2-content-search-type {
    flex: 1 1 50%;
    justify-content: center;
  }
}

.wf2-input-clear {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

.wf2-input-clear>input[type="text"] {
  min-width: 0;
}

.wf2-input-clear-btn {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--wf2-text-muted);
  cursor: pointer;
  line-height: 1;
  display: none;
  align-items: center;
  justify-content: center;
}

.wf2-input-clear-btn.is-visible {
  display: inline-flex;
}

.wf2-input-clear-btn:hover {
  background: var(--wf2-surface-media-placeholder);
  color: var(--wf2-text-strong);
}

.wf2-input-clear-btn:focus-visible {
  outline: 1px solid var(--wf2-focus-accent);
  outline-offset: 1px;
}

.subtitle-tab-search .wf2-input-clear,
.chat-tab-search .wf2-input-clear,
.poi-tab-search .wf2-input-clear {
  flex: 1 1 auto;
}

#gmap_frame {
  border: 1px solid var(--wf2-border-default);
  border-radius: 0 0 12px 12px;
  background: var(--wf2-surface-gmap-frame);
  padding: 10px;
  display: flex;
  flex-direction: column;
}

.gmap-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.gmap-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.gmap-canvas-overlay-actions {
  position: absolute;
  top: 12px;
  right: 62px;
  z-index: 690;
  display: inline-flex;
  align-items: center;
}

.gmap-basemap-switch {
  display: inline-flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--wf2-border-soft);
  border-radius: 4px;
  overflow: hidden;
  background: var(--wf2-surface-card);
}

.gmap-basemap-btn {
  border: 0;
  background: transparent;
  color: var(--wf2-text-primary);
  padding: 1px 4px;
  cursor: pointer;
}

.gmap-basemap-btn+.gmap-basemap-btn {
  border-left: 1px solid var(--wf2-border-soft);
}

.gmap-basemap-btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.gmap-basemap-btn.is-active {
  background: var(--wf2-surface-primary);
  color: var(--wf2-text-on-accent);
}

.gmap-toolbar strong {
  display: block;
  font-size: 13px;
}

#gmap_summary {
  color: var(--wf2-text-secondary);
}

#gmap_recenter {
  white-space: nowrap;
}

#gmap_status {
  margin: 0 0 8px 0;
  color: var(--wf2-text-secondary);
}

#gmap_status[data-state="error"] {
  color: var(--wf2-text-danger);
}

#gmap_status[data-state="loading"] {
  color: var(--wf2-text-accent);
}

#gmap_canvas_shell {
  position: relative;
}

#peaks_shell {
  position: relative;
}

.peaks-unavailable-message {
  position: absolute;
  inset: 0;
  z-index: 90;
  display: none;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  padding: 16px;
  border: 1px solid var(--wf2-border-subtle);
  border-radius: 6px;
  background: var(--wf2-surface-panel-subtle);
  color: var(--wf2-text-secondary);
  text-align: center;
  pointer-events: none;
}

#peaks_shell.is-peaks-unavailable .peaks-unavailable-message,
#peaks_shell.is-peaks-loading .peaks-unavailable-message {
  display: flex;
}

#peaks_shell.is-peaks-unavailable #overview-container,
#peaks_shell.is-peaks-unavailable #zoomview-container,
#peaks_shell.is-peaks-loading #overview-container,
#peaks_shell.is-peaks-loading #zoomview-container {
  opacity: 0.18;
}

#peaks_drag_lock {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 120;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--wf2-text-on-accent);
  box-shadow: var(--wf2-shadow-control);
  transition: transform 120ms ease, box-shadow 120ms ease, background-color 120ms ease;
}

.standalone-public-menu {
  font: 16px/1.55 Arial, Helvetica, sans-serif;
}

.standalone-public-menu__toggle {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 1400;
  background: var(--wf2-surface-card);
  box-shadow: var(--wf2-shadow-control);
}

.standalone-public-menu__toggle:hover {
  background: var(--wf2-surface-row-hover);
  box-shadow: var(--wf2-shadow-control-hover);
}

.standalone-public-menu__toggle:focus-visible {
  outline: 2px solid var(--wf2-focus-accent);
  outline-offset: 2px;
}

.standalone-public-menu .public-sidebar {
  z-index: 1300;
  padding-top: 58px;
  transform: translateX(-101%);
  transition: none;
}

.standalone-public-menu.is-menu-open .public-sidebar {
  transform: translateX(0);
}

.standalone-public-menu .public-menu-backdrop {
  z-index: 1200;
}

.standalone-public-menu.is-menu-open .public-menu-backdrop {
  display: block !important;
}

#peaks_screenshot_markers_toggle {
  position: absolute;
  top: 8px;
  right: 46px;
  z-index: 120;
  min-height: 20px;
  height: 20px;
  box-shadow: var(--wf2-shadow-control);
}

#peaks_screenshot_markers_toggle.is-active,
#peaks_screenshot_markers_toggle[aria-pressed="true"] {
  background: var(--wf2-surface-button-active);
  border-color: var(--wf2-focus-accent);
  color: var(--wf2-text-strong);
}

#peaks_drag_lock:hover {
  transform: translateY(-1px);
  box-shadow: var(--wf2-shadow-control-hover);
}

#peaks_drag_lock:focus-visible {
  outline: 2px solid var(--wf2-focus-contrast);
  outline-offset: 2px;
}

#peaks_drag_lock.is-locked {
  background: var(--wf2-surface-lock-danger);
}

#peaks_drag_lock.is-unlocked {
  background: var(--wf2-surface-lock-success);
}

#peaks_drag_lock svg {
  width: 16px;
  height: 16px;
  display: block;
}

#gmap_drag_lock {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 700;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--wf2-text-on-accent);
  box-shadow: var(--wf2-shadow-control-strong);
  transition: transform 120ms ease, box-shadow 120ms ease, background-color 120ms ease;
}

#gmap_drag_lock:hover {
  transform: translateY(-1px);
  box-shadow: var(--wf2-shadow-control-strong-hover);
}

#gmap_drag_lock:focus-visible {
  outline: 2px solid var(--wf2-focus-contrast);
  outline-offset: 2px;
}

#gmap_drag_lock.is-locked {
  background: var(--wf2-surface-lock-danger);
}

#gmap_drag_lock.is-unlocked {
  background: var(--wf2-surface-lock-success);
}

#gmap_drag_lock svg {
  width: 22px;
  height: 22px;
  display: block;
}

#gmap_canvas {
  width: 100%;
  min-height: 420px;
  height: 58vh;
  border: 1px solid var(--wf2-border-canvas);
  border-radius: 12px;
  overflow: hidden;
  background: var(--wf2-surface-gmap-canvas);
}

#gmap_canvas>* {
  width: 100%;
  height: 100%;
  display: block;
}

.leaflet-container {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  font: inherit;
}

.gmap-gps-marker-shell {
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
}

.gmap-gps-marker-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--wf2-surface-primary);
  border: 2px solid var(--wf2-border-contrast);
  box-shadow: 0 0 0 1px var(--wf2-shadow-marker-blue);
}

.gmap-gps-marker-shell.is-selected .gmap-gps-marker-dot {
  width: 14px;
  height: 14px;
  background: var(--wf2-surface-marker-selected);
  box-shadow: 0 0 0 3px var(--wf2-shadow-marker-teal);
}

.gmap-gps-marker-shell.is-draggable {
  cursor: grab;
}

.gmap-gps-marker-shell.is-draggable:active {
  cursor: grabbing;
}

.gmap-gps-marker-shell.is-pending .gmap-gps-marker-dot {
  background: var(--wf2-surface-marker-pending);
}

.gmap-current-marker-shell {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
}

.gmap-current-marker-dot {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: var(--wf2-surface-marker-current);
  border: 3px solid var(--wf2-border-contrast);
  box-shadow: 0 0 0 1px var(--wf2-shadow-marker-red);
}

.gmap-current-marker-shell.is-draggable {
  cursor: grab;
}

.gmap-current-marker-shell.is-draggable:active {
  cursor: grabbing;
}

.gmap-current-marker-shell.is-pending .gmap-current-marker-dot {
  background: var(--wf2-surface-marker-pending);
}

.gmap-context-popup {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 230px;
}

.gmap-context-popup-coords {
  font-family: monospace;
  font-size: 12px;
  color: var(--wf2-text-strong);
}

.gmap-context-popup-note {
  margin: 0;
  color: var(--wf2-text-secondary);
}

.gmap-context-popup button {
  align-self: flex-start;
}

.gps-editor-frame {
  border-top: 1px solid var(--wf2-border-default);
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.gps-editor-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.gps-editor-mode {
  font-weight: 700;
}

.gps-editor-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.gps-editor-row input[type="text"] {
  min-width: 160px;
}

.gps-editor-row--coords input[type="text"] {
  min-width: 170px;
}

.gps-private-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.gps-editor-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

#screenshot_tab_frame {
  max-height: 58vh;
  overflow-y: auto;
  border: 1px solid var(--wf2-border-default);
  border-radius: 0 0 8px 8px;
  background: var(--wf2-surface-panel-subtle);
  padding: 8px;
}

#screenshot_empty {
  color: var(--wf2-text-dim);
  margin: 0;
}

#existing_screenshots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.screenshot-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  padding: 6px;
  border: 1px solid var(--wf2-border-panel);
  border-radius: 8px;
  background: var(--wf2-surface-card);
  cursor: pointer;
  text-align: left;
}

.screenshot-card:hover {
  border-color: var(--wf2-border-strong);
  background: var(--wf2-surface-soft);
}

.screenshot-card img {
  width: 100%;
  height: 110px;
  object-fit: contain;
  border: 1px solid var(--wf2-border-soft);
  border-radius: 6px;
  background: var(--wf2-surface-media-placeholder);
}

.screenshot-card-time {
  font-weight: 700;
  color: var(--wf2-text-strong);
  font-variant-numeric: tabular-nums;
}

.screenshot-card-name {
  color: var(--wf2-text-muted);
  font-size: 11px;
  line-height: 1.3;
  word-break: break-word;
}

#gps_filtered_empty {
  color: var(--wf2-text-dim);
  margin: 0;
}

@media (max-width: 900px) {
  .poi-filter-toolbar {
    align-items: flex-start;
  }

  .gps-editor-row,
  .gps-editor-actions {
    align-items: stretch;
  }
}

#poi_filtered_empty {
  color: var(--wf2-text-dim);
  margin: 0 0 8px 0;
  display: none;
}

/* Continuous, virtualized subtitle/chat timeline. */
#existing_subtitles {
  --subtitle-timeline-height: 1px;
  --subtitle-timeline-minute-height: 600px;
  position: relative;
  max-height: 60vh;
  overflow-x: hidden;
  overflow-y: auto;
  margin: 0;
  padding: 0;
  background: var(--wf2-surface-timeline);
  border: 1px solid var(--wf2-border-timeline);
  border-radius: 8px;
  contain: layout paint style;
  overflow-anchor: none;
}

#existing_subtitles::before {
  content: "";
  display: block;
  width: 100%;
  height: var(--subtitle-timeline-height);
  background-image: repeating-linear-gradient(
    to bottom,
    var(--wf2-border-subtle-soft) 0,
    var(--wf2-border-subtle-soft) 1px,
    transparent 1px,
    transparent var(--subtitle-timeline-minute-height)
  );
  pointer-events: none;
}

#existing_subtitles .subtitle-timeline-entry {
  position: absolute;
  top: 0;
  box-sizing: border-box;
  padding: 0;
  border-radius: 4px;
  border: 1px solid var(--wf2-border-bubble);
  background: var(--wf2-surface-bubble);
  color: var(--wf2-text-subtitle);
  font-size: 11px;
  line-height: 1.25;
  display: flex;
  gap: 4px;
  align-items: baseline;
  cursor: pointer;
  z-index: 2;
  will-change: transform;
  overflow-wrap: anywhere;
}

#existing_subtitles[data-timeline-mode="combined"] .sub {
  left: 8px;
  width: calc(50% - 12px);
}

#existing_subtitles[data-timeline-mode="combined"] .chat {
  left: calc(50% + 4px);
  right: 8px;
}

#existing_subtitles[data-timeline-mode="chat"] .sub {
  display: none;
}

#existing_subtitles[data-timeline-mode="chat"] .chat {
  left: 8px;
  right: 8px;
}

#existing_subtitles .chat {
  cursor: text;
  user-select: text;
  -webkit-user-select: text;
}

#existing_subtitles .sub {
  user-select: none;
}

#existing_subtitles .subtitle-timeline-entry:focus-visible {
  outline: 2px solid var(--wf2-focus-accent);
  outline-offset: -1px;
}

#existing_subtitles .subtitle-timeline-entry.is-measuring {
  visibility: hidden;
}

#existing_subtitles .subtitle-like-button,
#existing_subtitles .chat-like-button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--wf2-text-secondary-soft);
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
  margin-left: auto;
  padding: 0 2px;
  flex: 0 0 auto;
}

#existing_subtitles .sub.is-liked .subtitle-like-button,
#existing_subtitles .chat.is-liked .chat-like-button {
  color: #e11d48;
}

#existing_subtitles .subtitle-like-button:disabled,
#existing_subtitles .chat-like-button:disabled {
  cursor: default;
  opacity: .75;
}

#existing_subtitles .subtitle-like-button:not(:disabled):hover,
#existing_subtitles .chat-like-button:not(:disabled):hover {
  color: #be123c;
}

#existing_subtitles .chat > .time {
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}


/* label time */
#existing_subtitles .sub>span,
#existing_subtitles .chat>span {
  font-variant-numeric: tabular-nums;
  color: var(--wf2-text-secondary-soft);
  font-size: 11px;
  white-space: nowrap;
}

#existing_subtitles .chat-time-edit-input {
  width: 86px;
  min-width: 86px;
  height: 16px;
  padding: 0 3px;
  border: 1px solid var(--wf2-border-accent-strong);
  background: var(--wf2-surface-panel-subtle);
  color: var(--wf2-text-primary);
  font: inherit;
  font-size: 10px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  outline: none;
}

#existing_subtitles .chat-time-edit-input:focus {
  box-shadow: 0 0 0 1px var(--wf2-focus-accent);
}

#existing_subtitles .subtitle-edit-input {
  border: 1px solid var(--wf2-border-accent-strong);
  background: var(--wf2-surface-panel-subtle);
  color: var(--wf2-text-primary);
  outline: none;
}

#existing_subtitles .subtitle-edit-input:focus {
  box-shadow: 0 0 0 1px var(--wf2-focus-accent);
}

#existing_subtitles .chat {
  background: var(--wf2-surface-bubble-chat);
  border-color: var(--wf2-border-bubble-chat);
}

#existing_subtitles .sub .user,
#existing_subtitles .chat .user {
  color: var(--wf2-text-subtitle-strong);
  font-weight: 600;
  margin-right: .25rem;
}

#existing_subtitles .subtitle_current {
  background: var(--wf2-surface-warning-soft);
  border-color: var(--wf2-border-warning);
  box-shadow: var(--wf2-shadow-warning);
}

#existing_subtitles .subtitle-timeline-entry:hover {
  border-color: var(--wf2-border-bubble-hover);
  background: var(--wf2-surface-card);
}


#video-category-manager,
#poi-category-manager {
  max-width: 100%;
  margin: 6px 0 10px 0;
}

#video-category-manager .video-category-entry-row,
#poi-category-manager .poi-category-entry-row {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
  overflow: hidden;
  min-width: 0;
}

#file_controls .wf2-compact-filter-input,
#filters .wf2-compact-filter-input,
#video-category-manager .wf2-compact-filter-input,
#poi-category-manager .wf2-compact-filter-input {
  width: 100%;
  min-width: 0;
  min-height: 18px;
  height: 18px;
  padding: 1px 18px 1px 5px;
  border: 1px solid var(--wf2-border-tag);
  border-radius: 0;
  background: var(--wf2-surface-tag);
  color: var(--wf2-text-tag);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.05;
}

#file_controls .wf2-compact-filter-input::placeholder,
#filters .wf2-compact-filter-input::placeholder,
#video-category-manager .wf2-compact-filter-input::placeholder,
#poi-category-manager .wf2-compact-filter-input::placeholder {
  color: var(--wf2-text-muted);
}

#file_controls .wf2-compact-filter-input:focus,
#filters .wf2-compact-filter-input:focus,
#video-category-manager .wf2-compact-filter-input:focus,
#poi-category-manager .wf2-compact-filter-input:focus {
  outline: none;
  border-color: var(--wf2-border-accent-strong);
}

#video-category-input,
#poi-category-input {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid var(--wf2-border-input);
  border-radius: 8px;
}

#video-category-input,
#poi-category-input {
  width: 100%;
  min-width: 0;
}

#video-category-manager .video-category-entry-row .wf2-input-clear,
#poi-category-manager .poi-category-entry-row .wf2-input-clear {
  flex: 0 0 220px;
  width: 220px;
  min-width: 220px;
}

#video-category-manager .video-category-entry-row .wf2-input-clear>input[type="text"],
#poi-category-manager .poi-category-entry-row .wf2-input-clear>input[type="text"] {
  width: 100%;
}

#video-category-suggestions,
#poi-category-suggestions,
#chat_author_suggestions {
  list-style: none;
  padding: 0;
  margin: 6px 0 0 0;
  border: 1px solid var(--wf2-border-panel);
  border-radius: 8px;
  max-height: 160px;
  overflow: auto;
  background: var(--wf2-surface-card);
  display: none;
}

#video-category-suggestions li,
#poi-category-suggestions li,
#chat_author_suggestions li {
  padding: 6px 8px;
  cursor: pointer;
}

#video-category-suggestions li:hover,
#poi-category-suggestions li:hover,
#chat_author_suggestions li:hover {
  background: var(--wf2-surface-hover);
}

.wf2-chip-list,
#video-category-tags,
#poi-category-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  margin-top: 6px;
}

#poi-category-manager .poi-category-help {
  color: var(--wf2-text-muted);
  margin: 4px 0 0 0;
}

#video-category-manager .video-category-recents,
#poi-category-manager .poi-category-recents {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex-wrap: nowrap;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 20px;
  overflow: hidden;
}

#video-category-manager .video-category-recents[hidden],
#poi-category-manager .poi-category-recents[hidden] {
  display: none;
}

.wf2-chip,
.video-category-tag,
.file-category-filter-tag,
.bouton_categorie,
#video-category-manager .video-recent-category-btn,
#poi-category-manager .poi-recent-category-btn,
.file-category-recent-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-height: 18px;
  padding: 2px 4px;
  border: 1px solid var(--wf2-border-tag);
  border-radius: 0;
  background: var(--wf2-surface-tag);
  color: var(--wf2-text-tag);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.05;
  white-space: nowrap;
}

.wf2-chip-btn,
.bouton_categorie,
#video-category-manager .video-recent-category-btn,
#poi-category-manager .poi-recent-category-btn,
.file-category-recent-btn {
  cursor: pointer;
}

.wf2-chip-btn:hover:not(:disabled),
.bouton_categorie:hover:not(:disabled),
#video-category-manager .video-recent-category-btn:hover:not(:disabled),
#poi-category-manager .poi-recent-category-btn:hover:not(:disabled) {
  background: var(--wf2-surface-hover);
  border-color: var(--wf2-border-strong);
}

.wf2-chip-btn:focus-visible,
.bouton_categorie:focus-visible,
#video-category-manager .video-recent-category-btn:focus-visible,
#poi-category-manager .poi-recent-category-btn:focus-visible {
  outline: 2px solid var(--wf2-focus-accent);
  outline-offset: 1px;
}

.wf2-chip-btn:disabled,
.bouton_categorie:disabled,
#video-category-manager .video-recent-category-btn:disabled,
#poi-category-manager .poi-recent-category-btn:disabled {
  opacity: 0.45;
  cursor: default;
}

.wf2-chip-dot,
.video-category-dot,
#video-category-manager .video-recent-category-btn-dot,
#poi-category-manager .poi-recent-category-btn-dot {
  width: 6px;
  height: 6px;
  border-radius: 0;
  border: 1px solid var(--wf2-border-soft-dark);
}

#video-category-manager .video-category-entry-row .wf2-input-clear-btn,
#poi-category-manager .poi-category-entry-row .wf2-input-clear-btn {
  right: 2px;
  width: 12px;
  height: 12px;
  border-radius: 0;
  font-size: 10px;
}

.poi-editor-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  margin-bottom: 6px;
  scrollbar-width: thin;
}

.poi-editor-toolbar>* {
  flex: 0 0 auto;
}

.poi-editor-time-field {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.poi-editor-time-field span {
  font-size: 10px;
  font-weight: 600;
  color: var(--wf2-text-secondary);
}

.poi-editor-toolbar button,
.gps-editor-toolbar button,
#subtitles_wrapper .subtitle-tools button {
  min-height: 20px;
  height: 20px;
  padding: 0 7px;
  border: 1px solid var(--wf2-border-button);
  border-radius: 4px;
  background: var(--wf2-surface-button);
  color: var(--wf2-text-button);
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}

.poi-editor-toolbar button:hover,
.gps-editor-toolbar button:hover,
#subtitles_wrapper .subtitle-tools button:hover {
  background: var(--wf2-surface-button-hover);
  border-color: var(--wf2-border-strong);
}

.poi-editor-toolbar button:focus-visible,
.gps-editor-toolbar button:focus-visible,
#subtitles_wrapper .subtitle-tools button:focus-visible {
  outline: 2px solid var(--wf2-focus-accent);
  outline-offset: 1px;
}

#waveform2_screenshot_button {
  white-space: nowrap;
}

.poi-editor-mode {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  height: 20px;
  padding: 0 7px;
  border-radius: 4px;
  background: var(--wf2-surface-mode-soft);
  color: var(--wf2-text-mode);
  border: 1px solid var(--wf2-border-mode);
  font-weight: 600;
  font-size: 10px;
  line-height: 1;
}

.video-category-remove,
.poi-category-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 10px;
  height: 10px;
  margin-left: 1px;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  font-size: 9px;
  opacity: 0.72;
}

.video-category-remove:hover,
.poi-category-remove:hover {
  opacity: 1;
}

.file-category-filter {
  margin-top: 2px;
  max-width: 420px;
}

#file_category_filter_select {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid var(--wf2-border-input);
  border-radius: 8px;
  background: var(--wf2-surface-card);
  color: var(--wf2-text-primary);
  cursor: pointer;
}

#file-category-filter-tags {
  margin-top: 4px;
}

.file-category-filter-remove {
  border: 0;
  background: none;
  cursor: pointer;
  line-height: 1;
  padding: 0;
}

#file_controls .file-category-filter-remove.video-category-remove {
  border: 0;
  background: none;
  box-shadow: none;
  appearance: none;
  -webkit-appearance: none;
}

.file-extra-filters {
  margin-top: 2px;
  display: flex;
  gap: 10px;
}

.streamer-filter {
  margin-top: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.streamer-filter label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

#filters {
  width: 100%;
  max-height: 100%;
  min-height: 220px;
  overflow: auto;
  padding: 0;
  background: var(--wf2-surface-panel-glass);
  border: 1px solid var(--wf2-border-panel-glass);
  border-radius: 0;
  box-shadow: var(--wf2-shadow-panel);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

#filters .video-list-wrap {
  width: 100%;
  min-height: 240px;
  max-height: 42vh;
  border-color: var(--wf2-border-input);
  box-shadow: var(--wf2-shadow-inset-soft);
}

#filters .video-date-range-filter {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  min-width: 0;
  padding: 2px 6px;
  flex-wrap: wrap;
}

#filters .video-date-range-filter__date {
  display: grid;
  flex: 1 1 112px;
  gap: 2px;
  min-width: 112px;
  color: var(--wf2-text-muted);
  font-size: 9px;
  font-weight: 600;
}

.wf2-compact-action-btn {
  min-height: 18px;
  height: 18px;
  padding: 0 7px;
  border: 1px solid var(--wf2-border-button);
  border-radius: 4px;
  background: var(--wf2-surface-button);
  color: var(--wf2-text-button);
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}

.wf2-compact-action-btn:hover {
  background: var(--wf2-surface-button-hover);
  border-color: var(--wf2-border-strong);
}

.wf2-compact-action-btn:focus-visible {
  outline: 2px solid var(--wf2-focus-accent);
  outline-offset: 1px;
}

#file_controls {
  margin: 0;
  padding: 0;
  border: 1px solid var(--wf2-border-panel);
  border-radius: 10px;
  background: var(--wf2-surface-file-controls);
  box-shadow: var(--wf2-shadow-inset-strong);
  position: static;
}

#file_controls .file-controls-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  align-items: start;
}

#file_controls .file-controls-separator {
  width: 100%;
  height: 1px;
  margin: 0;
  border: 0;
  background: var(--wf2-border-panel);
  opacity: 0.45;
}

#file_controls .file-controls-col {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 8px;
}

#file_controls .waveform2-unified-search {
  min-width: 0;
  display: grid;
  gap: 5px;
}

#file_controls .waveform2-unified-search__title {
  margin: 0;
  color: var(--wf2-text-primary);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
}

#file_controls .waveform2-unified-search__toolbar {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

#file_controls .waveform2-unified-search__toolbar .waveform2-content-search-types {
  flex: 0 0 auto;
}

#file_controls #waveform2_global_content_search_input,
#file_controls .waveform2-unified-search__toolbar > .wf2-input-clear {
  min-width: 120px;
  flex: 1 1 160px;
}

#file_controls .waveform2-unified-search__toolbar > .wf2-input-clear > input {
  box-sizing: border-box;
  width: 100%;
}

#file_controls .waveform2-unified-search__panel {
  min-width: 0;
  border: 1px solid var(--wf2-border-subtle);
  background: var(--wf2-surface-card);
}

#file_controls .waveform2-unified-search__panel:not([hidden]) {
  display: block;
}

#file_controls .waveform2-unified-search__panel.is-error {
  border-color: var(--wf2-text-danger);
}

#file_controls .waveform2-unified-search__summary {
  padding: 3px 5px;
  color: var(--wf2-text-muted);
  font-size: 10px;
}

#file_controls .waveform2-unified-search__panel.is-error .waveform2-unified-search__summary {
  color: var(--wf2-text-danger);
}

#file_controls .waveform2-unified-search__separator {
  width: 100%;
  height: 1px;
  margin: 1px 0;
  border: 0;
  background: var(--wf2-border-subtle);
  opacity: 0.55;
}

#file_controls .file-controls-block {
  min-width: 0;
  display: grid;
  gap: 6px;
}

#file_controls .file-controls-block-title {
  font-weight: 600;
  color: var(--wf2-text-primary);
  line-height: 1.1;
}

#file_controls .file-controls-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

#file_controls .file-controls-field {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 0 6px;
  background: var(--wf2-surface-card);
}

#file_controls .file-controls-field>span {
  white-space: nowrap;
  font-weight: 600;
  color: var(--wf2-text-primary);
}

#file_controls .file-controls-field--name {
  flex: 0 1 260px;
}

#file_controls .file-controls-field--name input {
  width: 100%;
  min-width: 0;
}

#file_controls .file-controls-action {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex: 1 1 360px;
}

#file_controls .file-controls-col .file-controls-action {
  width: 100%;
  flex: none;
}

#file_controls .file-controls-action-label {
  white-space: nowrap;
  font-weight: 600;
  color: var(--wf2-text-primary);
}

#file_controls .file-controls-action>input[type="text"] {
  width: 100%;
  min-width: 0;
}

#file_controls .file-controls-action>.wf2-input-clear {
  width: 100%;
  min-width: 0;
}

#file_controls .wf2-input-clear {
  flex: 1 1 auto;
  width: 100%;
}

#file_controls input[type="text"]:not(.wf2-compact-filter-input) {
  margin: 0;
  padding: 4px 6px;
  border: 1px solid var(--wf2-border-input);
  border-radius: 6px;
  background: var(--wf2-surface-card);
}

#file_controls button {
  padding: 4px 8px;
  border: 1px solid var(--wf2-border-button);
  border-radius: 6px;
  background: var(--wf2-surface-button);
  color: var(--wf2-text-button);
  cursor: pointer;
}

#file_controls .wf2-filter-toggle {
  min-height: 20px;
  height: 20px;
  padding: 0 7px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

#file_controls .wf2-filter-toggle:hover {
  background: var(--wf2-surface-button-hover);
  border-color: var(--wf2-border-strong);
}

#file_controls .wf2-filter-toggle:focus-visible {
  outline: 2px solid var(--wf2-focus-accent);
  outline-offset: 1px;
}

#file_controls .wf2-filter-toggle[aria-pressed="true"],
#file_controls .wf2-filter-toggle.is-active {
  background: var(--wf2-surface-button-active);
  color: var(--wf2-text-button-active);
  border-color: var(--wf2-border-button-active);
  box-shadow: inset 0 0 0 1px var(--wf2-focus-accent);
}

.waveform2-global-search-results {
  margin-top: 6px;
  border: 1px solid var(--wf2-border-subtle);
  border-radius: 6px;
  background: var(--wf2-surface-card);
  color: var(--wf2-text-primary);
  overflow: hidden;
}

.waveform2-global-search-results__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 7px;
  border-bottom: 1px solid var(--wf2-border-subtle);
  font-size: 12px;
}

.waveform2-global-search-results__header button {
  width: 24px;
  height: 24px;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-size: 17px;
}

.waveform2-global-search-results__summary {
  padding: 4px 7px;
  color: var(--wf2-text-muted);
  font-size: 10px;
}

.waveform2-global-search-results__list {
  display: grid;
  max-height: 250px;
  overflow: auto;
}

.waveform2-global-search-hit {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 7px;
  width: 100%;
  border: 0;
  border-top: 1px solid var(--wf2-border-subtle);
  padding: 5px 7px;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.waveform2-global-search-hit:hover {
  background: var(--wf2-surface-hover);
}

.waveform2-global-search-hit__time {
  color: var(--wf2-text-info);
  font-family: monospace;
  font-size: 10px;
}

.waveform2-global-search-hit__meta {
  overflow: hidden;
  color: var(--wf2-text-muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.waveform2-global-search-hit__text {
  grid-column: 1 / -1;
  line-height: 1.25;
  font-size: 11px;
}

.waveform2-global-search-hit mark {
  border-radius: 2px;
  background: var(--wf2-yellow-400);
  color: var(--wf2-neutral-950);
  padding: 0 1px;
}

.waveform2-global-search-results__more {
  width: 100%;
  border: 0;
  border-top: 1px solid var(--wf2-border-subtle);
  padding: 5px;
  background: var(--wf2-surface-button);
  color: var(--wf2-text-button);
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}

#existing_subtitles .is-global-search-hit {
  outline: 2px solid var(--wf2-focus-accent);
  outline-offset: 1px;
}

#file_controls .file-controls-row--meta {
  gap: 10px;
}

#file_controls .file-extra-filters,
#file_controls .streamer-filter,
#file_controls .triskel-path-filter {
  margin: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  flex: 0 0 auto;
}

#file_controls .triskel-path-filter[hidden] {
  display: none;
}

#file_controls .file-category-filter {
  margin: 0;
  max-width: none;
  flex: none;
  display: grid;
  grid-template-columns: 1fr;
  align-items: stretch;
  gap: 6px 8px;
}

#file_controls .file-category-filter>label {
  font-weight: 600;
  color: var(--wf2-text-primary);
}

#file_controls #file_category_filter_select {
  width: 100%;
}

#video-category-manager .wf2-input-clear,
#poi-category-manager .wf2-input-clear,
#file_controls .file-category-filter .wf2-input-clear {
  width: 100%;
}

#file_controls #file-category-filter-tags {
  grid-column: 1 / -1;
}

#file_controls .streamer-filter,
#file_controls .triskel-path-filter {
  overflow-x: visible;
  overflow-y: visible;
  padding-bottom: 2px;
}

#file_controls .streamer-filter .wf2-filter-toggle,
#file_controls .triskel-path-filter .wf2-filter-toggle {
  flex: 0 1 auto;
}

#file_controls .streamer-filter::-webkit-scrollbar {
  height: 6px;
}

#file_controls .streamer-filter::-webkit-scrollbar-thumb {
  background: var(--wf2-border-strong);
  border-radius: 999px;
}

#file_controls .file-controls-col--2 .streamer-filter {
  width: 100%;
}

.input_text_time {
  max-width: 90px;
}

.transcription-actions {
  margin-top: 8px;
  display: grid;
  gap: 6px;
  max-width: 95%;
}

#transcribe_video_btn {
  justify-self: start;
  padding: 4px 8px;
  border: 1px solid var(--wf2-border-button);
  border-radius: 6px;
  background: var(--wf2-surface-button);
  cursor: pointer;
}

#transcribe_video_btn[disabled] {
  opacity: 0.6;
  cursor: wait;
}

#transcribe_video_status {
  color: var(--wf2-text-primary);
  font-size: 11px;
}

#transcribe_video_status[data-state="error"] {
  color: var(--wf2-text-danger);
}

#transcribe_video_status[data-state="success"] {
  color: var(--wf2-text-success-strong);
}

#transcribe_video_status[data-state="running"] {
  color: var(--wf2-text-info);
}

#transcribe_video_log {
  margin: 0;
  padding: 6px;
  max-height: 160px;
  overflow: auto;
  border: 1px solid var(--wf2-border-panel);
  border-radius: 8px;
  background: var(--wf2-surface-soft);
  color: var(--wf2-text-strong);
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 10px;
  line-height: 1.25;
}

.archives-beta-modal {
  width: min(560px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid var(--wf2-border-accent-strong);
  border-radius: 8px;
  background: var(--wf2-surface-card);
  color: var(--wf2-text-primary);
  box-shadow: 0 18px 60px rgba(0, 0, 0, .55);
}

.archives-beta-modal::backdrop {
  background: rgba(0, 0, 0, .72);
  backdrop-filter: blur(2px);
}

.archives-beta-modal__content {
  display: grid;
  gap: 12px;
  padding: 24px;
}

.archives-beta-modal__eyebrow {
  justify-self: start;
  padding: 4px 7px;
  border: 1px solid var(--wf2-border-accent-strong);
  border-radius: 3px;
  color: var(--wf2-text-accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .1em;
}

.archives-beta-modal h2 {
  margin: 0;
  color: var(--wf2-text-primary);
  font-size: 20px;
}

.archives-beta-modal p {
  margin: 0;
  color: var(--wf2-text-secondary);
  font-size: 14px;
  line-height: 1.5;
}

.archives-beta-modal__button {
  justify-self: end;
  padding: 9px 14px;
  border: 1px solid var(--wf2-border-accent-strong);
  border-radius: 4px;
  background: var(--wf2-surface-button);
  color: var(--wf2-text-primary);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.archives-beta-modal__button:hover,
.archives-beta-modal__button:focus-visible {
  background: var(--wf2-surface-button-hover);
  outline: 2px solid var(--wf2-focus-accent);
  outline-offset: 2px;
}

@media (max-width: 1100px) {
  .waveform2-page {
    flex-direction: column;
  }

  .waveform2-main,
  .waveform2-filters-sidebar {
    width: 100%;
  }

  .waveform2-filters-sidebar {
    position: static;
    max-height: none;
  }

  .layout {
    flex-direction: column;
  }

  .left,
  .right {
    width: 100%;
    flex: 1 1 100%;
    padding-left: 0;
    padding-right: 0;
  }

  .layout-resizer {
    display: none;
  }

  #filters {
    max-height: none;
    padding: 8px;
  }

  #filters .video-list-wrap {
    max-height: 38vh;
  }
}

@media (max-width: 768px) {
  .waveform2-page--prod {
    gap: 8px;
  }

  .waveform2-page--prod .waveform2-main {
    order: 1;
    width: 100%;
    flex-basis: 100%;
  }

  .waveform2-page--prod .waveform2-filters-sidebar {
    display: none;
    order: 2;
    width: 100%;
    max-height: none;
    flex-basis: 100%;
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }

  .waveform2-page--prod[data-mobile-panel="videos"] .waveform2-filters-sidebar {
    display: block;
  }

  .waveform2-page--prod .poi-tabs {
    overflow-x: auto;
    scrollbar-width: thin;
  }

  .waveform2-page--prod .poi-tabs .poi-tab {
    flex: 0 0 auto;
  }

  .waveform2-page--prod .waveform2-mobile-prod-tab {
    display: block;
  }

  .waveform2-page--prod .poi-tabs-action,
  .waveform2-page--prod .poi-tab[data-target="gmap"],
  .waveform2-page--prod .poi-tab[data-target="screenshots"] {
    display: none !important;
  }

  .waveform2-page--prod #pois_container .poi-tab-panel,
  .waveform2-page--prod #pois_container #subtitles_wrapper {
    display: none;
  }

  .waveform2-page--prod[data-mobile-panel="pois"] #pois_container .poi-tab-panel[data-panel="pois"].is-active,
  .waveform2-page--prod[data-mobile-panel="search"] #pois_container .poi-tab-panel[data-panel="search"].is-active,
  .waveform2-page--prod[data-mobile-panel="text"] #pois_container #subtitles_wrapper {
    display: block;
  }

  .waveform2-page--prod[data-mobile-panel="poi-empty"] .right,
  .waveform2-page--prod[data-mobile-panel="videos"] .right {
    gap: 0;
  }
}
