/* toolbar.css */

/* Toolbar and Navigation */
.toolbar {
    display: flex;
    background: #333;
    color: #fff;
    padding: 10px;
    justify-content: flex-start;
    align-items: center;
}

.home-button {
    margin-right: 20px;
}

.home-button button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.home-button img {
    height: 30px;
    width: auto;
    vertical-align: middle;
}

.nav-controls {
    display: flex;
}

.toolbar-item {
    position: relative;
    padding: 8px 32px 8px 12px;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white; /* Ensure toolbar item text is white */
}

.toolbar-item:hover {
    background-color: #f0f0f0;
}

.checkmark {
    position: absolute;
    right: 12px;
    display: inline; /* Ensure checkmark is displayed by default */
    opacity: 1; /* Ensure checkmark is visible by default */
    transition: opacity 0.1s ease;
}

.toolbar-item.active .checkmark {
    opacity: 1;
}

/* Dropdown Menu */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropbtn {
    background-color: #333;
    color: white;
    padding: 10px 20px;
    font-size: 16px;
    border: none;
    cursor: pointer;
}

.dropbtn:hover {
    background-color: #555;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #f9f9f9;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1000; /* Increase z-index to ensure dropdowns appear above canvas */
}

.dropdown-content button {
    color: black;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
}

.dropdown-content button:hover {
    background-color: #f1f1f1;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.toggle-button {
    width: 100%;
    margin: 5px 0;
    padding: 8px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.toggle-button:hover {
    background-color: #e0e0e0;
}

.toggle-button.active {
    background-color: #4CAF50;
    color: white;
}

/* Remove old button-specific styles */
/* Delete or comment out the #eraseNodeBtn styles */

/* Nested dropdown styling */
.nested-dropdown {
    position: relative;
    display: block;
}

.nested-dropdown-content {
    display: none;
    position: absolute;
    left: 100%;
    top: 0;
    background-color: #f9f9f9;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
}

.nested-dropdown:hover .nested-dropdown-content {
    display: block;
}

.nested-dropbtn {
    position: relative;
    width: 100%;
    text-align: left;
    padding: 12px 16px;
    border: none;
    background: none;
    cursor: pointer;
}

.nested-dropbtn::after {
    content: '›';
    position: absolute;
    right: 10px;
}

.nested-dropdown-content button {
    width: 100%;
    padding: 12px 16px;
    text-align: left;
    border: none;
    background: none;
    cursor: pointer;
}

.nested-dropdown-content button:hover {
    background-color: #f1f1f1;
}