.update-count {
  position: absolute; /* Prevent height changes in surrounding layout */
  top: 0;
  right: 0;
  display: inline-block;
  box-sizing: border-box;
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  background-color: #f44336;
  color: white;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 500;
  line-height: 18px;
  text-align: center;
  vertical-align: top;
  will-change: transform, opacity;
  backface-visibility: hidden;
}

.update-count-wrapper {
  position: relative;
  display: inline-block;
  vertical-align: top;
  height: 16px;
  line-height: 16px;
  z-index: 1;
}

@keyframes slide-up {
  0% {
    transform: translateY(10px);
    opacity: 0;
  }
  60% {
    transform: translateY(-2px);
    opacity: 1;
  }
  100% {
    transform: translateY(0);
  }
}

@keyframes slide-out-up {
  0% {
    transform: translateY(0);
    opacity: 1;
  }
  100% {
    transform: translateY(-10px) scale(0.95);
    opacity: 0;
  }
}

@keyframes slide-down {
  0% {
    transform: translateY(-10px);
    opacity: 0;
  }
  60% {
    transform: translateY(2px);
    opacity: 1;
  }
  100% {
    transform: translateY(0);
  }
}

@keyframes slide-out-down {
  0% {
    transform: translateY(0);
    opacity: 1;
  }
  100% {
    transform: translateY(10px) scale(0.95);
    opacity: 0;
  }
}

.update-count.slide-up {
  animation: slide-up 0.35s forwards cubic-bezier(0.4, 0, 0.2, 1);
}

.update-count.slide-down {
  animation: slide-down 0.35s forwards cubic-bezier(0.4, 0, 0.2, 1);
}

.update-count.slide-out {
  animation: slide-out-up 0.3s forwards cubic-bezier(0.4, 0, 0.2, 1);
}

.update-count.slide-out-down {
  animation: slide-out-down 0.3s forwards cubic-bezier(0.4, 0, 0.2, 1);
}

/* Position notification count to align with dropdown arrows on other menu items */

/* Make the notifications menu title a positioning context */
a[href*="notifications"].menu-title {
  position: relative !important;
}

/* Override ALL default positioning to align with dropdown arrows */
a[href*="notifications"] .update-count {
  position: absolute !important;
  right: 16px !important; /* Same position as dropdown arrows */
  top: 50% !important;
  left: auto !important; /* Override any left positioning */
  transform: translateY(-50%) !important;
  margin: 0 !important; /* Remove any margins that could offset positioning */
  animation: none !important; /* Disable animations that interfere */
}

/* Ensure wrapper doesn't interfere */
a[href*="notifications"] .update-count-wrapper {
  position: static !important;
  width: auto !important;
  height: auto !important;
}