/**
 * Стили для 3D редактора
 */

/* Панель инструментов */
.editor-toolbar {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 5px;
    background: var(--bg-secondary);
    padding: 8px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    z-index: 10;
}

.editor-toolbar__btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border: none;
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 1.25rem;
}

.editor-toolbar__btn:hover {
    background: var(--accent-green);
    color: var(--bg-primary);
}

.editor-toolbar__btn--active {
    background: var(--accent-green);
    color: var(--bg-primary);
}

/* Canvas */
#editorCanvas {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: var(--border-radius);
    cursor: grab;
}

#editorCanvas:active {
    cursor: grabbing;
}

/* Панели редактора */
.editor-panel {
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.editor-panel__header {
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--bg-hover);
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.editor-panel__body {
    padding: 16px;
    overflow-y: auto;
    flex: 1;
}

/* Группы инструментов */
.tool-group {
    margin-bottom: 20px;
}

.tool-group__title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tool-btn {
    width: 100%;
    padding: 10px 12px;
    background: var(--bg-tertiary);
    border: none;
    border-radius: var(--border-radius);
    color: var(--text-primary);
    cursor: pointer;
    margin-bottom: 5px;
    transition: all var(--transition-fast);
    text-align: left;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tool-btn:hover {
    background: var(--bg-hover);
}

.tool-btn--active {
    background: var(--accent-green);
    color: var(--bg-primary);
}

/* Слайдеры */
.slider {
    width: 100%;
    margin: 10px 0;
}

.slider input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: var(--bg-tertiary);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent-green);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.slider input[type="range"]::-webkit-slider-thumb:hover {
    background: var(--accent-green-dim);
}

.slider__label {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

/* Дерево сцены */
.scene-tree-item {
    padding: 8px 12px;
    background: var(--bg-tertiary);
    border-radius: var(--border-radius-sm);
    margin-bottom: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background var(--transition-fast);
    font-size: 0.875rem;
}

.scene-tree-item:hover {
    background: var(--bg-hover);
}

.scene-tree-item--selected {
    background: var(--accent-green);
    color: var(--bg-primary);
}

.scene-tree-item__icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

/* Таймлайн */
.timeline {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.timeline__header {
    padding: 10px;
    border-bottom: 1px solid var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.timeline__tracks {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.timeline__track {
    height: 50px;
    background: var(--bg-tertiary);
    border-radius: var(--border-radius-sm);
    margin-bottom: 8px;
    position: relative;
    display: flex;
    align-items: center;
    padding: 0 12px;
}

.timeline__playhead {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--accent-green);
    left: 0;
    z-index: 10;
    pointer-events: none;
}

/* Цветовой picker */
input[type="color"].form-input {
    height: 45px;
    padding: 5px;
    cursor: pointer;
}

/* Формы в редакторе */
.editor-panel .form-group {
    margin-bottom: 15px;
}

.editor-panel .form-label {
    font-size: 0.875rem;
    margin-bottom: 6px;
}

.editor-panel .form-input {
    padding: 8px 12px;
    font-size: 0.875rem;
}

/* Адаптация для мобильных */
@media (max-width: 1024px) {
    .editor-container {
        grid-template-columns: 1fr;
        grid-template-rows: auto 60vh auto;
        height: auto;
    }

    .editor-panel {
        max-height: 400px;
    }

    .editor-canvas {
        height: 60vh;
    }
}

@media (max-width: 768px) {
    .editor-toolbar {
        top: 5px;
        padding: 5px;
        gap: 3px;
    }

    .editor-toolbar__btn {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
}
