/* Floating Menu Widget */
.floating-menu-widget {
  position: fixed;
  left: 0;
  top: 50%;
  transform: translateY(-50%) translateX(-100%);
  z-index: 998;
  transition: transform 0.3s ease, opacity 0.3s ease;
  opacity: 0;
}

/* When visible, slide in */
.floating-menu-widget.visible {
  transform: translateY(-50%) translateX(0);
  opacity: 1;
}

.menu-widget-collapsed {
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
  color: white;
  padding: 16px 12px;
  border-radius: 0 10px 10px 0;
  box-shadow: 4px 0 12px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: all 0.3s ease;
}

.menu-widget-collapsed:hover {
  padding-left: 16px;
  box-shadow: 6px 0 16px rgba(0, 0, 0, 0.2);
}

.menu-text-vertical {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 2px;
}

.menu-widget-expanded {
  background: white;
  border-radius: 0 10px 10px 0;
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
  width: 250px;
  animation: slideInFromLeft 0.3s ease;
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  overflow: hidden;
}

@keyframes slideInFromLeft {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.menu-widget-header {
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0 10px 0 0;
}

.menu-logo {
  max-height: 40px;
  max-width: 200px;
  object-fit: contain;
}

.menu-company-name {
  font-size: 20px;
  font-weight: 700;
  color: white;
  text-align: center;
}

.menu-widget-title {
  padding: 16px 20px;
  border-bottom: 2px solid #e2e8f0;
  display: flex;
  align-items: center;
  font-weight: 700;
  font-size: 16px;
  color: #1e293b;
  background: #f8fafc;
}

.menu-widget-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 0;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  text-decoration: none;
  transition: all 0.2s ease;
  position: relative;
  border-left: 3px solid transparent;
}

.menu-item:hover {
  background: #f8fafc;
  border-left-color: #3b82f6;
  padding-left: 24px;
}

.menu-item:active {
  background: #f1f5f9;
}

.menu-item-content {
  flex: 1;
  min-width: 0;
}

.menu-item-title {
  font-size: 15px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 2px;
  transition: color 0.2s ease;
}

.menu-item:hover .menu-item-title {
  color: #3b82f6;
}

.menu-item-subtitle {
  font-size: 12px;
  color: #64748b;
}

.menu-item-arrow {
  font-size: 14px;
  color: #cbd5e1;
  transition: all 0.2s ease;
  opacity: 0;
}

.menu-item:hover .menu-item-arrow {
  color: #3b82f6;
  opacity: 1;
  transform: translateX(4px);
}

/* Scrollbar styling for menu body */
.menu-widget-body::-webkit-scrollbar {
  width: 6px;
}

.menu-widget-body::-webkit-scrollbar-track {
  background: #f1f5f9;
}

.menu-widget-body::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
}

.menu-widget-body::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .floating-menu-widget {
    left: -280px;
    transition: left 0.3s ease;
  }

  .floating-menu-widget.mobile-visible {
    left: 0;
  }

  .menu-widget-expanded {
    width: 280px;
    max-height: 100vh;
    border-radius: 0 10px 10px 0;
  }

  .menu-widget-collapsed {
    border-radius: 0 8px 8px 0;
  }
}

/* Active menu item styling */
.menu-item.active {
  background: #eff6ff;
  border-left-color: #3b82f6;
  padding-left: 24px;
}

.menu-item.active .menu-item-icon {
  background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
}

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

.menu-item.active .menu-item-title {
  color: #3b82f6;
}
