/* ==========================================================================
   components/notifications.css — header bell, badge, and dropdown panel
   ========================================================================== */

.notif {
  position: relative;
  display: inline-flex;
}

.notif-bell {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: transparent;
  border: 0.5px solid var(--border);
  color: var(--text-m);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  padding: 0;
}

.notif-bell:hover {
  background: var(--surface2);
  color: var(--text);
}

.notif-bell svg {
  width: 18px;
  height: 18px;
}

.notif-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: #ef4444;
  color: #fff;
  font-family: var(--fm);
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
}

.notif-badge.is-hidden {
  display: none;
}

.notif-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 360px;
  max-width: calc(100vw - 24px);
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--rl);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  z-index: 100;
  overflow: hidden;
}

.notif-dropdown.is-hidden {
  display: none;
}

.notif-dropdown__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 0.5px solid var(--border);
}

.notif-dropdown__title {
  font-family: var(--fh);
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.1px;
}

.notif-dropdown__mark {
  background: transparent;
  border: 0;
  color: var(--accent);
  font-size: 12px;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  transition: background 0.15s;
}

.notif-dropdown__mark:hover {
  background: var(--surface2);
}

.notif-dropdown__mark:disabled {
  color: var(--text-d);
  cursor: default;
  background: transparent;
}

.notif-dropdown__body {
  max-height: 420px;
  overflow-y: auto;
}

.notif-item {
  display: flex;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 0.5px solid var(--border);
  cursor: default;
}

.notif-item:last-child {
  border-bottom: 0;
}

.notif-item--unread {
  background: var(--surface2);
}

.notif-item__icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface3);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.notif-item__icon--digest   { background: rgba(99, 102, 241, 0.18);  color: #a5b4fc; }
.notif-item__icon--instant  { background: rgba(34, 197, 94, 0.18);   color: #86efac; }
.notif-item__icon--test     { background: rgba(245, 158, 11, 0.18);  color: #fcd34d; }

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

.notif-item__msg {
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 3px;
  word-break: break-word;
}

.notif-item__meta {
  font-family: var(--fm);
  font-size: 11px;
  color: var(--text-d);
  display: flex;
  gap: 8px;
  align-items: center;
}

.notif-item__client {
  color: var(--text-m);
}

.notif-empty {
  padding: 32px 16px;
  text-align: center;
  color: var(--text-d);
  font-size: 12px;
}
