.menu {
    --menu-button-anchor-name: unset;
    position-anchor: var(--menu-button-anchor-name);
    inset: auto;
    position-area: block-end span-inline-end;
    position-try-fallbacks: --menu-left;
    margin: 0;
    padding: 5px;
    border-radius: 6px;
    box-sizing: border-box;
    min-width: 180px;
    border: none;
    border: 2px solid hsl(240, 6%, 90%);
    list-style: none;
}

@position-try --menu-left {
    position-area: block-start span-inline-end;
}

.menuOption {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 0;
    margin: 0;
}

.menuOptionButton {
    background-color: inherit;
    padding: 8px 12px;
    margin: 0;
    width: 100%;
    height: 100%;
    border-radius: 6px;
    border: 2px solid transparent;
    background-color: transparent;
    text-align: left;
    font-size: inherit;
}

.menuOptionButton:hover {
    background-color: hsl(217, 12%, 92%);
}

.menuOptionButtonWithSubMenu {
    position: relative;
    padding-right: 25px;
}

.menuOptionButtonWithSubMenu::before {
    position: absolute;
    content: '';
    width: 10px;
    height: 6px;
    top: 18px;
    right: 10px;
    transition: transform 0.2s ease-in;
    transform: rotate(-90deg);
    mask-image: url(./assets/arrow-down.svg);
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    mask-position: center;
    mask-size: 10px 6px;
    background-color: hsl(0, 0%, 30%);
}

.menuOptionButtonWithSubMenu[aria-expanded='true']::before {
    transform: rotate(0deg);
}

.menuSubMenu {
    position-area: inline-end span-block-end;
    position-try-fallbacks: --submenu-left, --submenu-left2, --submenu-right2;
    margin: 0 10px;
}

.menu:not(.menuSubMenu) {
    margin: 5px 0;
}

@position-try --submenu-left {
    position-area: inline-start span-block-end;
}

@position-try --submenu-left2 {
    position-area: inline-start span-block-start;
}

@position-try --submenu-right2 {
    position-area: inline-end span-block-start;
}
