/* ==========================================================================
   TyeePress Notifications — Facebook-Style Bell & Dropdown Panel
   ========================================================================== */
:root {
  --tyee-notif-bell: #111111;
  --tyee-notif-badge-bg: #e41e3f;
  --tyee-notif-badge-text: #ffffff;
  --tyee-notif-unread-bg: #eef5ff;
  --tyee-notif-dot: #1877f2;
}

.tyee-notif-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.tyee-notif-bell-btn {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--tyee-border);
  background: var(--tyee-surface);
  color: var(--tyee-notif-bell);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.12s ease;
}

.tyee-notif-bell-btn:hover {
  background-color: var(--tyee-border);
  transform: scale(1.04);
}

.tyee-notif-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 999px;
  background-color: var(--tyee-notif-badge-bg);
  color: var(--tyee-notif-badge-text);
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 19px;
  text-align: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
  display: none;
}

.tyee-notif-badge.has-unread {
  display: inline-block;
}

/* Dropdown Panel */
.tyee-notif-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 360px;
  max-width: calc(100vw - 24px);
  background: var(--tyee-bg);
  color: var(--tyee-text);
  border: 1px solid var(--tyee-border);
  border-radius: 10px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.18);
  z-index: 2000;
  display: none;
  overflow: hidden;
}

.tyee-notif-panel.is-open {
  display: block;
}

.tyee-notif-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 8px;
}

.tyee-notif-panel__title {
  font-family: var(--tyee-font-sans);
  font-size: 1.25rem;
  font-weight: 800;
  margin: 0;
  color: var(--tyee-heading);
}

.tyee-notif-mark-all {
  background: none;
  border: none;
  color: var(--tyee-link);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
}

.tyee-notif-mark-all:hover {
  background: var(--tyee-surface);
}

.tyee-notif-tabs {
  display: flex;
  gap: 8px;
  padding: 0 16px 10px;
  border-bottom: 1px solid var(--tyee-border);
}

.tyee-notif-tab {
  background: transparent;
  border: none;
  padding: 6px 12px;
  border-radius: 18px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--tyee-meta);
  cursor: pointer;
}

.tyee-notif-tab.is-active {
  background: var(--tyee-notif-unread-bg);
  color: var(--tyee-notif-dot);
}

.tyee-notif-list {
  max-height: 400px;
  overflow-y: auto;
  list-style: none;
  margin: 0;
  padding: 6px;
}

.tyee-notif-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 8px;
  text-decoration: none !important;
  color: var(--tyee-text);
  transition: background-color 0.12s ease;
  position: relative;
}

.tyee-notif-item:hover {
  background-color: var(--tyee-surface);
}

.tyee-notif-item.is-unread {
  background-color: var(--tyee-notif-unread-bg);
}

.tyee-notif-avatar-wrap {
  position: relative;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}

.tyee-notif-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--tyee-border);
}

.tyee-notif-type-icon {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--tyee-notif-dot);
  color: #ffffff;
  font-size: 0.62rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--tyee-bg);
}

.tyee-notif-type-icon--alert { background: #e41e3f; }
.tyee-notif-type-icon--story { background: #e1306c; }

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

.tyee-notif-text {
  font-size: 0.875rem;
  line-height: 1.35;
  margin: 0 0 3px;
  color: var(--tyee-heading);
}

.tyee-notif-text strong {
  font-weight: 700;
}

.tyee-notif-time {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--tyee-notif-dot);
}

.tyee-notif-item:not(.is-unread) .tyee-notif-time {
  color: var(--tyee-meta);
}

.tyee-notif-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--tyee-notif-dot);
  flex-shrink: 0;
  display: none;
}

.tyee-notif-item.is-unread .tyee-notif-dot {
  display: block;
}

.tyee-notif-empty {
  padding: 28px 16px;
  text-align: center;
  color: var(--tyee-meta);
  font-size: 0.9rem;
}
