﻿/* ================================================================
   QuickBar Pro — Caption Tab
   Auto Caption, Style & Editor, SRT Editor, SRT Importer
   ================================================================ */

:root {
  --bg-primary: #111214;
  --bg-secondary: #121315;
  --bg-card: #15161a;
  --bg-elevated: #15161a;
  --bg-hover: #1c1d22;
  --bg-input: #15161a;
  --border: #222228;
  --border-strong: #2a2a32;
  --text-primary: #e6e6ea;
  --text-muted: #9a9aa6;
  --text-dim: #71717a;
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --transition-fast: 0.15s ease;
}

/* Force dark backgrounds on native inputs and select options to prevent white glare */
select option,
datalist option {
  background-color: #1b1b20 !important;
  color: #e6e6ea !important;
}

input, select, textarea {
  color-scheme: dark;
}

/* ── CAPTION SUB-TABS ──────────────────────────────────────────── */
.caption-sub-tabs {
  display: flex;
  gap: 2px;
  background: var(--bg-input, #131316);
  border-radius: var(--radius-sm, 6px);
  padding: 2px;
  border: 1px solid var(--border, #26262f);
  flex-shrink: 0;
}

.caption-sub-tab {
  flex: 1;
  padding: 5px 8px;
  font-size: 8px;
  font-weight: 700;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: var(--radius-xs);
  transition: all var(--transition-fast);
  white-space: nowrap;
}
.caption-sub-tab:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}
.caption-sub-tab.active {
  background: var(--accent, var(--purple-bg, #1473e6)) !important;
  color: #ffffff !important;
  font-weight: 800;
}

/* ── CAPTION CARDS ─────────────────────────────────────────────── */
.caption-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px;
  margin-bottom: 6px;
}

.caption-word {
  display: inline-block;
  padding: 2px 6px;
  margin: 2px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  font-size: 10px;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.caption-word:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.caption-word.selected {
  background: var(--accent-glow);
  border-color: var(--accent);
  color: var(--accent);
}

/* ── SRT EDITOR ────────────────────────────────────────────────── */
.srt-line {
  display: flex;
  gap: 8px;
  padding: 6px 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 4px;
  align-items: flex-start;
}
.srt-line:hover {
  border-color: var(--border-strong);
}

.srt-time {
  font-size: 8px;
  font-family: var(--mono);
  color: var(--text-dim);
  min-width: 80px;
  flex-shrink: 0;
}

.srt-text {
  flex: 1;
  font-size: 9px;
  color: var(--text-primary);
  background: none;
  border: none;
  outline: none;
  resize: none;
  font-family: var(--font);
}

/* ── STYLE EDITOR ──────────────────────────────────────────────── */
.style-editor-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.style-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.style-label {
  font-size: 8px;
  font-weight: 700;
  color: var(--text-muted);
  min-width: 60px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.style-input {
  flex: 1;
  height: 24px;
  padding: 0 8px;
  background: var(--bg-;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  color: var(--text-primary);
  font-size: 9px;
  outline: none;
}
.style-input:focus {
  border-color: var(--accent);
}

.style-select {
  height: 24px;
  background: var(--bg-;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  color: var(--text-primary);
  font-size: 9px;
  padding: 0 5px;
  outline: none;
}


/* ==========================================================================
   GLOBAL CUSTOM SCROLLBARS (Modern Dark UI Blended for Windows CEP)
   Applies to all scrollable tabs, containers, modals, textareas & elements
   ========================================================================== */

/* Standard W3C Scrollbar (Firefox / Modern CEP) */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}

/* WebKit Scrollbar Track & Thumb (Chromium / Windows CEP / Edge / Safari) */
::-webkit-scrollbar,
*::-webkit-scrollbar {
  width: 4px !important;
  height: 4px !important;
}

::-webkit-scrollbar-track,
*::-webkit-scrollbar-track {
  background: transparent !important;
  border-radius: 4px !important;
}

::-webkit-scrollbar-thumb,
*::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.16) !important;
  border-radius: 4px !important;
  transition: background 0.15s ease !important;
}

::-webkit-scrollbar-thumb:hover,
*::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.35) !important;
}

::-webkit-scrollbar-thumb:active,
*::-webkit-scrollbar-thumb:active {
  background: var(--accent, #c8ff2e) !important;
}

::-webkit-scrollbar-corner,
*::-webkit-scrollbar-corner {
  background: transparent !important;
}

/* Remove default white arrow buttons on Windows Chromium CEP */
::-webkit-scrollbar-button,
*::-webkit-scrollbar-button {
  width: 0 !important;
  height: 0 !important;
  display: none !important;
}
