.nic-left-toolbar {
    left: 50%;
    top: auto;
    bottom: 16px;
    width: auto;
    min-height: 44px;
    padding: 5px;
    display: flex;
    align-items: center;
    gap: 3px;
    border-radius: 13px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 12px 34px rgba(15, 23, 42, .14);
    transform: translateX(-50%);
}

.nic-left-toolbar [data-nic-tip]::after {
    left: 50%;
    top: auto;
    bottom: calc(100% + 8px);
    transform: translate(-50%, 4px);
}

.nic-left-toolbar [data-nic-tip]:hover::after,
.nic-left-toolbar [data-nic-tip]:focus-visible::after {
    transform: translate(-50%, 0);
}

.nic-left-toolbar .nic-canvas-tool {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    color: #475569;
    transition: background-color .14s ease, border-color .14s ease, color .14s ease, opacity .14s ease;
}

.nic-left-toolbar .nic-canvas-tool:hover:not(:disabled):not(.is-active) {
    border-color: transparent;
    background: #f1f5f9;
    color: #0f172a;
}

.nic-left-toolbar .nic-canvas-tool.is-active {
    border-color: #111827;
    background: #111827;
    color: #fff;
}

.nic-left-toolbar .nic-canvas-tool:disabled {
    border-color: transparent;
    background: transparent;
    color: #94a3b8;
    cursor: not-allowed;
    opacity: .48;
}

.nic-toolbar-divider {
    width: 1px;
    height: 22px;
    margin: 0 3px;
    background: rgba(15, 23, 42, .1);
}

.nic-toolbar-import {
    display: none;
}

#infinite-canvas-viewport.is-batch-tool {
    cursor: crosshair;
}

#infinite-canvas-viewport.is-batch-tool .nic-node {
    cursor: pointer;
}

.nic-batchbar {
    min-height: 42px;
    padding: 4px;
    gap: 3px;
    border-radius: 13px;
}

.nic-batch-count {
    width: 28px;
    height: 28px;
    padding: 0;
    border-radius: 8px;
    display: grid;
    place-items: center;
    background: #eff6ff;
    color: #2563eb;
    font-size: 12px;
    font-weight: 800;
}

.nic-batchbar button,
.nic-batchbar .nic-batch-download,
.nic-batchbar .nic-batch-delete {
    position: relative;
    width: 34px;
    height: 34px;
    padding: 0;
    border-color: transparent;
    border-radius: 9px;
    background: transparent;
    color: #475569;
}

.nic-batchbar button:hover:not(:disabled) {
    border-color: transparent;
    background: #f1f5f9;
    color: #0f172a;
}

.nic-batchbar .nic-batch-delete:hover:not(:disabled) {
    background: #fef2f2;
    color: #dc2626;
}

.nic-batchbar button svg {
    display: block;
    width: 17px;
    height: 17px;
}

.nic-batchbar [data-nic-tip]::after {
    content: attr(data-nic-tip);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 8px);
    z-index: 8;
    padding: 6px 8px;
    border-radius: 7px;
    background: #0f172a;
    color: #fff;
    font-size: 11px;
    font-weight: 650;
    line-height: 1;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 4px);
    transition: opacity .14s ease, transform .14s ease;
}

.nic-batchbar [data-nic-tip]:hover::after,
.nic-batchbar [data-nic-tip]:focus-visible::after {
    opacity: 1;
    transform: translate(-50%, 0);
}

body:not(.x-cg-skin) .nic-node.is-selected:not(.is-multi-selected) .nic-node-card,
body:not(.x-cg-skin) .nic-node.is-multi-selected .nic-node-card {
    outline: 0;
    box-shadow: none;
}

body:not(.x-cg-skin) .nic-node.is-selected .nic-node-card::before,
body:not(.x-cg-skin) .nic-node.is-multi-selected .nic-node-card::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 19;
    box-sizing: border-box;
    border: 1px solid #3b82f6;
    pointer-events: none;
}

body:not(.x-cg-skin) .nic-node.is-multi-selected .nic-node-card::after {
    content: '';
    position: absolute;
    inset: -5px;
    z-index: 20;
    pointer-events: none;
    background:
        radial-gradient(circle, #3b82f6 0 68%, transparent 72%) left top / 10px 10px no-repeat,
        radial-gradient(circle, #3b82f6 0 68%, transparent 72%) right top / 10px 10px no-repeat,
        radial-gradient(circle, #3b82f6 0 68%, transparent 72%) left bottom / 10px 10px no-repeat,
        radial-gradient(circle, #3b82f6 0 68%, transparent 72%) right bottom / 10px 10px no-repeat;
}

.nic-node-frame > video {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 210px;
    object-fit: contain;
    background: #0b1020;
}

.nic-node-pending strong {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nic-node-pending strong em {
    color: #2563eb;
    font-size: 11px;
    font-style: normal;
    font-weight: 700;
}

.nic-node-progress,
.nic-chat-progress {
    display: block;
    width: min(132px, 72%);
    height: 4px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(148, 163, 184, .25);
}

.nic-node-progress i,
.nic-chat-progress i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: #2563eb;
    transition: width .3s ease;
}

.nic-node-retry {
    min-height: 30px;
    margin-top: 2px;
    padding: 0 12px;
    border: 1px solid rgba(37, 99, 235, .25);
    border-radius: 8px;
    background: #fff;
    color: #2563eb;
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
}

.nic-chat-progress {
    width: 100%;
    margin-top: 10px;
}

.nic-chat-video-wrap,
.nic-chat-video {
    width: 100%;
}

.nic-chat-video {
    display: block;
    max-height: 480px;
    background: #0b1020;
}

.nic-composer-preview-thumb > video,
.nic-composer-preview-zoom > video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.nic-composer-audio {
    display: grid;
    width: 100%;
    height: 100%;
    place-items: center;
    color: #2563eb;
    background: #eff6ff;
    font-size: 24px;
}

.nic-composer.is-video-composer {
    border-color: rgba(37, 99, 235, .24);
}

@media (max-width: 720px) {
    .nic-left-toolbar {
        bottom: 10px;
        min-height: 42px;
        padding: 4px;
        gap: 2px;
    }

    .nic-left-toolbar .nic-canvas-tool {
        width: 32px;
        height: 32px;
    }

    .nic-toolbar-divider {
        margin: 0 2px;
    }
}
