/* Teleprompter Editor */

.tp-root {
  position: fixed; inset: 0;
  background: var(--bg-deep);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.bcrumb {
  font-size: 13px;
  color: var(--fg-tertiary);
  margin-left: 4px;
  letter-spacing: 0;
}
.tp-body {
  flex: 1;
  display: grid;
  grid-template-columns: 240px 1fr 280px;
  min-height: 0;
}

/* Sidebars common */
.tp-side, .tp-right {
  background: var(--bg-medium);
  border-right: 1px solid var(--separator);
  display: flex; flex-direction: column;
  min-height: 0;
}
.tp-right {
  border-right: 0;
  border-left: 1px solid var(--separator);
}
.tp-side-head {
  height: 44px; flex-shrink: 0;
  padding: 0 16px;
  display: flex; align-items: center;
  justify-content: space-between;
  font-size: 13px; font-weight: 600;
  color: var(--fg-primary);
  letter-spacing: -0.005em;
  border-bottom: 1px solid var(--separator);
}
.tp-marker-count {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-tertiary);
  font-weight: 400;
}

/* LEFT scripts */
.tp-script-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  display: flex; flex-direction: column;
  gap: 2px;
}
.tp-script {
  width: 100%;
  padding: 10px 10px;
  border-radius: 6px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 2px;
  transition: background 120ms ease, color 120ms ease;
  border: 1px solid transparent;
}
.tp-script:hover {
  background: rgba(255,255,255,0.03);
}
.tp-script.active {
  background: var(--accent-primary-muted);
  border-color: rgba(124,92,255,0.25);
}
.tp-script-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--fg-primary);
}
.tp-script.active .tp-script-title {
  color: var(--accent-primary);
}
.tp-script-meta {
  font-size: 11px;
  color: var(--fg-tertiary);
  font-family: var(--font-mono);
  letter-spacing: 0;
}

.tp-side-add {
  margin: 8px;
  height: 32px;
  border-radius: 6px;
  border: 1px dashed var(--border-default);
  display: flex; align-items: center; justify-content: center;
  gap: 6px;
  font-size: 12px;
  color: var(--fg-secondary);
  transition: border-color 120ms ease, background 120ms ease, color 120ms ease;
}
.tp-side-add:hover {
  border-color: var(--accent-primary);
  background: var(--accent-primary-muted);
  color: var(--fg-primary);
}

/* CENTER */
.tp-center {
  display: flex; flex-direction: column;
  min-height: 0;
  background: var(--bg-deep);
}
.tp-toolbar {
  height: 48px; flex-shrink: 0;
  border-bottom: 1px solid var(--separator);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 8px;
  background: var(--bg-medium);
}
.tp-tb-group { display: flex; align-items: center; gap: 4px; }
.tp-tb-wrap { position: relative; }
.tp-tb-btn {
  height: 30px;
  padding: 0 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--fg-secondary);
  display: inline-flex; align-items: center; gap: 6px;
  transition: background 120ms ease, color 120ms ease;
}
.tp-tb-btn:hover {
  background: var(--accent-primary-muted);
  color: var(--fg-primary);
}
.tp-tb-menu {
  position: absolute; top: calc(100% + 4px); left: 0;
  min-width: 160px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  box-shadow: var(--shadow-md);
  padding: 4px;
  display: flex; flex-direction: column; gap: 2px;
  z-index: 20;
}
.tp-tb-menu-item {
  height: 28px;
  padding: 0 10px;
  font-size: 12px;
  color: var(--fg-secondary);
  border-radius: 4px;
  display: flex; align-items: center; gap: 8px;
  text-align: left;
}
.tp-tb-menu-item:hover {
  background: var(--accent-primary-muted);
  color: var(--fg-primary);
}
.tp-tb-sep {
  width: 1px; height: 18px;
  background: var(--border-default);
  margin: 0 4px;
}
.tp-tb-info {
  font-size: 11px;
  color: var(--fg-tertiary);
  display: inline-flex; align-items: center; gap: 6px;
  padding: 0 8px;
  letter-spacing: 0;
}
.tp-tb-info b {
  color: var(--fg-secondary);
  font-family: var(--font-mono);
  font-weight: 500;
}
.tp-go { margin-left: auto; height: 30px; padding: 0 14px; font-size: 12px; }

/* Editor area */
.tp-editor {
  flex: 1;
  overflow-y: auto;
  padding: 32px 64px;
  background: var(--bg-deep);
  min-height: 0;
}
.tp-textarea {
  width: 100%;
  min-height: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 28px 36px;
  font-size: 15px;
  line-height: 1.8;
  color: var(--fg-primary);
  outline: none;
  resize: none;
  font-family: var(--font-ui);
  font-feature-settings: "cv11","ss01";
  letter-spacing: -0.005em;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
.tp-textarea::placeholder { color: var(--fg-tertiary); }
.tp-textarea:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-primary-muted);
}

.tp-foot {
  height: 36px; flex-shrink: 0;
  border-top: 1px solid var(--separator);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  font-size: 11px;
  color: var(--fg-tertiary);
  font-family: var(--font-mono);
  letter-spacing: 0;
  background: var(--bg-medium);
}

/* RIGHT markers */
.tp-marker-list {
  flex: 1; overflow-y: auto;
  padding: 8px;
  display: flex; flex-direction: column; gap: 2px;
}
.tp-marker {
  display: grid;
  grid-template-columns: 18px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 6px;
  text-align: left;
  transition: background 120ms ease;
}
.tp-marker:hover {
  background: rgba(255,255,255,0.03);
}
.tp-marker-dot {
  display: inline-flex;
  color: var(--accent-primary);
}
.tp-marker-label {
  font-size: 13px;
  color: var(--fg-primary);
  font-weight: 500;
}
.tp-marker-time {
  font-size: 12px;
  color: var(--fg-tertiary);
  font-family: var(--font-mono);
  letter-spacing: 0;
}
