/* Панель инструментов холста */
.ns-canvas-tools {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Кнопки выбора цвета */
.ns-color-swatch {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: 0.2s;
}
.ns-color-swatch.active {
    border-color: #fff;
    transform: scale(1.2);
}

/* Слайдер размера кисти */
.ns-brush-slider {
    width: 60px;
    height: 4px;
    cursor: pointer;
    accent-color: var(--ns-accent);
}

/* Кнопка переключения режима (Рисование/Движение) */
.ns-tool-btn {
    font-size: 14px;
    color: #a1a1aa;
    cursor: pointer;
    transition: 0.2s;
    padding: 4px;
    border-right: 1px solid #222222;
}
.ns-tool-btn:last-of-type {
    border-right: none;
}
.ns-tool-btn.active {
    color: #fff;
}

/* Тонкий горизонтальный скроллбар для панели инструментов (при нехватке ширины) */
.ns-draw-toolbar {
    scrollbar-width: thin; /* Для Firefox */
    scrollbar-color: #3f3f46 transparent;
}

/* Стилизация скроллбара для Chrome, Safari, Edge */
.ns-draw-toolbar::-webkit-scrollbar {
    height: 4px !important; /* Очень тонкий ползунок */
}
.ns-draw-toolbar::-webkit-scrollbar-track {
    background: transparent !important;
}
.ns-draw-toolbar::-webkit-scrollbar-thumb {
    background-color: #3f3f46 !important;
    border-radius: 10px !important;
}
.ns-draw-toolbar::-webkit-scrollbar-thumb:hover {
    background-color: #52525b !important;
}
/* Скрываем скроллбар, чтобы он не распирал высоту панели */
.ns-draw-toolbar::-webkit-scrollbar {
    height: 4px;
}
.ns-draw-toolbar::-webkit-scrollbar-track {
    background: transparent;
}
.ns-draw-toolbar::-webkit-scrollbar-thumb {
    background: #3f3f46;
    border-radius: 4px;
}
.ns-draw-toolbar::-webkit-scrollbar-thumb:hover {
    background: #52525b;
}

/* Стили для новых выпадающих меню */
.ns-core-dropdown {
    position: relative;
    display: inline-block;
}
.ns-core-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #18181b;
    border: 1px solid #3f3f46;
    border-radius: 8px;
    padding: 6px;
    flex-direction: column;
    gap: 4px;
    z-index: 5500;
    min-width: 220px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.8);
}
.ns-core-dropdown:hover .ns-core-dropdown-menu {
    display: flex;
}
.ns-core-menu-item {
    padding: 8px 12px;
    cursor: pointer;
    color: #a1a1aa;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    transition: 0.2s;
    white-space: nowrap;
}
.ns-core-menu-item:hover {
    background: #27272a;
    color: #fff;
}
.ns-core-menu-item.active {
    background: #27272a;
    color: #fff;
}

/* Единообразный hover-эффект для главных кнопок панели */
.ns-tool-btn:hover {
    background: #27272a !important;
    color: #fff !important;
}

/* Единый размер и центрирование кнопок-иконок */
.ns-tool-btn {
    width: 40px !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    text-align: center !important;
}

/* Всегда показываем стрелочки у числовых полей */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    opacity: 1 !important;
    display: flex !important;
}
