/* LexiCore™ Dynamic Left Sidebar Styles */
/* Practice-mode contextual navigation */

.lexicore-sidebar {
  position: fixed;
  left: 0;
  top: 64px; /* Below top navigation */
  bottom: 0;
  width: 260px;
  background: #ffffff;
  border-right: 1px solid #dee2e6;
  overflow-y: auto;
  z-index: 900;
  transition: transform 0.3s ease;
}

.lexicore-sidebar-content {
  padding: 1.5rem 0;
}

.lexicore-sidebar-section-title {
  padding: 0.5rem 1.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6c757d;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

.lexicore-sidebar-section-title:first-child {
  margin-top: 0;
}

.lexicore-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0 0.75rem;
}

.lexicore-sidebar-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  text-decoration: none;
  color: #495057;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s ease;
  position: relative;
}

.lexicore-sidebar-item:hover {
  background: #f8f9fa;
  color: #1a2332;
}

.lexicore-sidebar-item.active {
  background: linear-gradient(135deg, #1a2332 0%, #2d3e50 100%);
  color: #ffffff;
}

.lexicore-sidebar-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: #b8860b;
  border-radius: 0 2px 2px 0;
}

.lexicore-sidebar-item i {
  width: 1.25rem;
  text-align: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.lexicore-sidebar-item span:not(.lexicore-sidebar-badge) {
  flex: 1;
}

.lexicore-sidebar-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  height: 1.5rem;
  padding: 0 0.5rem;
  background: #dc3545;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 0.75rem;
}

.lexicore-sidebar-item.active .lexicore-sidebar-badge {
  background: #b8860b;
}

/* Main content adjustment when sidebar is visible */
.lexicore-main-with-sidebar {
  margin-left: 260px;
  padding-top: 64px; /* Below top navigation */
  min-height: calc(100vh - 64px);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .lexicore-sidebar {
    transform: translateX(-100%);
    box-shadow: none;
  }
  
  .lexicore-sidebar.mobile-open {
    transform: translateX(0);
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.15);
  }
  
  .lexicore-main-with-sidebar {
    margin-left: 0;
  }
}

/* Sidebar toggle button (mobile) */
.lexicore-sidebar-toggle {
  position: fixed;
  bottom: 1.5rem;
  left: 1.5rem;
  width: 3rem;
  height: 3rem;
  background: linear-gradient(135deg, #1a2332 0%, #2d3e50 100%);
  color: #ffffff;
  border: none;
  border-radius: 50%;
  font-size: 1.25rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.lexicore-sidebar-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
  .lexicore-sidebar-toggle {
    display: flex;
  }
}

/* Scrollbar styling */
.lexicore-sidebar::-webkit-scrollbar {
  width: 6px;
}

.lexicore-sidebar::-webkit-scrollbar-track {
  background: #f8f9fa;
}

.lexicore-sidebar::-webkit-scrollbar-thumb {
  background: #dee2e6;
  border-radius: 3px;
}

.lexicore-sidebar::-webkit-scrollbar-thumb:hover {
  background: #ced4da;
}

/* ============================================ */
/* ALIAS CLASSES FOR MANUAL DRAFTING PAGES     */
/* ============================================ */
/* Support both .sidebar-v2 and .lexicore-sidebar */

.sidebar-v2 {
  position: fixed;
  left: 0;
  top: 64px; /* Below top navigation */
  bottom: 0;
  width: 280px;
  background: #ffffff;
  border-right: 1px solid #dee2e6;
  overflow-y: auto;
  z-index: 900;
  transition: transform 0.3s ease;
  padding: 1.5rem 0;
}

.sidebar-section {
  margin-bottom: 1.5rem;
}

.sidebar-title {
  padding: 0.5rem 1.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6c757d;
  margin-bottom: 0.5rem;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem;
  text-decoration: none;
  color: #495057;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
}

.sidebar-item:hover {
  background: #f8f9fa;
  color: #1a2332;
  border-left-color: #dee2e6;
}

.sidebar-item.active {
  background: linear-gradient(135deg, rgba(26, 35, 50, 0.05) 0%, rgba(45, 62, 80, 0.05) 100%);
  color: #1a2332;
  border-left-color: #b8860b;
  font-weight: 600;
}

.sidebar-item i {
  width: 1.25rem;
  text-align: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.sidebar-item span {
  flex: 1;
}

/* Scrollbar styling for sidebar-v2 */
.sidebar-v2::-webkit-scrollbar {
  width: 6px;
}

.sidebar-v2::-webkit-scrollbar-track {
  background: #f8f9fa;
}

.sidebar-v2::-webkit-scrollbar-thumb {
  background: #dee2e6;
  border-radius: 3px;
}

.sidebar-v2::-webkit-scrollbar-thumb:hover {
  background: #ced4da;
}

/* Mobile responsiveness for sidebar-v2 */
@media (max-width: 1024px) {
  .sidebar-v2 {
    transform: translateX(-100%);
    box-shadow: none;
  }
  
  .sidebar-v2.mobile-open {
    transform: translateX(0);
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.15);
  }
  
  .manual-drafting-container {
    margin-left: 0 !important;
  }
}
