@import '../vendor/radix/red.css';
@import '../vendor/radix/orange.css';
@import '../vendor/radix/red-dark.css';
@import '../vendor/radix/orange-dark.css';
@import '../vendor/radix/amber.css';
@import '../vendor/radix/amber-dark.css';
@import '../vendor/radix/green.css';
@import '../vendor/radix/green-dark.css';
@import '../vendor/radix/cyan.css';
@import '../vendor/radix/cyan-dark.css';
@import '../vendor/radix/blue.css';
@import '../vendor/radix/blue-dark.css';
@import '../vendor/radix/gray.css';
@import '../vendor/radix/gray-dark.css';
@import '../vendor/radix/black-alpha.css';
@import '../vendor/radix/white-alpha.css';

@font-face {
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../vendor/fonts/open-sans-latin-400-normal.woff2') format('woff2');
}

@font-face {
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../vendor/fonts/open-sans-latin-600-normal.woff2') format('woff2');
}

@font-face {
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../vendor/fonts/open-sans-latin-700-normal.woff2') format('woff2');
}

html {
  font-family: 'Open Sans', 'Noto Sans SemiCondensed', 'Noto Sans', sans-serif;
  font-size: 16px;
  overflow: hidden;
}

body {
  margin: 0;
  overflow: hidden;
  color: white;
  background: black;
}

#app-root {
  color: var(--gray-12);
  background: var(--gray-1);
  color-scheme: only dark;
  display: flex;
  flex-direction: column;
  height: 100vh;
  transition: background .5s;
}

#app-root.light-theme {
  color-scheme: only light;
}

#app-root :not(input):not(textarea),
#app-root :not(input):not(textarea)::after,
#app-root :not(input):not(textarea)::before {
  -webkit-user-select: none;
  user-select: none;
}

#main-row {
  flex-grow: 1;
  display: flex;
  overflow-y: hidden;
}

#video-area {
  position: relative;
  flex-grow: 1;
  overflow: hidden;
}

#video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

#bottom-area {
  background: var(--gray-4);
  transition: background .5s;
  flex-shrink: 0;
}

.side-bar {
  flex-shrink: 0;
  overflow-y: auto;
  background: var(--gray-2);
}

.side-bar.hidden {
  display: none;
}

#batch-bar {
  width: 240px;
  resize: horizontal;
  overflow-x: hidden;
}

#segment-bar {
  width: 220px;
}

#dialogs {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1000;
}

#dialogs > * {
  pointer-events: auto;
}

kbd {
  white-space: nowrap;
  display: inline-block;
  padding: 3px 5px;
  font-size: 11px;
  line-height: 10px;
  color: var(--gray-11);
  vertical-align: middle;
  background-color: var(--gray-4);
  border: solid 1px var(--gray-8);
  border-bottom-color: var(--gray-8);
  border-radius: 3px;
  box-shadow: inset 0 -1px 0 var(--gray-8);
}

code.highlighted {
  background-color: var(--gray-7);
  border-radius: .2em;
}

.hide-scrollbar::-webkit-scrollbar {
  display: none;
}

.consistent-scrollbar::-webkit-scrollbar {
  width: .5em;
}

.consistent-scrollbar::-webkit-scrollbar-track-piece {
  background: transparent;
}

.consistent-scrollbar::-webkit-scrollbar-thumb {
  background: var(--gray-11);
  border-radius: .1em;
}

.button-unstyled {
  all: unset;
  cursor: pointer;
}

.button-unstyled:focus {
  outline: revert;
}

.link-button {
  all: unset;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: .15em;
  text-decoration-thickness: .05em;
}

.link-button:focus {
  outline: revert;
}

input:focus-visible, select:focus-visible {
  outline: 0.1em solid var(--gray-11);
  outline-offset: 0;
}

@keyframes pulse {
  0% { transform: scaleY(1) }
  40% { transform: scaleY(1) }
  50% { transform: scaleY(1.2) }
  60% { transform: scaleY(1) }
  100% { transform: scaleY(1) }
}

@keyframes bounce {
  0% { transform: translateY(0) scaleY(1) }
  47% { transform: translateY(0) scaleY(1) }
  50% { transform: translateY(-.1em) scaleY(1.1) }
  53% { transform: translateY(0) scaleY(1) }
  100% { transform: translateY(0) scaleY(1) }
}

@keyframes spin {
  0% { transform: rotate(0) }
  100% { transform: rotate(360deg); }
}

.export-animation {
  animation: bounce 5s linear infinite;
}

.spinner-animation {
  animation: spin 0.8s linear infinite;
}

.loading-animation {
  animation: pulse 1s linear infinite;
}

.no-animations * {
  transition: none !important;
  animation: none !important;
}

.dialog-overlay {
  position: fixed;
  inset: 0;
  background: var(--black-a8);
  z-index: 1001;
}

.dialog-content {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--gray-1);
  border: 1px solid var(--gray-7);
  border-radius: 8px;
  padding: 20px 24px;
  z-index: 1002;
  color: var(--gray-12);
  max-height: 90vh;
  overflow-y: auto;
}

.dialog-title {
  font-size: 17px;
  font-weight: 600;
  margin: 0 0 8px;
}

.dialog-desc {
  color: var(--gray-11);
  font-size: 14px;
  margin: 0 0 12px;
}

.dialog-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  color: var(--gray-11);
  font-size: 18px;
  cursor: pointer;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4em;
  padding: .3em .7em;
  border-radius: 4px;
  border: 1px solid var(--gray-7);
  background: var(--gray-3);
  color: var(--gray-12);
  cursor: pointer;
  font-size: 14px;
}

.button:hover {
  background: var(--gray-4);
}

.button.primary {
  background: var(--cyan-9);
  border-color: var(--cyan-9);
  color: white;
}

.button.danger {
  color: var(--red-11);
}

.button:disabled {
  opacity: .5;
  cursor: default;
}

.text-input {
  padding: .3em .5em;
  border-radius: 4px;
  border: 1px solid var(--gray-7);
  background: var(--gray-3);
  color: var(--gray-12);
  font-size: 14px;
}

.text-input:focus-visible {
  outline: 0.1em solid var(--gray-11);
}

.menu-bar {
  display: flex;
  background: var(--gray-2);
  border-bottom: 1px solid var(--gray-6);
  padding: 0 .3em;
  min-height: 2em;
  align-items: center;
}

.menu-root {
  position: relative;
}

.menu-trigger {
  background: none;
  border: none;
  color: var(--gray-12);
  padding: .3em .7em;
  cursor: pointer;
  font-size: 13px;
  border-radius: 3px;
}

.menu-trigger:hover, .menu-trigger.open {
  background: var(--gray-4);
}

.menu-panel {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 14em;
  background: var(--gray-1);
  border: 1px solid var(--gray-6);
  border-radius: 4px;
  padding: .2em;
  z-index: 2000;
  box-shadow: 0 4px 12px var(--black-a4);
}

.menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2em;
  padding: .25em .6em;
  border-radius: 3px;
  cursor: pointer;
  font-size: 13px;
  color: var(--gray-12);
  background: none;
  border: none;
  width: 100%;
  text-align: left;
}

.menu-item:hover:not(:disabled) {
  background: var(--gray-4);
}

.menu-item:disabled {
  opacity: .4;
  cursor: default;
}

.menu-sep {
  height: 1px;
  background: var(--gray-6);
  margin: .2em .4em;
}

.menu-shortcut {
  color: var(--gray-10);
  font-size: 12px;
}

.switch {
  position: relative;
  display: inline-block;
  width: 30px;
  height: 18px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch .track {
  position: absolute;
  inset: 0;
  background: var(--gray-6);
  border-radius: 9px;
  transition: background .2s;
  cursor: pointer;
}

.switch .thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  background: white;
  border-radius: 50%;
  transition: transform .2s;
}

.switch input:checked + .track {
  background: var(--cyan-9);
}

.switch input:checked + .track .thumb {
  transform: translateX(12px);
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: .5em;
  cursor: pointer;
  font-size: 14px;
}

.working-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--black-a7);
  display: flex;
  align-items: center;
  justify-content: center;
}

.working-box {
  background: var(--gray-1);
  border: 1px solid var(--gray-7);
  border-radius: 8px;
  padding: 2em 3em;
  text-align: center;
  color: var(--gray-12);
  min-width: 20em;
}

.working-box .spinner {
  font-size: 2.5em;
  display: inline-block;
}

.progress-track {
  height: 8px;
  background: var(--gray-6);
  border-radius: 4px;
  overflow: hidden;
  margin: 1em 0;
}

.progress-fill {
  height: 100%;
  background: var(--cyan-9);
  border-radius: 4px;
  transition: width .1s;
}

.toast-container {
  position: fixed;
  top: 3em;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9998;
  display: flex;
  flex-direction: column;
  gap: .5em;
  align-items: center;
  pointer-events: none;
}

.toast {
  background: var(--gray-2);
  border: 1px solid var(--gray-6);
  color: var(--gray-12);
  border-radius: 6px;
  padding: .6em 1em;
  font-size: 13px;
  box-shadow: 0 4px 12px var(--black-a4);
  pointer-events: auto;
}

.toast.success {
  border-color: var(--green-8);
}

.toast.error {
  border-color: var(--red-8);
}

.toast.warning {
  border-color: var(--amber-8);
}