:root {
  --nav-bg: #EEF2FA;
  --nav-text: #3D434A;
  --nav-border: #DDE1E6;
  --nav-hover-bg: #E4E9F1;
  --nav-muted-text: #A2A9B0;
  --nav-active-bg: #2344FB;
  --nav-active-text: #FFFFFF;
  --nav-divider: #C1C7CD;
  --nav-avatar-text: #E9ECFF;
  --nav-header-text: #697077;
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 998;
  height: 100vh;
  width: 64px;
  background-color: var(--nav-bg);
  display: flex;
  flex-direction: column;
  color: var(--nav-text);
  transition: width 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  border-right: 1px solid var(--nav-border);
  overflow-x: hidden;
  box-sizing: border-box;
}

.sidebar:hover, .sidebar.expanded {
  width: 152px;
  overflow: visible;
}

.sidebar:hover .nav-container .nav-item .icon-wrapper,
.sidebar.expanded .nav-container .nav-item .icon-wrapper {
  width: 40px;
}

.sidebar:hover .nav-container .nav-item .nav-label,
.sidebar.expanded .nav-container .nav-item .nav-label {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

.sidebar:hover .powered-by-label,
.sidebar.expanded .powered-by-label {
  opacity: 1;
  visibility: visible;
  width: auto;
  transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out;
  transition-delay: 0.28s;
}

.sidebar.mobile-header {
  width: 100%;
  height: 48px;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.sidebar.mobile-header:hover, .sidebar.mobile-header.expanded {
  width: 100%;
}

.sidebar.mobile-header .logo-container {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  text-decoration: none;
}

.sidebar.mobile-header .mobile-menu-container {
  position: relative;
}

.sidebar.mobile-header .mobile-menu-container .mobile-hamburger-btn {
  background: transparent;
  border: none;
  padding: 8px;
  cursor: pointer;
  outline: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar.mobile-header .mobile-menu-container .mobile-hamburger-btn .nav-menu-icon-bars {
  width: 20px;
  height: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.sidebar.mobile-header .mobile-menu-container .mobile-hamburger-btn .nav-menu-icon-bars span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--nav-text);
  border-radius: 1px;
}

.sidebar.mobile-header .mobile-menu-container .mobile-dropdown-menu {
  position: absolute;
  right: -6px;
  top: 100%;
  margin-top: 8px;
  width: 180px;
  background-color: var(--nav-bg);
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  z-index: 1001;
}

.sidebar.mobile-header .mobile-menu-container .mobile-dropdown-menu .dropdown-link {
  color: var(--nav-text);
  padding: 10px 12px;
  display: block;
  text-decoration: none;
}

.sidebar.mobile-header .mobile-menu-container .mobile-dropdown-menu .dropdown-link:hover {
  background-color: var(--nav-hover-bg);
}

/* Brand Section */
.brand-section {
  padding: 16px 8px 8px 8px;
  display: flex;
  justify-content: left;
  width: 100%;
  box-sizing: border-box;
}

.brand-section .logo-container {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 48px;
  height: 44px;
  cursor: pointer;
}

.brand-section .logo-container .company-logo {
  width: 28px;
  height: 28px;
  background-image: url("../images/contify-logo-dark.svg");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.brand-section .powered-by-label {
  display: none;
  align-items: end;
  font-size: 10px;
  font-weight: 400;
  color: var(--nav-muted-text);
  padding: 0;
  position: relative;
  bottom: 6px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  width: 0;
  overflow: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease, width 0.2s ease;
}

/* Navigation Container */
.nav-container {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 0 8px;
  box-sizing: border-box;
}

/* Navigation Item */
.nav-container .nav-item {
  display: flex;
  align-items: center;
  height: 44px;
  text-decoration: none;
  color: var(--nav-text);
  border-radius: 8px;
  margin: 4px 0;
  transition: background-color 0.2s, color 0.2s;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  outline: none;
}

.nav-container .nav-item .icon-wrapper {
  width: 44px;
  height: 44px;
  padding: 11px 14px;
  box-sizing: border-box;
}

.nav-container .nav-item .icon-wrapper img {
  filter: brightness(0) saturate(100%) invert(21%) sepia(6%) saturate(1246%) hue-rotate(172deg) brightness(94%) contrast(79%);
}

.nav-container .nav-item .nav-icon {
  width: 20px;
  height: 20px;
  transition: transform 0.2s;
}

.nav-container .nav-item .nav-label {
  font-size: 14px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-10px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}

.nav-container .nav-item:hover, 
.nav-container .nav-item.hovered {
  background-color: var(--nav-hover-bg);
}

.nav-container .nav-item.active {
  background-color: var(--nav-active-bg);
  color: var(--nav-active-text);
}

.nav-container .nav-item.active .icon-wrapper img {
  filter: brightness(0) saturate(100%) invert(100%) sepia(0%) saturate(7459%) hue-rotate(346deg) brightness(120%) contrast(102%);
}

/* Dividers */
.divider {
  height: 0.5px;
  background-color: var(--nav-divider);
  margin: 8px 4px;
}

/* User Profile Section */
.user-section-wrapper {
  position: relative;
  width: 100%;
  margin-top: auto;
  cursor: pointer;
  padding: 16px 8px;
  box-sizing: border-box;
}

.avatar-badge {
  width: 32px;
  height: 32px;
  background-color: var(--nav-active-bg);
  color: var(--nav-avatar-text);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  font-size: 12px;
  flex-shrink: 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.user-section {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 48px;
  height: 44px;
}

/* Dropdown styles */
.nav-item-wrapper {
  position: relative;
  width: 100%;
}

.sidebar-dropdown {
  position: absolute;
  left: 100%;
  top: 4px;
  width: 254px;
  background-color: var(--nav-bg);
  border-radius: 8px;
  box-shadow: 0 0 16px 0 rgba(0, 0, 0, 0.16);
  padding: 8px;
  z-index: 1001;
  margin-left: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: none;
}

/* Bridge the visual gap to keep hover focus stable */
.sidebar-dropdown::before {
  content: '';
  position: absolute;
  top: 0;
  left: -16px;
  width: 16px;
  height: 100%;
  background: transparent;
}

/* Show dropdown on hover of wrapper */
.nav-item-wrapper:hover > .sidebar-dropdown,
.user-section-wrapper:hover > .user-dropdown {
  display: block;
}

.sidebar-dropdown .dropdown-header {
  font-size: 12px;
  letter-spacing: 0.88px;
  font-weight: 500;
  color: var(--nav-header-text);
  padding: 11px 0;
}

.sidebar-dropdown .dropdown-list {
  display: flex;
  flex-direction: column;
}

.sidebar-dropdown .dropdown-link {
  font-size: 14px;
  font-weight: 400;
  color: var(--nav-text);
  border-radius: 8px;
  padding: 10px 8px 10px 12px;
  height: 40px;
  text-decoration: none;
  transition: background-color 0.15s, color 0.15s;
  box-sizing: border-box;
  display: block;
}

.sidebar-dropdown .dropdown-link:hover {
  background-color: #FFFFFFCC;
}

.sidebar-dropdown .dropdown-link.active {
  background-color: var(--nav-hover-bg);
}

.sidebar-dropdown .dropdown-separator {
  height: 0.5px;
  background-color: var(--nav-divider);
  margin: 8px 0;
}

.user-dropdown {
  bottom: 12px;
  top: auto;
  margin-left: 8px;
  width: max-content;
  min-width: 220px;
}

.user-dropdown-header {
  display: flex;
  align-items: center;
  padding: 5px 12px;
}

.user-dropdown-header .user-details {
  display: flex;
  flex-direction: column;
  margin-left: 8px;
  overflow: hidden;
}

.user-dropdown-header .user-details .detail-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--nav-text);
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.user-dropdown-header .user-details .detail-email {
  font-size: 12px;
  color: var(--nav-text);
  margin-top: 2px;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.user-dropdown .info-links a {
  color: var(--nav-text);
  font-size: 12px;
  padding: 5px 8px;
  text-decoration: none;
}

.analyst-section {
  padding: 8px 12px;
}

.analyst-section .analyst-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--nav-text);
}

.analyst-section .analyst-info {
  font-size: 14px;
  font-weight: 500;
  color: var(--nav-text);
  margin-top: 2px;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

/* Dashboard dropdown specific styles */
.dashboard-dropdown-panel {
  max-height: 320px;
  padding: 8px 0;
  overflow: visible !important;
}

.dashboard-dropdown-panel .dropdown-header {
  padding: 11px 8px 11px 12px;
  margin: 0 8px;
}

.dashboard-dropdown-panel .dropdown-separator {
  margin: 8px;
}

.dashboard-dropdown-panel .group-item {
  padding: 0 8px;
}

.scrollable-list {
  max-height: 280px;
  overflow-y: auto;
}

.scrollable-list::-webkit-scrollbar {
  width: 6px;
}

.scrollable-list::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.15);
  border-radius: 3px;
}

.group-item {
  display: block;
}

.group-link {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
}

.group-link .group-icon-text {
  display: flex;
  align-items: center;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  width: 85%;
}

.group-link .chevron-right {
  margin-left: auto;
  flex-shrink: 0;
  transition: transform 0.2s;
}

.group-link.active-group,
.group-link.active-group:hover{
  background-color: var(--nav-hover-bg);
}

.nested-sidebar-dropdown {
  position: absolute;
  left: 100%;
  top: -8px;
  width: 200px;
  background-color: var(--nav-bg);
  border-radius: 8px;
  box-shadow: 0 0 16px 0 rgba(0, 0, 0, 0.16);
  z-index: 1002;
  margin-left: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: none;
}

.nested-sidebar-dropdown::before {
  content: '';
  position: absolute;
  top: 0;
  left: -12px;
  width: 12px;
  height: 100%;
  background: transparent;
}

.dropdown-loading {
  padding: 12px;
  color: var(--nav-muted-text);
  font-size: 14px;
  text-align: center;
}

.sidebar.mobile-header lib-ask-athena {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
}

.sidebar.mobile-header lib-ask-athena .nav-item {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--nav-divider);
  border-radius: 4px;
  padding: 4px 11px;
}

.sidebar.mobile-header lib-ask-athena .icon-wrapper img {
  margin-right: 8px;
}

@media (max-width: 768px) {
  body {
    margin-left: 0 !important;
    padding-top: 48px !important;
  }
}

/*  Marquee Style goes here  */
.notification-bar {
  display: flex;
  justify-content: center;
  width: 100%;
  height: 40px;
  background: #FCF4D6;
  position: fixed;
  top: 0;
  z-index: 101;
  padding: 11px 40px 11px 16px;
}
.notification-bar > span {
  font-size: 14px !important;
  line-height: 18px !important;
  overflow: hidden;
  white-space: nowrap;
  position: relative;
}
.notification-bar > span > p {
  display: inline-block;
  /*padding-left: 100%;*/
}
.notification-bar .is-scrolling > p {
  animation: marquee 40s linear 0s infinite;
  padding-left: 100%;
}
.notification-bar:hover .is-scrolling > p {
  animation-play-state: paused;
}
.notification-bar p {
  margin: 0;
}
.notification-bar a {
  color: #2344FB;
  cursor: pointer;
}
.notification-bar a:hover {
  color: #1937DC;
}
@keyframes marquee {
  0% {
    transform: translateX(0%); /* Start from right outside the container */
  }
  100% {
    transform: translateX(-100%); /* End at left outside the container */
  }
}

.remove-notify--btn {
  cursor: pointer;
  position: absolute;
  right: 12px;
  display: flex;
  justify-content: center;
  text-align: center;
}

#notifyBar ~ .nav-header-container {
  top: 40px;
}

#athena-desktop-placeholder .tooltip {
  width: 250px;
}
