/* MenuBar */
.menubar-widget {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    background-color: #e8e8e8;
    border-bottom: 1px solid #bbb;
    width: 100%;
    font-family: sans-serif;
    font-size: 13px;
    user-select: none;
}

.menubar-item-container {
    position: relative;
}

.menubar-item {
    padding: 4px 10px;
    cursor: pointer;
    white-space: nowrap;
}

.menubar-item:hover,
.menubar-item.active {
    background-color: #cde;
}

/* Menu (dropdown / submenu).
   z-index is intentionally very large: TopLevel.raise_() assigns
   z-indexes that grow by 1 per raise across all document.body
   children (which include popped-up menus), so a small menu
   z-index can be overtaken after a few raise operations.  Using
   a high constant keeps popups above any raised TopLevel under
   normal use. */
.menu-widget {
    position: absolute;
    z-index: 1000000;
    background-color: #f6f6f6;
    border: 1px solid #aaa;
    box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.2);
    min-width: 140px;
    padding: 4px 0;
    font-family: sans-serif;
    font-size: 13px;
    user-select: none;
}

.menu-widget.menu-submenu {
    left: 100%;
    top: 0;
}

.menu-separator {
    height: 0;
    margin: 4px 8px;
    border-top: 1px solid #bbb;
}

/* Submenu item (label + arrow) */
.menu-submenu-item {
    position: relative;
    display: flex;
    align-items: center;
    padding: 4px 10px;
    cursor: pointer;
    white-space: nowrap;
}

.menu-submenu-item:hover {
    background-color: #cde;
}

.menu-submenu-label {
    flex: 1;
}

.menu-submenu-arrow {
    margin-left: 12px;
    font-size: 10px;
    color: #666;
}

/* MenuAction */
.menuaction-widget {
    display: flex;
    align-items: center;
    padding: 4px 10px;
    cursor: pointer;
    white-space: nowrap;
}

.menuaction-widget:hover {
    background-color: #cde;
}

.menuaction-check {
    width: 16px;
    text-align: center;
    font-size: 13px;
    color: #333;
    flex-shrink: 0;
}

.menuaction-icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
    margin-right: 6px;
    flex-shrink: 0;
}

.menuaction-label {
    flex: 1;
}
