Zelyanoth's picture
fff
25f22bf
raw
history blame
2.71 kB
/* Sidebar Responsive Styles */
.sidebar {
width: 250px;
background: white;
border-right: 1px solid var(--color-secondary-200);
height: calc(100vh - 4rem);
position: fixed;
top: 4rem;
left: 0;
overflow-y: auto;
transition: all var(--transition-slow);
z-index: var(--z-60); /* Higher than header */
}
/* Force collapsed width to take precedence */
.sidebar.collapsed {
width: 104px !important; /* Increased by 30% from 80px */
}
/* Mobile sidebar behavior */
@media (max-width: 1023px) {
.sidebar {
transform: translateX(-100%);
}
.sidebar.active {
transform: translateX(0);
}
}
.sidebar-nav {
padding: var(--spacing-4) 0;
}
.sidebar-item {
display: flex;
align-items: center;
padding: var(--spacing-3) var(--spacing-4);
color: var(--color-secondary-600);
text-decoration: none;
transition: all var(--transition-normal);
position: relative;
}
.sidebar-item:hover {
background: var(--color-accent-50);
color: var(--color-secondary-900);
}
.sidebar-item.active {
background: var(--color-primary-50);
color: var(--color-primary-700);
}
.sidebar-item.active::before {
content: '';
position: absolute;
left: 0;
top: 0;
bottom: 0;
width: 3px;
background: var(--color-primary-600);
}
.sidebar-icon {
width: 20px;
height: 20px;
margin-right: var(--spacing-3);
flex-shrink: 0;
}
.sidebar-text {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.sidebar.collapsed .sidebar-text {
display: none;
}
/* Tooltip-like behavior for collapsed sidebar labels */
.sidebar.collapsed .nav-item:hover .nav-label {
display: block;
position: absolute;
left: 100%;
top: 50%;
transform: translateY(-50%);
background: white;
padding: 8px 12px;
border-radius: 6px;
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
white-space: nowrap;
z-index: 100;
margin-left: 8px;
font-size: 14px;
font-weight: 500;
color: #1f2937;
border: 1px solid #e5e7eb;
}
/* Ensure proper positioning for all sidebar items */
.sidebar .nav-item {
position: relative;
}
@media (max-width: 1023px) {
.sidebar {
position: fixed;
top: 4rem;
left: 0;
height: calc(100vh - 4rem);
transform: translateX(-100%);
z-index: var(--z-50); /* Higher than header */
}
.sidebar.active {
transform: translateX(0);
}
.sidebar-overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100vh;
background: rgba(0, 0, 0, 0.5);
z-index: var(--z-20);
display: none;
}
.sidebar-overlay.active {
display: block;
}
}
@media (max-width: 767px) {
.sidebar {
width: 100%;
max-width: 300px;
}
}