.submenu {
    position: relative;
    border: none;
    border-top-right-radius: 25px;
    border-bottom-right-radius: 25px;
    margin: 0;
    overflow: hidden;
    width: 250px !important;
    min-width: 250px !important;
    max-width: 250px !important;
    box-sizing: border-box;
    flex-shrink: 0;
    flex-grow: 0;
}


.submenuLineContainer {
    display: flex;
    align-items: stretch;
    gap: 0;
    padding: 0;
    margin: 0;
}

.submenuList {
    margin: 0;
    flex-grow: 1;
    list-style: none;
    padding: 0;
}

.submenuList li {
    width: 100%;
    height: 44px;
    color: #181818;
    margin: 0;
    position: relative;
    overflow: hidden;
}

.submenuList li a {
    width: 100%;
    height: 100%;
    padding: 0 3px 0 27px;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    font-family: var(--font-family);
    font-size: 0.9rem;
    color: #181818;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.submenuList li a:hover {
    background-color: var(--color-hover, rgba(0, 0, 0, 0.05));
}

.textContainer {
    position: relative;
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
}

.submenuIcon {
    width: 16px;
    height: 16px;
    color: #181818;
    flex-shrink: 0;
}

/* Horizontal layout for minimized sidebar submenus */
.submenu.minimized {
    width: 100% !important;
    margin: 0;
    padding: 4px 0;
    position: relative;
    border-radius: 0;
    overflow: hidden !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 10 !important;
}

.submenuHorizontalContainer {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    opacity: 1 !important;
    visibility: visible !important;
}

.submenuHorizontalList {
    display: flex !important;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 6px;
    list-style: none;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
    opacity: 1 !important;
    visibility: visible !important;
}

.submenuHorizontalItem {
    display: flex !important;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
    width: auto;
    height: auto;
    list-style: none;
    opacity: 1 !important;
    visibility: visible !important;
}

.submenuHorizontalLink {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: none;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease;
    text-decoration: none;
    color: #181818 !important;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    position: relative;
    overflow: visible;
    opacity: 1 !important;
    visibility: visible !important;
}

.submenuHorizontalLink:hover {
    background-color: var(--color-secondary);
    color: white;
}

.submenuHorizontalLink:hover .submenuHorizontalIcon {
    color: white !important;
}

.submenuHorizontalLink:hover .submenuHorizontalIcon svg {
    color: white !important;
}

.submenuHorizontalLink:hover .submenuHorizontalIcon svg path {
    fill: currentColor !important;
    stroke: currentColor !important;
}

.submenuHorizontalIcon {
    display: block !important;
    width: 16px !important;
    height: 16px !important;
    padding: 0;
    flex-shrink: 0;
    flex-grow: 0;
    color: #181818 !important;
    margin: 0;
    box-sizing: border-box;
    position: relative !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.submenuHorizontalIcon svg {
    width: 16px !important;
    height: 16px !important;
    min-width: 16px !important;
    min-height: 16px !important;
    max-width: 16px !important;
    max-height: 16px !important;
    display: block !important;
    margin: 0;
    padding: 0;
    opacity: 1 !important;
    visibility: visible !important;
    color: #181818 !important;
}

.submenuHorizontalIcon svg path {
    color: inherit !important;
    fill: currentColor !important;
    stroke: currentColor !important;
}

/* Ensure submenu content is visible when sidebar is minimized */
.menu.minimized .submenu.minimized,
.menu.minimized .submenu.minimized * {
    opacity: 1 !important;
    visibility: visible !important;
    color: #181818 !important;
}

.menu.minimized .submenuHorizontalLink,
.menu.minimized .submenuHorizontalLink * {
    opacity: 1 !important;
    visibility: visible !important;
    color: #181818 !important;
}

/* Active state for submenu items */
.submenuList li.active {
    background-color: var(--color-secondary);
    border-radius: 0 25px 25px 0;
}

.submenuList li.active a,
.submenuList li.active a span,
.submenuList li a.activeLink {
    color: white !important;
}

.submenuList li.active .submenuIcon {
    color: white !important;
}

/* Active state for horizontal (minimized) submenu items */
.submenuHorizontalItem.active .submenuHorizontalLink,
.submenuHorizontalLink.activeLink {
    background-color: var(--color-secondary);
    color: white !important;
}

.submenuHorizontalItem.active .submenuHorizontalIcon,
.submenuHorizontalLink.activeLink .submenuHorizontalIcon {
    color: white !important;
}

.submenuHorizontalItem.active .submenuHorizontalIcon svg,
.submenuHorizontalLink.activeLink .submenuHorizontalIcon svg {
    color: white !important;
}

.submenuHorizontalItem.active .submenuHorizontalIcon svg path,
.submenuHorizontalLink.activeLink .submenuHorizontalIcon svg path {
    fill: white !important;
    stroke: white !important;
}