.notifications-panel {
  position: fixed;
  bottom: 4.75rem;
  left: 0.75rem;
  width: min(360px, calc(100vw - 1.5rem));
  height: min(420px, calc(100vh - var(--header-height, 4rem) - 6rem));
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  z-index: 160;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px) scale(0.98);
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
  overflow: hidden;
}

.notifications-panel.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.notifications-panel-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 0.9rem;
  border-bottom: 1px solid #eee;
  background: #fff;
  flex-shrink: 0;
}

.notifications-panel-header h2 {
  flex: 1;
  font-size: 1rem;
  font-weight: 700;
  color: #1c1e21;
  margin: 0;
}

.notifications-close-btn {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: #f0f2f5;
  color: #65676b;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}

.notifications-close-btn:hover {
  background: #e4e6eb;
}

.notifications-list {
  flex: 1;
  overflow-y: auto;
  padding: 0.35rem 0;
}

.notifications-empty {
  padding: 2rem 1rem;
  text-align: center;
  color: #65676b;
  font-size: 0.9rem;
}

.notifications-item {
  width: 100%;
  border: none;
  background: none;
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.75rem 0.85rem;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
}

.notifications-item:hover {
  background: #f0f2f5;
}

.notifications-item.unread {
  background: rgba(24, 119, 242, 0.06);
}

.notifications-item.unread:hover {
  background: rgba(24, 119, 242, 0.1);
}

.notifications-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1rem;
}

.notifications-icon--like {
  background: rgba(228, 30, 63, 0.12);
  color: #e41e3f;
}

.notifications-icon--repost {
  background: rgba(24, 119, 242, 0.12);
  color: #1877f2;
}

.notifications-icon--comment,
.notifications-icon--reply {
  background: rgba(45, 136, 72, 0.12);
  color: #2d8848;
}

.notifications-body {
  flex: 1;
  min-width: 0;
}

.notifications-text {
  font-size: 0.88rem;
  line-height: 1.4;
  color: #1c1e21;
}

.notifications-text strong {
  font-weight: 700;
}

.notifications-meta {
  margin-top: 0.2rem;
  font-size: 0.75rem;
  color: #65676b;
}

.notifications-preview {
  margin-top: 0.35rem;
  font-size: 0.8rem;
  color: #65676b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#globalNotificationsBtn.has-unread::after {
  content: '';
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e41e3f;
  border: 2px solid rgba(11, 18, 32, 0.72);
}

#globalNotificationsBtn {
  position: relative;
}

@media (max-width: 640px) {
  .notifications-panel {
    bottom: 4.25rem;
    left: 0.5rem;
    width: calc(100vw - 1rem);
    height: min(380px, calc(100vh - 7rem));
  }
}
