/* Variables de Colores */
:root {
  --color1: #41ba0d;
  --color2: #5dcb2a;
  --color3: #79dd46;
  --color4: #95ee63;
  --color5: #b1ff7f;
  --color6: #000000;
  --color-negro: #000000;
  --color-blanco: #ffffff;
  --color-gris: #333;
  --color-rojo: #ff0000;
  --color-verde: #41ba0d;
  --color-azul: #007BFF;
  --color-fondo: #ffffff;
  --color-hover: #f0f8ff;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --radius: 0.375rem;
}

/* Campana de notificaciones */
.notification-bell {
  position: relative;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  /* color blanco en móvil/pequeñas */
  color: var(--color-blanco);
  padding: 8px 12px;
  border-radius: var(--radius);
  transition: background-color 0.2s ease;
  z-index: 100;
}

/* A partir de 768px de ancho, color negro */
@media (min-width: 768px) {
  .notification-bell {
    color: var(--color-negro);
  }
}


.notification-bell:hover {
  background-color: var(--color2);
}

.notification-bell svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.notification-bell p {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 500;
  display: inline-block;
}

/* Contador */
.notification-count {
  top: 0;
  right: 0;
  background-color: var(--color-rojo);
  color: var(--color-blanco);
  border-radius: 50%;
  min-width: 18px;
  height: 18px;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  box-shadow: var(--shadow-sm);
  border: 2px solid var(--color-blanco);
  padding: 0 4px;
  transform: translate(40%, -30%);
}

/* Lista de notificaciones (desktop) */
#notification-list {
  display: none;
  position: absolute;
  top: 50px;
  right: 10px;
  width: 350px;
  max-height: 400px;
  overflow-y: auto;
  background-color: var(--color-blanco);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 0;
  z-index: 1000;
  text-align: left;
  border: 1px solid var(--color4);
}

/* Encabezado */
.notification-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 15px;
  background-color: var(--color1);
  color: white;
  border-top-left-radius: var(--radius);
  border-top-right-radius: var(--radius);
}

.notification-header h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.close-notifications {
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

/* Mostrar lista cuando la campana tenga la clase .active (solo desktop) */
.notification-bell.active + #notification-list {
  display: block;
  animation: fadeInDown 0.3s ease forwards;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Elemento de notificación */
.notification-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  margin-bottom: 8px;
  border-radius: var(--radius);
  background-color: var(--color-fondo);
  transition: background-color 0.2s ease;
  text-decoration: none;
  color: var(--color-gris);
  border-left: 3px solid var(--color1);
  box-shadow: var(--shadow-sm);
}

.notification-item:hover {
  background-color: var(--color5);
}

/* Ícono */
.notification-thumbnail {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  background-color: var(--color1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: bold;
  color: var(--color-blanco);
}

/* Contenido */
.notification-content {
  flex-grow: 1;
  font-size: 14px;
  line-height: 1.5;
  color: var(--color-gris);
}

.notification-content a {
  text-decoration: none;
  color: var(--color1);
  font-weight: 600;
}

.notification-content a:hover {
  text-decoration: underline;
}

.notification-time {
  font-size: 12px;
  color: #777;
  margin-top: 4px;
  display: block;
}

/* Notificación flotante */
.floating-notification {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 280px;
  background-color: var(--color1);
  color: var(--color-blanco);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 1001;
  animation: slideIn 0.5s forwards;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(100%);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.floating-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 15px;
  position: relative;
}

/* Estrellas */
.star-rating {
  margin-bottom: 10px;
  font-size: 20px;
  color: #FFD700;
}

/* Mensaje y botones */
#floating-message {
  font-size: 14px;
  text-align: center;
  margin-bottom: 15px;
}

#floating-action {
  background-color: var(--color-blanco);
  color: var(--color1);
  border: none;
  padding: 10px 15px;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.3s ease;
  width: 100%;
  margin-bottom: 5px;
}

#floating-action:hover {
  background-color: #f0f0f0;
}

#floating-close {
  position: absolute;
  top: 5px;
  right: 10px;
  background: none;
  border: none;
  color: var(--color-blanco);
  font-size: 20px;
  cursor: pointer;
  transition: color 0.3s ease;
}

#floating-close:hover {
  color: #cccccc;
}

/* Sin notificaciones */
.no-notifications {
  padding: 30px 15px;
  text-align: center;
  color: #777;
  font-size: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.no-notifications::before {
  content: "🔔";
  font-size: 24px;
  margin-bottom: 10px;
  opacity: 0.5;
}

/* Nota: Las reglas @media para móviles ya no se aplican ya que en pantallas ≤768 redirigimos a notifications_page.php */
