#json-categories-as-text {
  border: 1px solid #c6c6c6;
  color: var(--textareaForegroundColor);
  padding: 5px 15px;
  background-color: var(--markdownTextareaBackgroundColor);
  font-family: monospace;
  font-size: 13px;
  border-bottom: 0;
  border-radius: 3px 3px unset unset;
  width: 100%;
}

#json-categories-as-text.error {
  border-color: red;
  color: red;
  border-bottom: 1px solid;
}

#categories-table th {
  border-color: currentcolor;
  border-bottom: none;
  border: var(--submenuBackgroundColor);
  border-bottom: 1px solid var(--submenuBackgroundColor);
  padding: 5px;
  font-weight: 600;
  color: var(--mainForegroundColor);
}

#categories-table tr {
  outline: 0;
  background-color: var(--mainBackgroundColor);
}

#categories-table tbody tr:nth-child(odd) {
  background-color: var(--submenuBackgroundColor);
}

#categories-table td {
  padding: 5px;
}

#categories-table .category__deleted {
  text-decoration: line-through;
  color: red;
}

#categories-table .category__added {
  color: green;
}
/* Overlay shown on top of the video player. */
.celluloid-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 4.5em;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  pointer-events: none;
  z-index: 20;
}

.celluloid-bubble {
  max-width: 80%;
  padding: 6px 12px;
  border-radius: 8px;
  border-left: 4px solid #ff8c00;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-size: 14px;
  line-height: 1.4;
  text-align: center;
  backdrop-filter: blur(2px);
}

/* Markers on the progress bar. */
.celluloid-marker {
  position: absolute;
  top: 50%;
  width: 8px;
  height: 8px;
  margin-left: -4px;
  transform: translateY(-50%);
  border-radius: 50%;
  background: #ff8c00;
  cursor: pointer;
  z-index: 5;
  transition: transform 0.1s ease;
}

.celluloid-marker:hover {
  transform: translateY(-50%) scale(1.5);
}

/* Annotations list panel below the player. */
.celluloid-panel {
  margin-top: 12px;
  border: 1px solid var(--greyBackgroundColor, #e5e5e5);
  border-radius: 8px;
  overflow: hidden;
  background: var(--mainBackgroundColor, #fff);
  color: var(--mainForegroundColor, #000);
}

.celluloid-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  font-weight: 600;
  background: var(--greyBackgroundColor, #f5f5f5);
}

.celluloid-panel__title {
  flex: 1 1 auto;
}

/* Inline link editor (owners / admins only). */
.celluloid-edit-btn,
.celluloid-editor__save,
.celluloid-editor__unlink {
  padding: 4px 10px;
  border: 1px solid #ff8c00;
  border-radius: 4px;
  background: transparent;
  color: inherit;
  font-size: 13px;
  cursor: pointer;
}

.celluloid-edit-btn:hover,
.celluloid-editor__save {
  background: #ff8c00;
  color: #fff;
}

.celluloid-editor__unlink {
  border-color: #d33;
  color: #d33;
}

.celluloid-editor__unlink:hover {
  background: #d33;
  color: #fff;
}

.celluloid-edit-btn:disabled,
.celluloid-editor__save:disabled,
.celluloid-editor__unlink:disabled {
  opacity: 0.6;
  cursor: default;
}

.celluloid-editor {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-top: 1px solid var(--greyBackgroundColor, #eee);
}

.celluloid-editor__input {
  flex: 1 1 220px;
  min-width: 180px;
  padding: 6px 10px;
  border: 1px solid var(--inputBorderColor, #ccc);
  border-radius: 4px;
  background: var(--inputBackgroundColor, #fff);
  color: var(--mainForegroundColor, #000);
  font-size: 14px;
}

.celluloid-editor__actions {
  display: flex;
  gap: 8px;
}

.celluloid-editor__message {
  flex: 1 1 100%;
  font-size: 12px;
  opacity: 0.8;
}

.celluloid-hint {
  padding: 10px 14px;
  font-size: 13px;
  opacity: 0.75;
}

.celluloid-panel__list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 320px;
  overflow-y: auto;
}

.celluloid-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 8px 14px;
  cursor: pointer;
  border-top: 1px solid var(--greyBackgroundColor, #eee);
}

.celluloid-item:hover,
.celluloid-item--active {
  background: rgba(255, 140, 0, 0.12);
}

.celluloid-item__time {
  flex: 0 0 auto;
  min-width: 48px;
  padding: 2px 6px;
  border: 1px solid #ff8c00;
  border-radius: 4px;
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  text-align: center;
}

.celluloid-item__body {
  flex: 1 1 auto;
  font-size: 14px;
  line-height: 1.4;
  word-break: break-word;
}
