frontend_nyla/src/components/Sidebar/SidebarItem.module.css
2025-06-27 12:43:07 +02:00

122 lines
2.3 KiB
CSS

.menu {
display: flex;
flex-direction: column;
align-items: flex-start;
position: relative;
}
.menu li {
display: flex;
width: 200px;
height: 44px;
padding: 0 3px 0 15px;
align-items: center;
gap: 9px;
color: var(--color-text);
}
.menu li:hover, .menu li.active {
background: var(--color-secondary);
color: var(--color-bg);
border-top-right-radius: 12px;
border-bottom-right-radius: 12px;
}
.menu li:hover a, .menu li.active a {
color: var(--color-bg);
text-decoration: none;
}
.menu li a {
text-decoration: none;
font-family: var(--font-family);
font-size: 14px;
font-style: normal;
font-weight: 500;
line-height: normal;
color: inherit;
display: flex;
align-items: center;
flex: 1;
}
.menuLink {
display: flex;
align-items: center;
justify-content: space-between;
width: 100%;
padding-right: 15px;
}
.icon {
display: flex;
width: 25px;
height: 25px;
padding: 2.292px 2.3px 2.508px 2.292px;
justify-content: center;
align-items: center;
margin-left: 20px;
flex-shrink: 0;
}
.hassubmenu {
width: 20px;
height: 20px;
transition: transform 0.2s ease;
}
.rotated {
transform: rotate(180deg);
}
/* Text content styling */
.menuText {
transition: opacity 0.3s ease, width 0.3s ease;
white-space: nowrap;
overflow: hidden;
}
/* Minimized overlay */
.minimizedOverlay {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 10;
}
/* Minimized Menu Styles */
.menu.minimized li {
/* Keep the same height as expanded */
width: 46px;
padding: 0 3px 0 15px; /* Keep same padding structure */
justify-content: flex-start; /* Keep icons in same position */
margin: 0; /* Remove auto centering that causes jumping */
position: relative;
}
.menu.minimized .icon {
/* Keep icon in exact same position as expanded */
margin-left: -4px;
}
.menu.minimized .menuText {
/* Hide text content */
opacity: 0;
width: 0;
overflow: hidden;
}
.menu.minimized .hassubmenu {
/* Hide arrow */
opacity: 0;
width: 0;
}
.menu.minimized li:hover,
.menu.minimized li.active {
/* Keep same hover/active styles but adjust border radius for smaller width */
border-radius: 15px;
color: var(--color-text);
}