/* ==================== Offline ASR Module ==================== */

.oasr-layout { display: flex; gap: 20px; flex: 1; overflow: hidden; }
.oasr-sidebar { width: 340px; flex-shrink: 0; display: flex; flex-direction: column; }
.oasr-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.oasr-empty, .oasr-processing { flex: 1; display: flex; align-items: center; justify-content: center; }
.oasr-result { flex: 1; display: flex; flex-direction: column; overflow: hidden; }

/* Mode tabs */
.oasr-mode-tabs { display: flex; gap: 0; border: 1px solid var(--border-color); border-radius: 8px; overflow: hidden; margin-bottom: 12px; }
.oasr-mode-tab { flex: 1; padding: 6px 12px; border: none; background: transparent; cursor: pointer; font-size: 12px; font-weight: 500; color: var(--text-secondary); transition: all 0.2s; }
.oasr-mode-tab:hover { background: var(--hover-bg); }
.oasr-mode-tab.active { background: var(--primary-light); color: var(--primary-color); }

/* URL input */
.oasr-url-input { width: 100%; padding: 10px 12px; border: 1px solid var(--border-color); border-radius: 6px; font-size: 13px; font-family: inherit; background: var(--bg-color); color: var(--text-primary); outline: none; transition: border-color 0.2s; }
.oasr-url-input:focus { border-color: var(--primary-color); box-shadow: 0 0 0 2px rgba(0, 82, 217, 0.1); }

/* File info */
.oasr-file-info { margin-top: 12px; }
.oasr-language-card { margin-top: 12px; }
.oasr-language-chips { margin-top: 8px; }
.oasr-language-chips .model-chip { min-width: 64px; }
.oasr-output-options-card { margin-top: 12px; }
.oasr-toggle-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.oasr-toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.oasr-toggle-copy { flex: 1; min-width: 0; }
.oasr-toggle-hint { margin-top: 4px; font-size: 12px; line-height: 1.5; color: var(--text-tertiary); }
.oasr-speaker-toggle input, .oasr-dual-channel-toggle input, .oasr-speaker-role-toggle input { width: 36px; height: 20px; position: absolute; inset: 0; margin: 0; cursor: pointer; }
.oasr-speaker-toggle .toggle-slider, .oasr-dual-channel-toggle .toggle-slider, .oasr-speaker-role-toggle .toggle-slider { pointer-events: none; }
.oasr-speaker-role-toggle-row { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--border-color); }
.oasr-role-section { margin-top: 10px; }

@media (max-width: 768px) { .oasr-toggle-grid { grid-template-columns: 1fr; } }

/* Stats bar */
.oasr-stats-bar { display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: var(--text-secondary); }

/* Timeline */
.oasr-timeline-panel { display: flex; flex-direction: column; overflow: hidden; }
.oasr-timeline { flex: 1; overflow-y: auto; max-height: calc(100vh - 360px); }

.oasr-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  transition: background 0.15s;
  font-size: 14px;
  line-height: 1.7;
}
.oasr-row:last-child { border-bottom: none; }
.oasr-row:hover { background: var(--hover-bg); }

.oasr-row.oasr-active {
  background: var(--primary-light);
  border-left: 3px solid var(--primary-color);
  padding-left: 11px;
}
.oasr-row.oasr-past .oasr-text { color: var(--text-tertiary); }

.oasr-time {
  flex: 0 0 auto;
  font-family: 'Cascadia Code', 'Consolas', monospace;
  font-size: 11px;
  color: var(--text-tertiary);
  white-space: nowrap;
  padding-top: 3px;
  min-width: 44px;
}

.oasr-text { flex: 1; color: var(--text-primary); word-break: break-all; }
.oasr-speaker-tag {
  display: inline-flex;
  align-items: center;
  margin-right: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--primary-light);
  color: var(--primary-color);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  vertical-align: middle;
}

/* Word-level highlighting */
.oasr-word { transition: color 0.15s, font-weight 0.15s; }
.oasr-word.oasr-word-played { color: var(--primary-color); }
.oasr-word.oasr-word-current {
  color: var(--primary-color);
  font-weight: 700;
  background: rgba(0, 82, 217, 0.08);
  border-radius: 3px;
  padding: 0 1px;
}

/* Spinner */
.oasr-spinner { width: 32px; height: 32px; border: 3px solid var(--border-color); border-top-color: var(--primary-color); border-radius: 50%; animation: spin 0.8s linear infinite; margin-bottom: 12px; }

/* Mobile */
@media (max-width: 768px) { .oasr-layout { flex-direction: column; } .oasr-sidebar { width: 100%; } }
