.notifications-dropdown {
  right: 0;
  left: auto;
  width: min(100vw - 1.5rem, 420px);
  max-width: 420px;
  max-height: 70vh;
  overflow: hidden;
}

.notifications-dropdown.show {
  display: flex;
  flex-direction: column;
}

.notifications-header {
  padding: 0.85rem 1rem;
}

.notifications-header [data-role="notifications-title"] {
  font-size: 12px;
}

.notifications-header [data-role="notifications-subtitle"] {
  font-size: 9px;
}

.notifications-header,
.notifications-dropdown .dropdown-divider,
.notifications-dropdown .dropdown-footer {
  flex-shrink: 0;
}

.notifications-actions .btn-link {
  color: #0d6efd;
}

.notifications-body {
  max-height: none;
  overflow-y: auto;
  padding: 0.25rem 0;
  flex: 1 1 auto;
}

.notification-section {
  border-bottom: 1px solid #f1f2f3;
}

.notification-section:last-child {
  border-bottom: 0;
}

.notification-section .section-toggle {
  width: 100%;
  padding: 0.85rem 1rem;
  background: transparent;
  border: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.notification-section .section-toggle:focus {
  outline: 2px solid #0d6efd;
  outline-offset: -2px;
}

.notification-section .section-label {
  font-weight: 600;
  font-size: 12px;
}

.notification-section .section-count {
  font-size: 9px;
}

.notification-list {
  list-style: none;
  margin: 0;
  padding: 0 0.5rem;
}

.notification-item {
  display: flex;
  align-items: flex-start;
  padding: 0.75rem;
  border-radius: 0.5rem;
  transition: background-color 0.2s ease;
}

.notification-item:hover,
.notification-item:focus {
  background-color: #f6f9fc;
  text-decoration: none;
}

.notification-item .icon-wrapper {
  width: 36px;
  min-width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin-right: 0.75rem;
  font-size: 0.95rem;
}

.notification-item .content {
  flex: 1;
  min-width: 0;
}

.notification-item .title {
  font-weight: 600;
  margin-bottom: 0.15rem;
  font-size: 12px;
}

.notification-item .title.text-truncate {
  max-width: 100%;
}

.notification-item .description {
  font-size: 0.75rem;
  color: #6c757d;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 0.35rem;
}

.notification-item .meta {
  font-size: 9px;
  color: #adb5bd;
}

.notification-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  background-color: #dc3545;
  margin-left: 0.4rem;
}

.notification-item.unread {
  background-color: #f8fbff;
}

.notification-item.unread .title::after {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #0d6efd;
  margin-left: 0.5rem;
}

.notification-item.notification-read {
  color: #6c757d;
}

.notification-item.notification-read .title,
.notification-item.notification-read .description,
.notification-item.notification-read .meta,
.notification-item.notification-read .icon-wrapper {
  color: #6c757d;
  opacity: 0.85;
}

.notification-load-more {
  padding: 0.65rem 1rem;
  text-align: center;
}

.notification-load-more .btn {
  min-width: 160px;
}

@media (min-width: 577px) and (max-width: 991.98px) {
  .notifications-dropdown {
    left: 0;
    right: 0;
    width: min(90vw, 640px);
    max-width: min(90vw, 640px);
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 767.98px) {
  .notifications-dropdown {
    left: 0;
    right: 0;
    width: calc(100vw - 1rem);
    max-width: calc(100vw - 1rem);
  }

  .notification-item {
    padding: 0.85rem 0.5rem;
  }
}

.notifications-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 1025;
}

body.notifications-overlay-open {
  overflow: hidden;
}

.notifications-dropdown.notifications-overlay {
  position: fixed !important;
  top: 0;
  left: 0;
  right: 0;
  width: 100vw;
  max-width: 100vw;
  height: 100vh;
  max-height: 100vh;
  border-radius: 0;
  margin: 0;
  z-index: 1032;
  display: flex;
  flex-direction: column;
  transform: none !important;
}

@media (max-width: 767.98px) {
  .notifications-dropdown.notifications-overlay {
    width: 100vw;
    max-width: 100vw;
  }
}

.notifications-dropdown.notifications-overlay .notifications-header,
.notifications-dropdown.notifications-overlay .dropdown-divider,
.notifications-dropdown.notifications-overlay .dropdown-footer {
  padding-left: 1rem;
  padding-right: 1rem;
}

.notifications-dropdown.notifications-overlay .notifications-body {
  flex: 1 1 auto;
  overflow-y: auto;
  max-height: none;
  padding-left: 1rem;
  padding-right: 1rem;
}

.notifications-dropdown.notifications-overlay .dropdown-footer {
  text-align: center;
}
