/* Тёмная тема для chesseditor/moves_editor.css (редактор ходов и вариантов: кабинет и Студия). */

html[data-theme="dark"] .moves-editor-modal,
html[data-theme="dark"] .branch-selection-modal,
html[data-theme="dark"] .branch-option,
html[data-theme="dark"] .moves-editor-nav-btn,
html[data-theme="dark"] .moves-editor-btn,
html[data-theme="dark"] .moves-editor-color-palette .color-btn,
html[data-theme="dark"] .moves-editor-eval-panel,
html[data-theme="dark"] .moves-editor-btn-cancel,
html[data-theme="dark"] .moves-context-menu,
html[data-theme="dark"] .chess-symbol-submenu {
    background: var(--c-surface);
}

html[data-theme="dark"] .moves-editor-header,
html[data-theme="dark"] .branch-selection-header,
html[data-theme="dark"] .branch-selection-footer,
html[data-theme="dark"] .moves-editor-moves-header,
html[data-theme="dark"] .moves-editor-footer,
html[data-theme="dark"] .moves-editor-nav-btn:disabled {
    background: var(--c-surface-2);
}

html[data-theme="dark"] .moves-editor-header,
html[data-theme="dark"] .moves-editor-board-container,
html[data-theme="dark"] .moves-editor-board,
html[data-theme="dark"] .moves-editor-nav-btn,
html[data-theme="dark"] .branch-selection-header,
html[data-theme="dark"] .branch-selection-footer,
html[data-theme="dark"] .branch-option,
html[data-theme="dark"] .moves-editor-moves-header,
html[data-theme="dark"] .moves-editor-eval-modifier-input,
html[data-theme="dark"] .moves-editor-color-palette .color-btn,
html[data-theme="dark"] .moves-editor-btn,
html[data-theme="dark"] .moves-editor-input-container,
html[data-theme="dark"] .moves-editor-input,
html[data-theme="dark"] .moves-editor-footer,
html[data-theme="dark"] .moves-editor-eval-panel,
html[data-theme="dark"] .moves-editor-btn-cancel,
html[data-theme="dark"] .moves-context-menu,
html[data-theme="dark"] .chess-symbol-submenu,
html[data-theme="dark"] .chess-symbol-group-header,
html[data-theme="dark"] .moves-editor-tag.move-number,
html[data-theme="dark"] .moves-editor-tag.bracket-open,
html[data-theme="dark"] .moves-editor-tag.bracket-close {
    border-color: var(--c-border);
}

html[data-theme="dark"] .moves-editor-header h3,
html[data-theme="dark"] .branch-selection-header h4,
html[data-theme="dark"] .moves-editor-moves-header h4,
html[data-theme="dark"] .moves-editor-eval-value,
html[data-theme="dark"] .context-menu-item,
html[data-theme="dark"] .moves-editor-game-mode .moves-editor-tag.move {
    color: var(--c-text);
}

html[data-theme="dark"] .moves-editor-close,
html[data-theme="dark"] .moves-editor-nav-btn,
html[data-theme="dark"] .branch-option-description,
html[data-theme="dark"] .moves-editor-review-eval,
html[data-theme="dark"] .moves-editor-move-num,
html[data-theme="dark"] .moves-editor-variation-bracket,
html[data-theme="dark"] .moves-editor-input::placeholder,
html[data-theme="dark"] .moves-editor-status,
html[data-theme="dark"] .moves-editor-eval-label,
html[data-theme="dark"] .moves-editor-eval-value.zero,
html[data-theme="dark"] .moves-editor-btn-cancel,
html[data-theme="dark"] .moves-editor-empty,
html[data-theme="dark"] .context-menu-item.disabled,
html[data-theme="dark"] .chess-symbol-desc,
html[data-theme="dark"] .context-menu-item.has-submenu::after,
html[data-theme="dark"] .chess-symbol-group-header,
html[data-theme="dark"] .moves-editor-game-mode .moves-editor-variation-row .moves-editor-tag.move {
    color: var(--c-muted);
}

html[data-theme="dark"] .moves-editor-close:hover {
    background: var(--c-border);
    color: var(--c-text);
}

html[data-theme="dark"] .moves-editor-nav-btn:hover:not(:disabled) {
    background: var(--c-surface-2);
    color: var(--c-accent-text);
}

html[data-theme="dark"] #movesEditorNavLevelUp:hover:not(:disabled) {
    background: #3d2c14 !important;
    color: #f5a35c !important;
}

html[data-theme="dark"] #movesEditorNavLevelUp:not(:disabled) {
    border-color: #5c4318 !important;
    color: #f5a35c !important;
}

html[data-theme="dark"] .branch-option:hover,
html[data-theme="dark"] .moves-editor-game-mode .moves-editor-tag.move:hover {
    background: var(--c-accent-soft);
}

html[data-theme="dark"] .branch-option-move {
    color: var(--c-accent-text);
}

html[data-theme="dark"] .moves-editor-sf-btn:not(:disabled) {
    color: #f5a35c;
}

html[data-theme="dark"] .moves-editor-sf-btn:hover:not(:disabled),
html[data-theme="dark"] .moves-editor-sf-btn.active,
html[data-theme="dark"] .moves-editor-review-btn.active {
    background: #3d2c14;
    color: #f5a35c;
}

html[data-theme="dark"] .moves-editor-modifier-btn {
    color: #a3afff;
}

html[data-theme="dark"] .moves-editor-modifier-btn:hover:not(:disabled),
html[data-theme="dark"] .moves-editor-sf-eval-panel:hover {
    background: var(--c-accent-soft);
    color: #a3afff;
}

html[data-theme="dark"] .moves-editor-eval-modifier-input,
html[data-theme="dark"] .moves-editor-input {
    background: var(--c-surface-2);
    color: var(--c-text);
}

html[data-theme="dark"] .moves-editor-color-palette .color-circle {
    border-color: rgba(255, 255, 255, 0.12);
}

html[data-theme="dark"] .moves-editor-btn:hover,
html[data-theme="dark"] .moves-editor-row:hover,
html[data-theme="dark"] .moves-editor-btn-cancel:hover,
html[data-theme="dark"] .context-menu-item:hover,
html[data-theme="dark"] .chess-symbol-item:hover {
    background: var(--c-surface-2);
}

html[data-theme="dark"] .moves-editor-btn-cancel:hover {
    color: var(--c-text);
}

html[data-theme="dark"] .moves-editor-variation-row {
    border-left-color: #2b5a37;
}

html[data-theme="dark"] .moves-editor-variation-row[data-depth="2"] {
    border-left-color: #5c4318;
}

html[data-theme="dark"] .moves-editor-variation-row[data-depth="3"] {
    border-left-color: #5a3d63;
}

html[data-theme="dark"] .moves-editor-variation-row[data-depth="4"],
html[data-theme="dark"] .moves-editor-variation-row[data-depth="5"] {
    border-left-color: var(--c-border);
}

/* Метки ходов: уровни вариантов окрашены по глубине */
html[data-theme="dark"] .moves-editor-tag.move-number,
html[data-theme="dark"] .moves-editor-tag.bracket-open,
html[data-theme="dark"] .moves-editor-tag.bracket-close {
    background: var(--c-surface-2);
    color: var(--c-muted);
}

html[data-theme="dark"] .moves-editor-tag.move {
    background: var(--c-accent-soft);
    color: var(--c-accent-text);
    border-color: var(--c-border);
}

html[data-theme="dark"] .moves-editor-tag.move:hover {
    background: var(--c-border);
}

html[data-theme="dark"] .moves-editor-line.variation-line .moves-editor-tag.move,
html[data-theme="dark"] .moves-editor-line.variation-line[data-depth="1"] .moves-editor-tag.move {
    background: #17331f;
    border-color: #2b5a37;
    color: #b7efc4;
}

html[data-theme="dark"] .moves-editor-line.variation-line .moves-editor-tag.move:hover,
html[data-theme="dark"] .moves-editor-line.variation-line[data-depth="1"] .moves-editor-tag.move:hover {
    background: #1f432a;
}

html[data-theme="dark"] .moves-editor-line.variation-line[data-depth="2"] .moves-editor-tag.move {
    background: #33213a;
    color: #c79be0;
}

html[data-theme="dark"] .moves-editor-line.variation-line[data-depth="3"] .moves-editor-tag.move {
    background: #3d2c14;
    color: #f5a35c;
}

html[data-theme="dark"] .moves-editor-line.variation-line[data-depth="4"] .moves-editor-tag.move {
    background: #3a1d2a;
    color: #f08ab8;
}

html[data-theme="dark"] .moves-editor-line.variation-line[data-depth="5"] .moves-editor-tag.move {
    background: #123a37;
    color: #4ee0cf;
}

html[data-theme="dark"] .moves-editor-line.variation-line[data-depth="6"] .moves-editor-tag.move {
    background: #2a2547;
    color: #a99bf0;
}

html[data-theme="dark"] .moves-editor-line.variation-line[data-depth="7"] .moves-editor-tag.move,
html[data-theme="dark"] .moves-editor-line.variation-line[data-depth="8"] .moves-editor-tag.move {
    background: var(--c-surface-2);
    color: var(--c-text);
}

html[data-theme="dark"] .moves-editor-line.variation-line[data-depth="9"] .moves-editor-tag.move {
    background: #3a1d20;
    color: var(--c-danger);
}

html[data-theme="dark"] .moves-editor-line.variation-line[data-depth="10"] .moves-editor-tag.move {
    background: var(--c-accent-soft);
    color: var(--c-accent-text);
}

html[data-theme="dark"] .moves-editor-tag.comment {
    background: #3d2c14;
    color: #f5a35c;
    border-color: #5c4318;
}

html[data-theme="dark"] .moves-editor-tag.comment:hover {
    background: #4a3517;
}

html[data-theme="dark"] .moves-editor-tag.modifier {
    background: var(--c-accent-soft);
    color: #a3afff;
    border-color: var(--c-border);
}

html[data-theme="dark"] .moves-editor-tag.modifier:hover {
    background: var(--c-border);
}

html[data-theme="dark"] .moves-editor-tag.modifier-csl {
    color: #6fd68a;
}

html[data-theme="dark"] .moves-editor-tag.modifier-cal {
    color: var(--c-danger);
}

html[data-theme="dark"] .moves-editor-tag.modifier-eval {
    color: #c79be0;
}

html[data-theme="dark"] .moves-editor-tag.modifier-flip {
    color: #4ee0e6;
}

html[data-theme="dark"] .moves-editor-tag.modifier-fen {
    color: #f5a35c;
}

html[data-theme="dark"] .moves-editor-eval-value.positive {
    color: #6fd68a;
}

html[data-theme="dark"] .moves-editor-eval-value.negative {
    color: var(--c-danger);
}

html[data-theme="dark"] .moves-editor-error {
    background-color: #3a1d20;
    border-color: #6b2f33;
    color: var(--c-danger);
}

html[data-theme="dark"] .context-menu-separator {
    background: var(--c-border);
}

html[data-theme="dark"] .moves-editor-list::-webkit-scrollbar-track,
html[data-theme="dark"] .chess-symbol-submenu::-webkit-scrollbar-track {
    background: var(--c-surface-2);
}

html[data-theme="dark"] .moves-editor-list::-webkit-scrollbar-thumb,
html[data-theme="dark"] .chess-symbol-submenu::-webkit-scrollbar-thumb {
    background: var(--c-border);
}

@media (max-width: 768px) {
    html[data-theme="dark"] .moves-editor-board-container {
        border-bottom-color: var(--c-border);
    }
}
