/* Menu Styling */
#menu {
    position: fixed;/*icon-aaa*/
    top: 60px; /* Adjust based on placement */
    right: 10px; /* Aligns it to the right */
    min-width: 200px;
    max-width: 300px;
    background: var(--background-color);
    border-radius: var(--input-border-radius);
    overflow: hidden; /* Prevents content spill */
    box-shadow: 2px 4px 10px rgba(0, 0, 0, 0.2);
    display: none;
}

/* Show menu when checkbox is checked */
#menu-toggle:checked ~ #menu {
    display: block;
}

/* Menu List */
.menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.menu-list li {
    position: relative;
    display: block;
    right: 10px;
}

/* Menu Links */
.menu-list a {
    display: block;
    padding: 12px 15px;
    color: var(--text-color);
    text-decoration: none;
    font-weight: bold;
    background: var(--input-background);
    transition: background 0.3s;
    cursor: pointer; /* Ensures it looks interactive */
}

.menu-list a:hover {
    background: var(--button-hover-background);
}

/* Submenu Accordion (Initially Hidden) */
.submenu {
    display: none; /* Hide by default */
    list-style: none;
    padding-left: 15px; /* Indent submenus */
    background: var(--input-background);
    border-left: 3px solid var(--button-background);
}

/* Show submenu when parent item is clicked */
.menu-list li.active > .submenu {
    display: block;
}

/* Add a down arrow to indicate dropdown */
.menu-list li:has(> .submenu) > a::after {
    content: "▼";
    float: right;
    font-size: 0.8em;
    transition: transform 0.3s ease-in-out;
}

/* Rotate arrow when active */
.menu-list li.active > a::after {
    transform: rotate(180deg);
}

/* Hide checkbox (toggle trigger) */
#menu-toggle {
    display: none;
}

/* Label as Button */
.menu-button {
    display: inline-block;
    cursor: pointer;
    background: var(--button-background);
    color: var(--text-color);
    padding: var(--input-padding);
    font-size: 18px;
    border-radius: var(--input-border-radius);
    user-select: none;
}

.menu-button:hover {
    background: var(--button-hover-background);
}

/* Keep menu toggle button on the right */
.menu-button {
    position: absolute;
    right: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}
