/* ==========================================================================
   Perfect Match — notification bell + toasts (V2 Track 1)
   Self-injected by public/js/notifications.js into #navUserActions. Reuses
   the design tokens already defined in style.css's :root block.
   ========================================================================== */

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

.pm-notif-bell {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--surface, rgba(255, 255, 255, 0.62));
  color: var(--text, #2b2740);
  font-size: 16px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
}
.pm-notif-bell:hover { background: var(--surface-strong, rgba(255, 255, 255, 0.82)); transform: translateY(-1px); }
.pm-notif-bell:active { transform: translateY(0); }

.pm-notif-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--pink, #FD79A8);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 2px var(--bg, #f6f4fd);
}

.pm-notif-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 320px;
  max-width: 88vw;
  max-height: 420px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--surface-solid, #fff);
  border: 1px solid var(--border-glass, rgba(255, 255, 255, 0.55));
  border-radius: var(--radius-md, 20px);
  box-shadow: var(--shadow-lg, 0 24px 64px rgba(90, 70, 180, 0.22));
  z-index: 500;
  animation: pmNotifPanelIn 0.16s ease;
}
@keyframes pmNotifPanelIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.pm-notif-panel-header {
  padding: 14px 18px;
  font-weight: 700;
  font-size: 14px;
  border-bottom: 1px solid rgba(108, 92, 231, 0.1);
}

.pm-notif-list {
  overflow-y: auto;
  padding: 6px;
}

.pm-notif-empty {
  padding: 28px 16px;
  text-align: center;
  color: var(--text-faint, #948fae);
  font-size: 13px;
}

.pm-notif-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm, 12px);
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s ease;
}
.pm-notif-item:hover { background: rgba(108, 92, 231, 0.08); }

.pm-notif-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gradient-soft, rgba(108, 92, 231, 0.12));
  color: var(--violet, #6C5CE7);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}

.pm-notif-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.pm-notif-text strong { font-size: 13px; color: var(--text, #2b2740); }
.pm-notif-text span {
  font-size: 12px;
  color: var(--text-muted, #6c6785);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Toast stack */
.pm-toast-stack {
  position: fixed;
  top: calc(var(--header-h, 76px) + 14px);
  right: 18px;
  z-index: 900;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 320px;
  pointer-events: none;
}

.pm-toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 16px;
  background: var(--surface-solid, #fff);
  border: 1px solid var(--border-glass, rgba(255, 255, 255, 0.55));
  border-radius: var(--radius-md, 20px);
  box-shadow: var(--shadow-md, 0 10px 34px rgba(90, 70, 180, 0.14));
  cursor: pointer;
  pointer-events: auto;
  opacity: 0;
  transform: translateX(24px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.pm-toast.show { opacity: 1; transform: translateX(0); }

.pm-toast-icon {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--gradient, linear-gradient(135deg, #6C5CE7 0%, #a86bd8 50%, #FD79A8 100%));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

.pm-toast-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pm-toast-body strong { font-size: 13px; color: var(--text, #2b2740); }
.pm-toast-body span {
  font-size: 12px;
  color: var(--text-muted, #6c6785);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 480px) {
  .pm-notif-panel { width: 92vw; right: -8px; }
  .pm-toast-stack { right: 10px; left: 10px; max-width: none; }
}
