/* 
 * DRAWING SIDEBAR STYLES
 * Fixed sidebar on the left that can be collapsed
 */

.drawing-sidebar {
    width: 48px;
    background: var(--leftbar-bg, #0b0d10);
    border-right: 1px solid var(--panel-border, rgba(255, 255, 255, 0.08));
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 0;
    transition: width 0.2s ease, transform 0.2s ease;
    z-index: 100;
    position: relative;
    user-select: none;
}

.drawing-sidebar.collapsed {
    width: 0;
    overflow: hidden;
    border-right: none;
    transform: translateX(-100%);
}

.drawing-tool {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
    color: var(--muted);
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.drawing-tool:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
}

.drawing-tool.active {
    background: rgba(255, 255, 255, 0.1);
    color: var(--accent);
}

.drawing-tool svg {
    width: 20px;
    height: 20px;
    stroke-width: 1.5;
}

.sidebar-divider {
    width: 24px;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 8px 0;
}

.drawing-tool.locked {
    opacity: 0.5;
}

/* Tooltip style */
.drawing-tool::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 48px;
    background: #1a1d23;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 200;
}

.drawing-tool:hover::after {
    opacity: 1;
}

/* Hide on mobile */
@media (max-width: 768px) {
    .drawing-sidebar {
        display: none;
    }
}

/* ── Floating Drawing Settings Toolbar ─────────────────── */

.drawing-settings-toolbar {
    position: absolute;
    top: 80px;
    left: 60px;
    background: #1a1d23;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    display: none; /* Only visible when drawing/selected */
    align-items: center;
    padding: 6px;
    gap: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    z-index: 150;
    animation: drawFadeIn 0.2s ease;
}

.drawing-settings-toolbar.visible {
    display: flex;
}

@keyframes drawFadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

.draw-setting-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    background: linear-gradient(rgba(4, 7, 10, 0.94), rgba(4, 7, 10, 0.94)) padding-box,
                linear-gradient(120deg, #55d5ff 0%, #9e7bff 48%, #eaf6ff 100%) border-box;
    border: 1px solid transparent;
    transition: all 0.2s;
    box-shadow: 0 0 0 1px rgba(85, 213, 255, 0.14),
                0 0 26px rgba(85, 213, 255, 0.12),
                0 10px 24px rgba(0, 0, 0, 0.28);
}

.draw-setting-item:hover {
    box-shadow: 0 0 0 1px rgba(85, 213, 255, 0.18),
                0 0 36px rgba(85, 213, 255, 0.16),
                0 14px 30px rgba(0, 0, 0, 0.32);
    background: linear-gradient(rgba(8,11,14,0.96), rgba(8,11,14,0.96)) padding-box,
                linear-gradient(120deg, #66e6ff 0%, #a07bff 48%, #f0fbff 100%) border-box;
}

.color-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    flex-shrink: 0;
}

.color-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 8px;
    background: #1a1d23;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    padding: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    display: none;
}

.color-dropdown.open {
    display: grid;
}

.color-option {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.1s ease;
}

.color-option:hover {
    transform: scale(1.2);
}

.draw-toolbar-divider {
    width: 1px;
    height: 20px;
    background: rgba(255, 255, 255, 0.1);
}

.draw-toolbar-btn {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    border-radius: 4px;
}

.draw-toolbar-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}
