/* ==========================================================
   Notification Bell — dropdown panel (desktop) / bottom sheet (mobile)
   Follows the filter-popover pattern.
   ========================================================== */

.notification-bell {
  position: relative;
}

.notification-bell__trigger {
  position: relative;
  line-height: 1;
}

/* Panel — desktop: positioned dropdown */
.notification-bell__panel {
  display: none;
  position: absolute;
  top: calc(100% + 0.75rem);
  right: 0;
  z-index: 1050;
  width: 380px;
  background: var(--bs-body-bg);
  border: 1px solid var(--bs-border-color);
  border-radius: 0.5rem;
  box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.12);
  overflow: hidden;
}

.notification-bell__panel--open {
  display: flex;
  flex-direction: column;
}

.notification-bell__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--bs-border-color);
}

.notification-bell__body {
  overflow-y: auto;
  max-height: 400px;
}

/* Backdrop — hidden by default */
.notification-bell__backdrop {
  display: none;
}

/* ----------------------------------------------------------
   Individual notification item
   ---------------------------------------------------------- */
.notification-bell__item {
  border-bottom: 1px solid var(--bs-border-color-translucent);
  transition: background-color 0.15s ease;
  position: relative;
}

.notification-bell__item:last-child {
  border-bottom: none;
}

.notification-bell__item:hover {
  background: rgba(var(--bs-primary-rgb), 0.03);
}

.notification-bell__item--unread {
  background: rgba(var(--bs-primary-rgb), 0.05);
}

.notification-bell__item--unread:hover {
  background: rgba(var(--bs-primary-rgb), 0.08);
}

.notification-bell__icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.875rem;
}

.notification-bell__link {
  color: inherit;
}

.notification-bell__title {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--bs-body-color);
  line-height: 1.3;
}

.notification-bell__text {
  font-size: var(--fs-sm);
  color: var(--bs-secondary-color);
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.notification-bell__time {
  font-size: var(--fs-xs);
  color: var(--bs-secondary-color);
}

.notification-bell__unread-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--bs-primary);
  flex-shrink: 0;
}


/* ----------------------------------------------------------
   Mobile: bottom sheet
   ---------------------------------------------------------- */
@media (max-width: 767.98px) {
  .notification-bell__panel {
    position: fixed;
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    max-height: 70vh;
    border-radius: 1rem 1rem 0 0;
    border: none;
    box-shadow: 0 -0.5rem 2rem rgba(0, 0, 0, 0.15);
    transform: translateY(100%);
    transition: transform 0.3s ease;
    z-index: 1060;
  }

  .notification-bell__panel--open {
    display: flex;
    transform: translateY(0);
  }

  .notification-bell__backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 1055;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
  }

  .notification-bell__backdrop--visible {
    display: block;
    opacity: 1;
    pointer-events: auto;
  }

  .notification-bell__body {
    max-height: none;
    overflow-y: auto;
    flex: 1;
  }
}
