/* Action100M Visualizer v1 — layout, timeline, transcript, modal. Per docs/plan.md §19.9 */

:root {
  --bg: #1a1b1e;
  --surface: #25262b;
  --border: #373a40;
  --text: #e8e8e8;
  --text-muted: #909296;
  --accent: #4dabf7;
  --accent-hover: #74c0fc;
  --active-bg: #2c5282;
  --active-border: #4dabf7;
  --danger: #e03131;
  --radius: 6px;
  --font-sans: 'DM Sans', system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  height: 100%;
  overflow: hidden;
}

body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  display: flex;
  flex-direction: column;
}

/* ——— Top bar ——— */
.top-bar {
  flex-shrink: 0;
  padding: 0.6rem 1rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.top-bar-left {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  flex: 1;
  min-width: 0;
}

.top-bar-right {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.search-modal-content {
  width: 100%;
  max-width: 720px;
}

.search-modal-body {
  max-height: 70vh;
}

.search-input-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.search-input {
  flex: 1 1 0;
  min-width: 0;
  padding: 0.4rem 0.6rem;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
}

.search-input::placeholder {
  color: var(--text-muted);
}

.search-flag {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 12px;
  color: var(--text-muted);
}

.search-status {
  min-height: 1.1em;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.search-results {
  max-height: 52vh;
  overflow-y: auto;
  border-top: 1px solid var(--border);
}

.search-empty {
  padding: 0.75rem 0;
  font-size: 13px;
  color: var(--text-muted);
}

.search-result {
  width: 100%;
  text-align: left;
  padding: 0.55rem 0;
  border: none;
  background: transparent;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  color: var(--text);
}

.search-result:last-child {
  border-bottom: none;
}

.search-result:hover {
  background: rgba(255, 255, 255, 0.04);
}

.search-result-title {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 0.15rem;
}

.search-result-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 0.15rem;
}

.search-result-fields {
  font-size: 12px;
  color: var(--text);
}

.search-result-field {
  margin-bottom: 0.15rem;
}

.search-result-field:last-child {
  margin-bottom: 0;
}

.search-result-field-label {
  font-weight: 600;
}

.search-result-field-value {
  white-space: pre-wrap;
  word-break: break-word;
}

.search-highlight {
  background: rgba(77, 171, 247, 0.2);
  color: var(--accent-hover);
}

.top-bar-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.6rem;
  color: var(--text-muted);
  border-radius: var(--radius);
  border: none;
  background: transparent;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.top-bar-icon-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--accent);
}

.top-bar-icon-btn .top-bar-icon {
  width: 1.25rem;
  height: 1.25rem;
}

a.top-bar-icon-btn {
  text-decoration: none;
}

.top-bar-app-name {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
  margin-right: 0.25rem;
}

.top-bar-sep {
  color: var(--text-muted);
  margin: 0 0.25rem;
}

.file-btn span,
.file-btn input {
  cursor: pointer;
}

.file-btn {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius);
  border: none;
  font-size: 13px;
}

.file-btn:hover {
  background: var(--accent-hover);
}

.annotation-label select {
  padding: 0.35rem 0.5rem;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  min-width: 180px;
}

.video-label {
  color: var(--text-muted);
  font-size: 13px;
}

.text-btn {
  padding: 0.35rem 0.5rem;
  font-size: 13px;
  background: transparent;
  color: var(--accent);
  border: none;
  cursor: pointer;
  border-radius: var(--radius);
}

.text-btn:hover {
  background: rgba(77, 171, 247, 0.15);
}

.text-btn[hidden] {
  display: none;
}

/* ——— Main ——— */
.main {
  width: 100%;
  max-width: 100%;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.section-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
  color: var(--text);
}

/* ——— Top row: video (50%) | nodes (50%), top half of page ——— */
.top-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  flex: 0 0 50%;
  min-height: 200px;
  align-items: stretch;
  min-width: 0;
}

.video-section {
  flex: 1 1 0;
  min-width: 0;
  max-width: 50%;
  display: flex;
  flex-direction: column;
}

.video-wrapper {
  position: relative;
  flex: 1;
  min-height: 0;
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 0.25rem;
}

.video-wrapper video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.transcript-current-line {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 0.35rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 1.4em;
  flex-shrink: 0;
}

.transcript-current-line:empty::before {
  content: '\00a0';
}

/* ——— Nodes panel (right of video, same height as video section) ——— */
.nodes-panel-section {
  flex: 1 1 0;
  min-width: 0;
  max-width: 50%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.nodes-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.25rem;
  flex-shrink: 0;
  min-width: 0;
}

.nodes-panel-header .section-title {
  margin: 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.section-controls {
  font-size: 12px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.section-controls select {
  padding: 0.25rem 0.5rem;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 12px;
  margin-left: 0.25rem;
  min-width: 140px;
}

.nodes-panel {
  flex: 1 1 0;
  min-height: 0;
  min-width: 0;
  width: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .top-row {
    flex-direction: column;
  }
  .video-section,
  .nodes-panel-section {
    flex: 1 1 auto;
    max-width: 100%;
  }
}

/* ——— Timeline (bottom half, scrollable) ——— */
.timeline-section {
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  margin-bottom: 0;
  overflow: hidden;
}

.timeline-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-shrink: 0;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.timeline-header .section-title {
  margin: 0;
}

.timeline-header-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}

.timeline-header .timeline-controls {
  margin: 0;
  flex-shrink: 0;
}

.timeline-controls {
  margin-bottom: 0;
}

.timeline-controls label {
  font-size: 13px;
  color: var(--text-muted);
}

.timeline-controls select {
  padding: 0.25rem 0.5rem;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  margin-left: 0.25rem;
}

.timeline-controls input[type="number"] {
  min-width: 4.5em;
  width: 5.5em;
  padding: 0.25rem 0.5rem;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  margin-left: 0.25rem;
  box-sizing: border-box;
  -moz-appearance: textfield;
}

.timeline-controls input[type="number"]::-webkit-outer-spin-button,
.timeline-controls input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.timeline-wrapper {
  position: relative;
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.timeline-container {
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  flex-direction: row;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.5rem;
}

.timeline-labels {
  flex: 0 0 70px;
  display: flex;
  flex-direction: column;
  padding-right: 0.5rem;
  overflow: hidden;
}

.timeline-tracks-scroll {
  flex: 1 1 0;
  min-width: 0;
  overflow-x: auto;
  overflow-y: auto;
}

.timeline-tracks-inner {
  position: relative;
  min-height: min-content;
}

.timeline-ruler-row {
  display: flex;
  align-items: center;
  margin-bottom: 0.35rem;
  min-height: 28px;
}

.timeline-ruler {
  position: relative;
  height: 24px;
  flex: 0 0 auto;
  min-width: 0;
  border-bottom: 1px solid var(--border);
  cursor: default;
  font-size: 12px;
  color: var(--text-muted);
}

.timeline-ruler--clickable {
  cursor: pointer;
}

.timeline-ruler--clickable:focus {
  outline: 1px solid var(--accent);
  outline-offset: 2px;
}

.timeline-ruler-tick {
  position: absolute;
  top: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-bottom: 2px;
  transform: translateX(-50%);
}

.timeline-ruler-time {
  white-space: nowrap;
}

.timeline-playhead {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--accent);
  pointer-events: none;
  z-index: 1;
}

.timeline-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  color: var(--text-muted);
  font-size: 13px;
  pointer-events: none;
}

.timeline-empty[hidden] {
  display: none;
}

.timeline-row {
  display: flex;
  align-items: center;
  margin-bottom: 0.35rem;
  min-height: 28px;
}

.timeline-row-label {
  font-size: 13px;
  color: var(--text-muted);
  min-height: 28px;
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
}

.timeline-labels .timeline-row-label:last-child {
  margin-bottom: 0;
}

.timeline-track {
  position: relative;
  height: 24px;
  flex: 0 0 auto;
  min-width: 0;
}

.timeline-segment {
  position: absolute;
  top: 0;
  height: 22px;
  padding: 0 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text);
  overflow: hidden;
  transition: background 0.1s, border-color 0.1s;
}

.timeline-segment:hover {
  background: #4c4f56;
  border-color: var(--text-muted);
}

.timeline-segment--active {
  background: var(--active-bg);
  border-color: var(--active-border);
}

.timeline-segment--no-gpt {
  background: var(--surface);
  border-color: var(--text-muted);
  color: var(--text-muted);
}

.timeline-segment--no-gpt:hover {
  background: #3d3e42;
  border-color: var(--text-muted);
}

.timeline-segment--no-gpt.timeline-segment--active {
  background: #3d4a52;
  border-color: var(--text-muted);
  color: var(--text-muted);
}

.timeline-segment-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

.timeline-segment-details {
  flex-shrink: 0;
  margin-left: 4px;
  padding: 0 4px;
  font-size: 13px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 2px;
}

.timeline-segment-details:hover {
  color: var(--accent);
  background: rgba(255, 255, 255, 0.08);
}

.timeline-overlap-warning {
  margin-top: 0.5rem;
  padding: 0.4rem 0.75rem;
  font-size: 13px;
  background: rgba(224, 49, 49, 0.15);
  color: var(--danger);
  border-radius: var(--radius);
}

.nodes-time {
  font-weight: normal;
  color: var(--text-muted);
}

.nodes-empty {
  color: var(--text-muted);
  font-size: 13px;
}

.nodes-panel-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}

.nodes-block {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  min-width: 0;
  overflow-wrap: break-word;
}

.nodes-block:last-child {
  border-bottom: none;
}

.nodes-block--no-gpt {
  opacity: 0.85;
  border-left: 3px solid var(--text-muted);
  padding-left: 0.5rem;
  margin-left: -0.5rem;
}

.nodes-block--no-gpt .nodes-detail-text {
  color: var(--text-muted);
}

.nodes-time-range {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.nodes-block--no-gpt .nodes-time-range {
  color: var(--accent);
  opacity: 0.9;
}

.nodes-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  min-width: 0;
}

.nodes-meta-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  min-width: 0;
}

.nodes-meta-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.nodes-meta {
  font-size: 11px;
  color: var(--text-muted);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nodes-meta-row .nodes-meta {
  margin: 0;
}

.nodes-detail-text {
  font-size: 13px;
  margin-top: 0.25rem;
  white-space: pre-wrap;
  word-break: break-word;
}

.nodes-details-btn {
  padding: 0.25rem 0.5rem;
  font-size: 11px;
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
}

.nodes-details-btn:hover {
  background: rgba(77, 171, 247, 0.15);
}

/* ——— Modal body (metadata / transcript popups) ——— */
.modal-body {
  padding: 1rem;
  overflow-y: auto;
  max-height: 60vh;
  font-size: 13px;
  color: var(--text);
}

.modal-body .metadata-title {
  font-weight: 600;
  margin: 0 0 0.5rem 0;
}

/* ——— Path modal: chain of nodes with room for long text ——— */
.path-modal-body {
  max-height: 70vh;
  overflow-y: auto;
}

.path-modal-step {
  padding: 0.6rem 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
  white-space: pre-wrap;
  border-bottom: 1px solid var(--border);
}

.path-modal-step-label {
  margin-bottom: 0.25rem;
}

.path-modal-step-meta {
  font-size: 11px;
  color: var(--text-muted);
}

.path-modal-step:last-of-type {
  border-bottom: none;
}

.path-modal-arrow {
  font-size: 14px;
  color: var(--accent);
  text-align: center;
  padding: 0.2rem 0;
}

.modal-body .metadata-description {
  margin: 0;
  color: var(--text-muted);
  white-space: pre-wrap;
}

/* ——— About modal ——— */
.about-modal-body {
  max-height: 70vh;
}

.about-modal-body .about-intro {
  margin: 0 0 0.5rem 0;
}

.about-modal-body .about-name {
  margin: 0 0 1rem 0;
  font-size: 13px;
  color: var(--text-muted);
}

.about-modal-body .about-heading {
  font-size: 0.9rem;
  font-weight: 600;
  margin: 1rem 0 0.5rem 0;
  color: var(--text);
}

.about-modal-body .about-list {
  margin: 0 0 0.5rem 0;
  padding-left: 1.25rem;
}

.about-modal-body .about-list li {
  margin-bottom: 0.5rem;
}

.about-modal-body .about-note {
  margin: 0.5rem 0 0 0;
  font-size: 12px;
  color: var(--text-muted);
}

.about-modal-body .about-footer {
  margin: 1.25rem 0 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 12px;
}

.about-modal-body a {
  color: var(--accent);
  text-decoration: none;
}

.about-modal-body a:hover {
  text-decoration: underline;
}

.about-modal-body code {
  font-size: 12px;
  background: var(--surface);
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
}

.transcript-plain {
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 13px;
  color: var(--text-muted);
}

/* ——— Modal ——— */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal[hidden] {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
}

.modal-content {
  position: relative;
  max-width: 90vw;
  max-height: 85vh;
  width: 560px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
}

.modal-header h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.modal-close {
  padding: 0.25rem 0.5rem;
  font-size: 1.25rem;
  line-height: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: var(--radius);
}

.modal-close:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.modal-json {
  flex: 1;
  overflow: auto;
  margin: 0;
  padding: 1rem;
  font-size: 12px;
  font-family: ui-monospace, monospace;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text);
}

.modal-actions {
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border);
}

.btn-copy {
  padding: 0.4rem 0.75rem;
  font-size: 13px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
}

.btn-copy:hover {
  background: var(--accent-hover);
}

/* ——— Source modal (list-browse v2) ——— */
.source-modal-content {
  width: 100%;
  max-width: 560px;
}

.source-modal-body {
  padding: 1rem 1.25rem;
}

.source-modal-intro {
  margin: 0 0 1rem 0;
  color: var(--text-muted);
  font-size: 13px;
}

.source-option-block {
  margin: 0 0 1.25rem 0;
  padding: 1rem 0;
  border: none;
  border-bottom: 1px solid var(--border);
}

.source-option-block:last-of-type {
  border-bottom: none;
}

.source-option-legend {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 0.35rem 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.source-option-legend input[type="radio"] {
  margin: 0;
}

.source-option-desc {
  margin: 0 0 0.75rem 0;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.45;
}

.source-option-inputs {
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.source-filename {
  font-size: 13px;
  color: var(--text-muted);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.source-file-label {
  flex-shrink: 0;
}

.source-folders-summary {
  margin: 0 0 0.5rem 0;
  font-size: 13px;
  color: var(--text-muted);
}

.source-option-block button.file-btn {
  margin-top: 0.25rem;
}

.source-option-block button.file-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ——— Hamburger (video list) ——— */
.icon-btn {
  padding: 0.35rem 0.6rem;
  font-size: 1.25rem;
  line-height: 1;
  background: transparent;
  color: var(--text);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--accent);
}

.hamburger-btn {
  margin-right: 0.25rem;
}

/* ——— List drawer (slide-out panel) ——— */
.list-drawer {
  position: fixed;
  inset: 0;
  z-index: 900;
  pointer-events: none;
  visibility: hidden;
}

.list-drawer.list-drawer--open {
  pointer-events: auto;
  visibility: visible;
}

.list-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.list-drawer--open .list-drawer-backdrop {
  opacity: 1;
}

.list-drawer-panel {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 100%;
  max-width: 380px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform 0.25s ease;
  overflow: hidden;
}

.list-drawer--open .list-drawer-panel {
  transform: translateX(0);
}

.list-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.list-drawer-header .section-title {
  margin: 0;
  font-size: 1rem;
}

.list-drawer-close {
  flex-shrink: 0;
}

.list-drawer-panel .list-empty {
  padding: 1rem;
}

.list-drawer-panel .list-virtual-container {
  flex: 1 1 0;
  min-height: 0;
  border: none;
  border-radius: 0;
}

/* ——— List content (shared) ——— */
.list-empty {
  padding: 1.5rem;
  color: var(--text-muted);
  font-size: 14px;
  text-align: center;
}

.list-virtual-container {
  overflow-y: auto;
  overflow-x: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  position: relative;
}

.list-header {
  display: flex;
  align-items: center;
  padding: 0 1rem;
  height: 40px;
  background: var(--border);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  position: sticky;
  top: 0;
  z-index: 1;
  flex-shrink: 0;
}

.list-virtual-inner {
  position: relative;
  width: 100%;
  min-height: 0;
}

.list-row {
  position: absolute;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  padding: 0 1rem;
  box-sizing: border-box;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  font-size: 13px;
  color: var(--text);
  background: var(--surface);
  transition: background 0.1s;
}

.list-row:hover {
  background: #2c2e33;
}

.list-col-index {
  flex: 0 0 4rem;
  width: 4rem;
  min-width: 4rem;
}

.list-col-stem {
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.list-col-action {
  flex: 0 0 auto;
}

.list-open-btn {
  padding: 0.35rem 0.75rem;
  font-size: 12px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
}

.list-open-btn:hover {
  background: var(--accent-hover);
}
