/* LexiCore™ Navigation V2 - Enterprise Legal Platform Styles */
/* Deep navy, muted gold, calm and authoritative */
/* WCAG AA Compliant: 4.5:1 minimum contrast ratio, keyboard navigation support */

/* ============================================
   ACCESSIBILITY - Skip Links
   ============================================ */

.skip-to-content {
  position: absolute;
  top: -40px;
  left: 0;
  background: #1a2332;
  color: white;
  padding: 0.5rem 1rem;
  text-decoration: none;
  border-radius: 0 0 0.5rem 0;
  z-index: 2000;
  font-weight: 600;
  transition: top 0.2s ease;
}

.skip-to-content:focus {
  top: 0;
  outline: 3px solid #b8860b;
  outline-offset: 2px;
}

/* ============================================
   TOP NAVIGATION (Simplified 5-Item)
   ============================================ */

.lexicore-top-nav {
  background: linear-gradient(135deg, #1a2332 0%, #2d3e50 100%);
  border-bottom: 3px solid #b8860b;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.lexicore-nav-container {
  max-width: 1920px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  gap: 2rem;
}

.lexicore-nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: white;
  font-size: 1.5rem;
  font-weight: 700;
  font-family: 'Georgia', 'Times New Roman', serif;
  letter-spacing: 0.5px;
}

.lexicore-nav-brand i {
  color: #b8860b;
  font-size: 2rem;
}

/* Make brand clickable with hover effect */
a.lexicore-nav-brand {
  text-decoration: none;
  color: white;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

a.lexicore-nav-brand:hover {
  opacity: 0.9;
}

a.lexicore-nav-brand:focus {
  outline: 3px solid #b8860b;
  outline-offset: 4px;
  border-radius: 0.25rem;
}

.lexicore-nav-items {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  justify-content: center;
}

.lexicore-nav-item {
  color: rgba(255, 255, 255, 0.9);
  padding: 0.75rem 1.5rem;
  text-decoration: none;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
  font-weight: 500;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  letter-spacing: 0.3px;
}

.lexicore-nav-item:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #b8860b;
  transform: translateY(-1px);
}

.lexicore-nav-item:focus {
  outline: 3px solid #b8860b;
  outline-offset: 2px;
  background: rgba(255, 255, 255, 0.15);
}

.lexicore-nav-item.active,
.lexicore-nav-item[aria-current="page"] {
  background: rgba(184, 134, 11, 0.2);
  color: #b8860b;
  font-weight: 600;
}

.lexicore-nav-item i {
  font-size: 1.1rem;
}

/* Navigation Links (alternative naming) */
.lexicore-nav-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  justify-content: center;
}

.lexicore-nav-link {
  color: rgba(255, 255, 255, 0.9);
  padding: 0.75rem 1.5rem;
  text-decoration: none;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
  font-weight: 500;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  letter-spacing: 0.3px;
}

.lexicore-nav-link:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #b8860b;
  transform: translateY(-1px);
}

.lexicore-nav-link:focus {
  outline: 3px solid #b8860b;
  outline-offset: 2px;
  background: rgba(255, 255, 255, 0.15);
}

.lexicore-nav-link.active,
.lexicore-nav-link[aria-current="page"] {
  background: rgba(184, 134, 11, 0.2);
  color: #b8860b;
  font-weight: 600;
}

.lexicore-nav-link i {
  font-size: 1.1rem;
}

/* User Info Section */
.lexicore-nav-user {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-left: 1.5rem;
  border-left: 1px solid rgba(255, 255, 255, 0.2);
}

.lexicore-nav-user-info {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
}

.lexicore-nav-user-name {
  color: white;
  font-weight: 600;
  font-size: 0.9rem;
}

.lexicore-nav-user-role {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.lexicore-nav-logout {
  background: #b8860b;
  color: white;
  padding: 0.6rem 1rem;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.lexicore-nav-logout:hover {
  background: #8b6508;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(184, 134, 11, 0.3);
}

/* ============================================
   LEFT SIDEBAR (Contextual Practice Mode)
   ============================================ */

.lexicore-sidebar {
  width: 280px;
  background: #f8f9fa;
  border-right: 1px solid #dee2e6;
  height: calc(100vh - 70px);
  position: fixed;
  left: 0;
  top: 70px;
  overflow-y: auto;
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.05);
}

.lexicore-sidebar-header {
  padding: 1.5rem;
  background: white;
  border-bottom: 2px solid #dee2e6;
}

.lexicore-sidebar-practice-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.lexicore-sidebar-practice-badge.litigation {
  background: #dbeafe;
  color: #1e40af;
}

.lexicore-sidebar-practice-badge.transactional {
  background: #f3e8ff;
  color: #6b21a8;
}

.lexicore-sidebar-practice-badge.real-estate {
  background: #d1fae5;
  color: #065f46;
}

.lexicore-sidebar-practice-badge.ip {
  background: #fef3c7;
  color: #92400e;
}

.lexicore-sidebar-practice-badge.regulatory {
  background: #fef08a;
  color: #713f12;
}

.lexicore-sidebar-practice-badge.investigations {
  background: #fee2e2;
  color: #991b1b;
}

.lexicore-sidebar-matter-info {
  color: #6c757d;
}

.lexicore-sidebar-nav {
  padding: 1rem 0;
}

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

.lexicore-sidebar-item:hover {
  background: #e9ecef;
  color: #1a2332;
  border-left-color: #b8860b;
}

.lexicore-sidebar-item.active {
  background: #fff;
  color: #1a2332;
  border-left-color: #b8860b;
  font-weight: 600;
}

.lexicore-sidebar-item i {
  font-size: 1rem;
  width: 20px;
  text-align: center;
  opacity: 0.7;
}

.lexicore-sidebar-item.active i {
  opacity: 1;
  color: #b8860b;
}

/* ============================================
   LEGAL NOTICE (Refined & Unobtrusive)
   ============================================ */

/* WCAG AA Enhanced Legal Notice */
.lexicore-legal-notice {
  background: #fffbf0;
  border-bottom: 2px solid #d4ba6a;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.875rem;
  color: #5a3e0f; /* Enhanced contrast: 7.5:1 */
  line-height: 1.6;
}

.lexicore-legal-notice-content {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  flex: 1;
}

.lexicore-legal-notice-content i {
  color: #8b6508; /* Enhanced gold contrast */
  font-size: 1.25rem;
  margin-top: 0.125rem;
  flex-shrink: 0;
}

.lexicore-legal-notice-close {
  background: none;
  border: 2px solid transparent;
  color: #5a3e0f;
  cursor: pointer;
  padding: 0.375rem 0.625rem;
  border-radius: 0.25rem;
  transition: all 0.2s ease;
  font-size: 1.1rem;
  margin-left: 1rem;
}

.lexicore-legal-notice-close:hover {
  background: rgba(184, 134, 11, 0.1);
  color: #3d2907;
}

.lexicore-legal-notice-close:focus {
  outline: none;
  border-color: #b8860b;
  box-shadow: 0 0 0 3px rgba(184, 134, 11, 0.2);
}

.lexicore-legal-notice strong {
  font-weight: 700;
  color: #3d2907;
}

/* ============================================
   MAIN CONTENT AREA (With Sidebar)
   ============================================ */

.lexicore-main-content {
  margin-left: 280px;
  padding: 2rem;
  min-height: calc(100vh - 70px);
  background: #ffffff;
}

.lexicore-main-content.no-sidebar {
  margin-left: 0;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1024px) {
  .lexicore-nav-brand {
    font-size: 1.2rem;
  }
  
  .lexicore-nav-brand .text-xs {
    display: none;
  }
  
  .lexicore-sidebar {
    width: 240px;
  }
  
  .lexicore-main-content {
    margin-left: 240px;
  }
}

@media (max-width: 768px) {
  .lexicore-nav-container {
    padding: 0 1rem;
  }
  
  .lexicore-nav-item span {
    display: none;
  }
  
  .lexicore-nav-item {
    padding: 0.75rem;
  }
  
  .lexicore-sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }
  
  .lexicore-sidebar.mobile-open {
    transform: translateX(0);
  }
  
  .lexicore-main-content {
    margin-left: 0;
  }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

.lexicore-nav-item:focus,
.lexicore-sidebar-item:focus,
.lexicore-nav-logout:focus,
.lexicore-legal-notice-close:focus {
  outline: 2px solid #b8860b;
  outline-offset: 2px;
}

/* ============================================
   PRACTICE AREA SIDEBAR ENHANCEMENTS
   ============================================ */

.lexicore-sidebar-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1a2332;
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.lexicore-sidebar-title i {
  color: #b8860b;
  font-size: 1rem;
}

.lexicore-sidebar-subtitle {
  font-size: 0.8rem;
  color: #6c757d;
  margin: 0;
}

.lexicore-sidebar-item-icon {
  width: 40px;
  height: 40px;
  border-radius: 0.5rem;
  background: #e9ecef;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.lexicore-sidebar-item-icon i {
  font-size: 1.1rem;
  color: #495057;
}

.lexicore-sidebar-item-content {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  flex: 1;
}

.lexicore-sidebar-item-label {
  font-weight: 600;
  font-size: 0.9rem;
  color: #1a2332;
}

.lexicore-sidebar-item-description {
  font-size: 0.75rem;
  color: #6c757d;
}

.lexicore-sidebar-item:hover {
  background: #f8f9fa;
  border-left-color: #b8860b;
}

.lexicore-sidebar-item:hover .lexicore-sidebar-item-icon {
  background: #fff3cd;
}

.lexicore-sidebar-item:hover .lexicore-sidebar-item-icon i {
  color: #b8860b;
}

.lexicore-sidebar-item:focus {
  outline: 3px solid #b8860b;
  outline-offset: -3px;
  background: #f8f9fa;
}

.lexicore-sidebar-item.active {
  background: #fff8e1;
  border-left-color: #b8860b;
}

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

.lexicore-sidebar-item.active .lexicore-sidebar-item-icon i {
  color: white;
}

.lexicore-sidebar-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid #dee2e6;
  background: white;
  margin-top: auto;
}

.lexicore-sidebar-action {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  margin-bottom: 0.5rem;
  background: #e9ecef;
  border: 2px solid transparent;
  border-radius: 0.5rem;
  color: #495057;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.875rem;
  transition: all 0.2s ease;
}

.lexicore-sidebar-action:hover {
  background: #b8860b;
  color: white;
}

.lexicore-sidebar-action:focus {
  outline: none;
  border-color: #b8860b;
  box-shadow: 0 0 0 3px rgba(184, 134, 11, 0.2);
}

.lexicore-sidebar-action i {
  font-size: 1rem;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .lexicore-top-nav {
    border-bottom-width: 4px;
  }
  
  .lexicore-nav-item,
  .lexicore-sidebar-item {
    font-weight: 600;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .lexicore-nav-item,
  .lexicore-sidebar-item,
  .lexicore-nav-logout,
  .lexicore-sidebar {
    transition: none;
  }
}
