/* Notification bell dropdown */

.notification-bell.dropdown-toggle::after {
  display: none !important;
}

.notification-bell-trigger {
  position: relative;
  width: 2.5rem;
  height: 2.5rem;
  transition: background 0.15s ease;
}

.notification-bell:hover .notification-bell-trigger,
.notification-bell[aria-expanded="true"] .notification-bell-trigger {
  background: var(--bs-light, #f8f9fa);
}

.notification-badge-count {
  top: 0;
  right: 0;
  transform: translate(25%, -25%);
  font-size: 0.65rem;
  min-width: 1.125rem;
  padding: 0.25em 0.45em;
  border: 2px solid var(--bs-body-bg, #fff);
  z-index: 1;
}

#notification-bell-wrap {
  position: static;
}

/* Hidden unless Bootstrap opens the dropdown */
#notification-bell-wrap .notification-dropdown-menu:not(.show) {
  display: none !important;
}

.notification-dropdown-menu {
  min-width: 0 !important;
  width: 22rem;
  max-width: min(34rem, calc(100vw - 1rem));
  background: #fff;
  overflow: hidden;
  z-index: 1070;
}

.notification-dropdown-header-icon {
  width: 2.25rem;
  height: 2.25rem;
}

.notification-dropdown-subtitle {
  padding-left: calc(2.25rem + 0.5rem);
}

.notification-items-list {
  max-height: 16rem;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.notification-items-list .notification-item + .notification-item {
  margin-top: 0.625rem;
}

.notification-items-list::-webkit-scrollbar {
  width: 5px;
}

.notification-items-list::-webkit-scrollbar-thumb {
  background: var(--bs-border-color, #dee2e6);
  border-radius: 999px;
}

.notification-item {
  display: flex;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}

.notification-item--dropdown {
  padding: 0.875rem 1rem;
}

.notification-item--center {
  padding: 1.125rem 1.25rem;
}

.notification-item-icon-wrap {
  width: 2.5rem;
  height: 2.5rem;
}

.notification-item--center .notification-item-icon-wrap {
  width: 3rem;
  height: 3rem;
}

.notification-item-icon-wrap svg {
  width: 1.125rem;
  height: 1.125rem;
}

.notification-item-category {
  font-size: 0.65rem;
  letter-spacing: 0.04em;
  font-weight: 600;
}

.notification-item-title {
  font-size: 0.875rem;
  line-height: 1.35;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}

.notification-item-body {
  font-size: 0.8125rem;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}

.notification-item-count {
  font-size: 0.7rem;
  min-width: 1.375rem;
  padding: 0.35em 0.5em;
}

.notification-dropdown-footer:hover {
  background: rgba(13, 110, 253, 0.08) !important;
}

.notification-empty--dropdown {
  padding: 2rem 1.25rem;
}

.notification-empty-icon {
  width: 3.5rem;
  height: 3.5rem;
}

.notification-center-card .notification-item + .notification-item {
  margin-top: 0.75rem;
}

/* Mobile: fit viewport width, anchored under the bell — no fixed overlay */
@media (max-width: 767.98px) {
  #notification-bell-wrap .notification-dropdown-menu {
    position: fixed !important;
    top: 3.25rem !important;
    left: 0.75rem !important;
    right: 0.75rem !important;
    width: auto !important;
    max-width: none !important;
    max-height: min(70vh, calc(100vh - 4.5rem)) !important;
    margin: 0 !important;
    transform: none !important;
    display: none !important;
    flex-direction: column;
    overflow: hidden;
  }

  #notification-bell-wrap .notification-dropdown-menu.show {
    display: flex !important;
  }

  #notification-bell-wrap .notification-items-list {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow-y: scroll;
  }

  .notification-dropdown-subtitle {
    padding-left: 0;
  }

  .notification-item--dropdown {
    padding: 0.75rem 0.875rem;
  }

  .notification-item--dropdown .notification-item-body {
    -webkit-line-clamp: 2;
  }
}

@media (max-width: 575.98px) {
  #notification-bell-wrap .notification-dropdown-menu {
    left: 0.5rem !important;
    right: 0.5rem !important;
  }
}
