/* === CAMPANITA === */
.notification-bell {
  position: relative;
  cursor: pointer;
  margin-right: 25px;
  font-size: 1.8rem;
  color: #ffffff; /* Blanca */
  transition: transform 0.3s ease, filter 0.3s ease;
  filter: drop-shadow(0 0 8px rgba(255,255,255,0.5));
  display: flex;
  align-items: center;
  justify-content: center;
}

.notification-bell:hover {
  transform: scale(1.15);
  filter: drop-shadow(0 0 12px rgba(255,255,255,0.8));
}

/* Vibración si hay nuevas notificaciones */
.notification-bell.has-notifications i {
  animation: bellShake 1.2s ease-in-out infinite;
}

@keyframes bellShake {
  0%, 100% { transform: rotate(0); }
  25% { transform: rotate(-15deg); }
  75% { transform: rotate(15deg); }
}

/* Contador */
.notification-count {
  position: absolute;
  top: -6px;
  right: -6px;
  background: #ff4757;
  color: white;
  font-size: 0.75rem;
  font-weight: bold;
  border-radius: 50%;
  padding: 2px 7px;
  box-shadow: 0 0 10px rgba(255,71,87,0.5);
  transition: all 0.3s ease;
}

.notification-bell.has-notifications .notification-count {
  animation: pulseCount 1s ease-in-out infinite;
}

@keyframes pulseCount {
  0%, 100% { transform: scale(1); box-shadow: 0 0 10px rgba(255,71,87,0.6); }
  50% { transform: scale(1.2); box-shadow: 0 0 15px rgba(255,71,87,0.9); }
}

/* === PANEL === */
.notification-panel {
  position: fixed;
  top: 85px;
  right: 25px;
  width: 380px;
  max-height: 75vh;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  opacity: 0;
  transform: translateY(-20px);
  pointer-events: none;
  transition: all 0.5s ease;
  z-index: 9999;
}

.notification-panel.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

/* ENCABEZADO PANEL */
.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, #1d6ed8, #3b82f6);
  color: white;
  padding: 14px 18px;
  font-weight: 600;
}

.panel-header button {
  background: transparent;
  border: none;
  color: white;
  font-size: 1.3rem;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.panel-header button:hover {
  transform: rotate(90deg);
}

/* === LISTA === */
.notification-list {
  max-height: 60vh;
  overflow-y: auto;
  padding: 12px 16px;
}

.notification-list::-webkit-scrollbar {
  width: 6px;
}
.notification-list::-webkit-scrollbar-thumb {
  background: rgba(29,110,216,0.4);
  border-radius: 10px;
}

/* === ITEM === */
.notification-item {
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  animation: fadeIn 0.5s ease;
  transition: all 0.3s ease;
}

.notification-item.cerrando {
  opacity: 0;
  transform: translateX(30px);
}

/* COLORES SEGÚN SERVICIO */
.notification-item[data-servicio="agua"] {
  background: linear-gradient(135deg, #e3f2fd, #bbdefb);
  border-left: 6px solid #1d6ed8;
}

.notification-item[data-servicio="energia"] {
  background: linear-gradient(135deg, #fff9e6, #fff3b0);
  border-left: 6px solid #f1c40f;
}

.notification-item[data-servicio="gas"] {
  background: linear-gradient(135deg, #ffe6e6, #ffcccc);
  border-left: 6px solid #e74c3c;
}

/* CABECERA ITEM */
.notif-header {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  margin-bottom: 6px;
}

.notif-header[data-servicio="agua"] { color: #1d6ed8; }
.notif-header[data-servicio="energia"] { color: #f1c40f; }
.notif-header[data-servicio="gas"] { color: #e74c3c; }

.notif-header i {
  font-size: 1.3rem;
}

/* CUERPO */
.notif-body p {
  margin: 3px 0;
  font-size: 0.9rem;
  color: #333;
}

/* BOTÓN */
.btn-entendido {
  display: inline-block;
  background: linear-gradient(135deg, #1d6ed8, #3b82f6);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 7px 14px;
  font-size: 0.85rem;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-entendido:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 10px rgba(29,110,216,0.25);
}

/* VACÍO */
.empty-msg {
  text-align: center;
  color: #666;
  font-size: 0.9rem;
  margin: 20px 0;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 📱 RESPONSIVO TOTAL */
@media (max-width: 1024px) {
  .notification-panel {
    right: 15px;
    width: 340px;
    top: 80px;
  }
}

@media (max-width: 768px) {
  .notification-bell {
    font-size: 1.6rem;
    margin-right: 15px;
  }

  .notification-panel {
    right: 10px;
    width: 90%;
    top: 70px;
    border-radius: 12px;
  }

  .panel-header {
    padding: 12px 14px;
  }
}

@media (max-width: 480px) {
  .notification-bell {
    font-size: 1.4rem;
    margin-right: 10px;
  }

  .notification-count {
    font-size: 0.65rem;
    padding: 1px 5px;
    top: -4px;
    right: -4px;
  }

  .notification-panel {
    width: 95%;
    top: 65px;
    right: 2.5%;
    max-height: 70vh;
  }

  .notification-item {
    font-size: 0.85rem;
    padding: 10px;
  }

  .btn-entendido {
    font-size: 0.8rem;
    padding: 5px 10px;
  }
}

/* 🔔 Animación de rebote en contador */
@keyframes bellBounce {
  0%, 100% { transform: scale(1); }
  30% { transform: scale(1.3); }
  60% { transform: scale(0.9); }
  80% { transform: scale(1.1); }
}

.notification-bell .notification-count.bounce {
  animation: bellBounce 0.6s ease-in-out;
}

.notification-bell.has-notifications i {
  animation: glowPulse 2s infinite;
}

@keyframes glowPulse {
  0%, 100% { text-shadow: 0 0 4px rgba(255,255,255,0.5); }
  50% { text-shadow: 0 0 12px rgba(255,255,255,0.9); }
}
