/* Sidebar Badge Notifications */
.badge-notification {
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 50%;
  min-width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  animation: badgeSlideIn 0.3s ease-out;
  position: relative;
  z-index: 1;
}

/* Animación de entrada */
@keyframes badgeSlideIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Efecto de pulsación cuando hay notificaciones */
.badge-notification:not(:empty) {
  animation: badgeSlideIn 0.3s ease-out, badgePulse 2s infinite 1s;
}

@keyframes badgePulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

/* Estilos para el sidebar colapsado */
.vertical-collpsed .badge-notification {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 0.65rem;
  min-width: 16px;
  height: 16px;
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* Ajustes para diferentes tamaños de pantalla */
@media (max-width: 768px) {
  .badge-notification {
    font-size: 0.7rem;
    min-width: 16px;
    height: 16px;
  }
  
  .vertical-collpsed .badge-notification {
    font-size: 0.6rem;
    min-width: 14px;
    height: 14px;
    top: 6px;
    right: 6px;
  }
}

/* Hover effects para badges */
.list-group-item:hover .badge-notification {
  transform: scale(1.05);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

/* Colores específicos para diferentes tipos de notificaciones */
.badge-notification.bg-success {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%) !important;
}

.badge-notification.bg-primary {
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%) !important;
}

.badge-notification.bg-warning {
  background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%) !important;
  color: #212529 !important;
}

.badge-notification.bg-danger {
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%) !important;
}

/* Efecto de fade para badges con valor 0 */
.badge-notification:empty {
  display: none;
}

/* Tooltip para badges en sidebar colapsado */
.vertical-collpsed .list-group-item:hover .badge-notification::after {
  content: attr(title);
  position: absolute;
  top: 50%;
  left: 120%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  white-space: nowrap;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  opacity: 0;
  animation: tooltipFadeIn 0.3s ease-out 0.5s forwards;
}

@keyframes tooltipFadeIn {
  from {
    opacity: 0;
    transform: translateY(-50%) translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
  }
}

/* Flecha del tooltip */
.vertical-collpsed .list-group-item:hover .badge-notification::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 100%;
  transform: translateY(-50%);
  border: 4px solid transparent;
  border-right-color: rgba(0, 0, 0, 0.8);
  z-index: 1001;
  opacity: 0;
  animation: tooltipFadeIn 0.3s ease-out 0.5s forwards;
}

/* Estilos para modo oscuro */
body[data-sidebar="dark"] .badge-notification {
  border-color: #495057;
}

body[data-sidebar="dark"] .vertical-collpsed .list-group-item:hover .badge-notification::after {
  background: rgba(255, 255, 255, 0.9);
  color: #343a40;
}

body[data-sidebar="dark"] .vertical-collpsed .list-group-item:hover .badge-notification::before {
  border-right-color: rgba(255, 255, 255, 0.9);
} 