/* =====================================================
   SENSEI LMS SLIDESHOW MOCKUP V2 - NAVIGATION MENU
   Hamburger Menu & Course Navigation Tree
   ===================================================== */

/* =====================================================
   MENU OVERLAY (Dims Background)
   ===================================================== */
.menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 250;
  opacity: 0;
  pointer-events: none;
  transition: opacity 300ms ease-out;
}

.menu-overlay:not(.hidden) {
  opacity: 1;
  pointer-events: all;
}

/* =====================================================
   SLIDING NAVIGATION MENU
   ===================================================== */
.navigation-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 380px;
  height: 100vh;
  background: rgba(15, 23, 42, 0.98);
  backdrop-filter: blur(20px);
  z-index: 300;
  transform: translateX(-100%);
  transition: transform 300ms ease-out;
  overflow-y: auto;
  overflow-x: hidden;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.5);
}

.navigation-menu:not(.hidden) {
  transform: translateX(0);
}

/* Custom scrollbar for menu */
.navigation-menu::-webkit-scrollbar {
  width: 8px;
}

.navigation-menu::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}

.navigation-menu::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

.navigation-menu::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* =====================================================
   MENU HEADER
   ===================================================== */
.menu-header {
  padding: 24px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(0, 0, 0, 0.3);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(10px);
}

.menu-header h2 {
  font-size: 1.25rem;
  margin: 0;
  color: #fff;
  font-weight: 600;
}

.menu-close {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  transition: all 0.2s ease;
}

.menu-close:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

/* =====================================================
   USER PROFILE SECTION
   ===================================================== */
.menu-user-profile {
  padding: 24px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  gap: 16px;
  align-items: center;
  background: rgba(255, 255, 255, 0.02);
}

.user-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.1);
  object-fit: cover;
}

.user-info {
  flex: 1;
}

.user-name {
  font-size: 1.125rem;
  font-weight: 600;
  color: #fff;
  margin: 0 0 4px 0;
}

.user-role {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.6);
  margin: 0 0 12px 0;
}

.user-progress {
  display: flex;
  align-items: center;
  gap: 12px;
}

.progress-bar-mini {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
}

.progress-bar-mini .progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #34d399);
  border-radius: 3px;
  transition: width 0.4s ease-out;
}

.progress-text {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.7);
  white-space: nowrap;
  font-weight: 500;
}

/* =====================================================
   MENU SECTION
   ===================================================== */
.menu-section {
  padding: 20px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.menu-section:last-child {
  border-bottom: none;
}

.menu-section-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0 20px;
  margin: 0 0 16px 0;
}

/* =====================================================
   CHAPTER NAVIGATION
   ===================================================== */
.chapter-item {
  margin-bottom: 8px;
}

.chapter-header {
  width: 100%;
  background: transparent;
  border: none;
  color: #fff;
  padding: 12px 20px;
  font-size: 1rem;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: background 0.2s ease;
  position: relative;
}

.chapter-header:hover {
  background: rgba(255, 255, 255, 0.05);
}

.chapter-item.expanded .chapter-header {
  background: rgba(255, 255, 255, 0.08);
}

.chapter-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.chapter-title {
  flex: 1;
  font-weight: 600;
}

.chapter-progress {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 500;
}

.chapter-toggle {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.5);
  transition: transform 0.3s ease;
}

.chapter-item.expanded .chapter-toggle {
  transform: rotate(180deg);
}

.chapter-lock {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.4);
}

.chapter-item.locked .chapter-header {
  opacity: 0.6;
  cursor: not-allowed;
}

.chapter-item.locked .chapter-header:hover {
  background: transparent;
}

/* =====================================================
   SLIDE LIST (NESTED NAVIGATION)
   ===================================================== */
.slide-list {
  list-style: none;
  margin: 0;
  padding: 0;
  background: rgba(0, 0, 0, 0.2);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

.chapter-item.expanded .slide-list {
  max-height: 1000px;
}

.slide-item {
  padding: 10px 20px 10px 56px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: background 0.2s ease;
  border-left: 3px solid transparent;
}

.slide-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.slide-item.current {
  background: rgba(255, 107, 53, 0.15);
  border-left-color: #ff6b35;
}

.slide-item.completed {
  opacity: 0.8;
}

.slide-status {
  font-size: 0.875rem;
  flex-shrink: 0;
  width: 16px;
  text-align: center;
}

.slide-item.completed .slide-status {
  color: #10b981;
}

.slide-item.current .slide-status {
  color: #ff6b35;
}

.slide-item:not(.completed):not(.current) .slide-status {
  color: rgba(255, 255, 255, 0.3);
}

.slide-title {
  flex: 1;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.4;
}

.slide-item.current .slide-title {
  font-weight: 600;
  color: #fff;
}

/* =====================================================
   QUICK ACTIONS SECTION
   ===================================================== */
.quick-actions-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.quick-actions-list li {
  margin: 0;
}

.quick-action-btn {
  width: 100%;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.9);
  padding: 14px 20px;
  font-size: 0.9375rem;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.2s ease;
}

.quick-action-btn:hover:not(.disabled) {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.quick-action-btn.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.quick-action-btn:not(.disabled):active {
  background: rgba(255, 255, 255, 0.12);
}

/* =====================================================
   RESPONSIVE DESIGN
   ===================================================== */
@media (max-width: 480px) {
  .navigation-menu {
    width: 300px;
  }

  .menu-header h2 {
    font-size: 1.125rem;
  }

  .user-avatar {
    width: 50px;
    height: 50px;
  }

  .user-name {
    font-size: 1rem;
  }

  .chapter-title {
    font-size: 0.9375rem;
  }

  .slide-title {
    font-size: 0.8125rem;
  }
}

/* For very small screens, make menu full width */
@media (max-width: 360px) {
  .navigation-menu {
    width: 100vw;
  }
}

/* =====================================================
   ANIMATIONS
   ===================================================== */
@keyframes slideInFromLeft {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(0);
  }
}

/* =====================================================
   ACCESSIBILITY
   ===================================================== */
.chapter-header:focus-visible,
.slide-item:focus-visible,
.quick-action-btn:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: -2px;
}

/* Keyboard navigation indicator */
.slide-item:focus-visible {
  background: rgba(59, 130, 246, 0.2);
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  .navigation-menu,
  .menu-overlay,
  .chapter-toggle,
  .slide-list {
    transition: none;
  }

  .menu-close:hover {
    transform: none;
  }
}
