/* Portal Menu Styles - Light, Clean Design */

/* Menu Container */
.portal-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 280px;
  height: 100vh;
  background: #ffffff;
  border-right: 1px solid #e2e8f0;
  z-index: 999;
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
}

.portal-menu.collapsed {
  width: 64px;
}

.portal-menu.hidden {
  transform: translateX(-100%);
}

/* Menu Toggle Section - Kept for spacing */
.menu-toggle-section {
  height: 64px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  padding: 0 16px;
  background-color: transparent;
}

/* Fake Toggle Button - Decorative only */
.fake-toggle-button {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  color: #64748b;
  font-size: 14px;
  font-weight: 500;
  cursor: default;
  transition: all 0.2s ease;
  opacity: 0.7;
}

.fake-toggle-button:hover {
  border-color: #cbd5e1;
  opacity: 0.9;
}

.fake-toggle-button i {
  margin-right: 8px;
  font-size: 14px;
}

.fake-toggle-text {
  font-size: 12px;
  letter-spacing: 0.5px;
}

/* Hide fake toggle button on mobile */
@media (max-width: 768px) {
  .fake-toggle-button {
    display: none;
  }
}

.menu-toggle-section .menu-list {
  width: 100%;
  margin: 0;
  padding: 0;
}

.menu-toggle-section .menu-item {
  margin: 0;
}

.menu-toggle-section .menu-link {
  height: 64px;
  display: flex;
  align-items: center;
  padding: 0 24px;
  border-left: none;
  border-radius: 0;
}

/* Menu Toggle Button */
.menu-toggle {
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
}

.menu-toggle:hover {
  background: transparent;
  color: inherit;
}

.menu-toggle i {
  width: 20px;
  margin-right: 16px;
  font-size: 16px;
  text-align: center;
  transition: transform 0.3s ease;
}

/* Toggle Icon States */
.toggle-icon-collapsed {
  display: none;
}

.portal-menu.collapsed .toggle-icon-expanded {
  display: none;
}

.portal-menu.collapsed .toggle-icon-collapsed {
  display: inline-block;
}

/* Menu Content */
.menu-content {
  flex: 1;
  padding: 0;
  overflow-y: auto;
}

.menu-section {
  margin-bottom: 32px;
}

.menu-title {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 16px 24px;
  padding: 0;
}

.menu-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.menu-item {
  margin: 0;
}

.menu-link {
  display: flex;
  align-items: center;
  padding: 12px 24px;
  color: #64748b;
  text-decoration: none;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
}

.menu-link:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-left-color: #3b82f6;
}

.menu-link.active {
  background: #eff6ff;
  color: #1d4ed8;
  border-left-color: #3b82f6;
}

.menu-link i {
  width: 20px;
  margin-right: 16px;
  font-size: 16px;
  text-align: center;
}

.menu-text {
  font-size: 14px;
  font-weight: 500;
}

/* Collapsed State */
.portal-menu.collapsed .menu-link {
  padding: 12px 16px;
  justify-content: center;
}

.portal-menu.collapsed .menu-link i {
  margin-right: 0;
  font-size: 16px;
}

.portal-menu.collapsed .menu-toggle-section .menu-link {
  padding: 0 16px;
}

.portal-menu.collapsed .menu-text,
.portal-menu.collapsed .menu-title {
  display: none;
}

.portal-menu.collapsed .fake-toggle-text {
  display: none;
}

.portal-menu.collapsed .fake-toggle-button {
  padding: 8px;
  justify-content: center;
}

.portal-menu.collapsed .fake-toggle-button i {
  margin-right: 0;
}

.portal-menu.collapsed .menu-icon {
  margin-right: 0;
}

/* Main Content Adjustment */
.portal-wrapper {
  margin-left: 280px;
  transition: margin-left 0.3s ease;
}

.portal-wrapper.menu-collapsed {
  margin-left: 64px;
}

.portal-wrapper.menu-hidden {
  margin-left: 0;
}

/* Desktop hover-to-open feature */
@media (min-width: 769px) {

  .portal-wrapper.menu-collapsed .portal-menu {
    transition: transform 0.3s ease, width 0.3s ease;
  }
  
  /* Menu opens on hover */
  .portal-wrapper.menu-collapsed .portal-menu:hover {
    transform: translateX(0);
    width: 280px;
  }
  
  .portal-wrapper.menu-collapsed .portal-menu:hover .menu-text {
    display: inline-block;
  }
  
  .portal-wrapper.menu-collapsed .portal-menu:hover .menu-link {
    padding: 12px 24px;
    justify-content: flex-start;
  }
  
  .portal-wrapper.menu-collapsed .portal-menu:hover .menu-link i {
    margin-right: 16px;
  }
}

/* Mobile Styles */
@media (max-width: 768px) {
  .portal-wrapper.menu-collapsed {
    margin-left: 0;
  }
  .portal-menu {
    transform: translateX(-100%);
  }
  
  .portal-menu.mobile-open {
    transform: translateX(0);
  }
  
  .portal-wrapper {
    margin-left: 0;
  }
  
  /* Mobile overlay */
  .menu-overlay {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
  }
  
  .menu-overlay.active {
    opacity: 1;
    visibility: visible;
  }
  
  .menu-toggle {
    right: -50px;
  }
  
  /* Mobile menu toggle button */
  .mobile-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    padding-left: 6px;
  }
  
  .mobile-menu-toggle .hamburger {
    width: 20px;
    height: 16px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }
  
  .mobile-menu-toggle .hamburger-bar {
    width: 100%;
    height: 2px;
    background-color: #64748b;
    border-radius: 1px;
    transition: all 0.3s ease;
  }
}

/* Hide mobile menu toggle on desktop */
.mobile-menu-toggle {
  display: none;
} 