/* ============================================================
   FireWeb — Tools Panel Styles
   ============================================================ */

#tools-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--space-xs) 0;
    gap: 1px;
    background: linear-gradient(180deg, #303030 0%, #2a2a2a 100%);
}

.tool-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    width: 100%;
}

.tool-separator {
    width: 28px;
    height: 1px;
    background: var(--border-dark);
    margin: var(--space-xs) auto;
}

.tool-btn {
    width: 34px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    position: relative;
    margin: 0 auto;
    padding: 0;
}

.tool-btn svg {
    width: 16px;
    height: 16px;
    transition: color var(--transition-fast);
}

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

.tool-btn.active {
    background: var(--bg-selected);
    color: var(--text-bright);
}

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

/* Tool with hidden sub-tools indicator */
.tool-btn.has-subtool::after {
    content: '';
    position: absolute;
    right: 3px;
    bottom: 3px;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-top: 4px solid var(--text-muted);
}

.tool-btn.active.has-subtool::after {
    border-top-color: rgba(255,255,255,0.5);
}

/* Sub-tool flyout */
.tool-flyout {
    display: none;
    position: absolute;
    left: 100%;
    top: 0;
    background: var(--bg-panel);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-dropdown);
    padding: var(--space-xs);
    z-index: 200;
    gap: 2px;
    flex-direction: column;
    min-width: 34px;
}

.tool-btn.has-subtool:hover .tool-flyout,
.tool-flyout.visible {
    display: flex;
}

.tool-flyout .tool-btn {
    width: 30px;
    height: 28px;
}

/* ---- Color Section at Bottom ---- */
.tool-colors {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-md) 0;
}

.tool-color-swatches {
    position: relative;
    width: 32px;
    height: 32px;
}

.tool-color-fill {
    position: absolute;
    top: 0;
    left: 0;
    width: 22px;
    height: 22px;
    border: 2px solid var(--bg-panel);
    border-radius: var(--radius-sm);
    cursor: pointer;
    z-index: 2;
    transition: border-color var(--transition-fast);
}

.tool-color-fill:hover {
    border-color: var(--border-light);
}

.tool-color-stroke {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 22px;
    height: 22px;
    border: 2px solid var(--bg-panel);
    border-radius: var(--radius-sm);
    cursor: pointer;
    z-index: 1;
    transition: border-color var(--transition-fast);
}

.tool-color-stroke:hover {
    border-color: var(--border-light);
    z-index: 3;
}

.tool-color-actions {
    display: flex;
    gap: var(--space-xs);
}

.tool-color-actions button {
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 9px;
    padding: 0;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.tool-color-actions button:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.tool-color-actions button svg {
    width: 12px;
    height: 12px;
}
