/* ══════════════════════════════════════════════════════════════
   NOTIFICATION SYSTEM — CRT Terminal Aesthetic
   Bell, dropdown panel, toast popups
   ══════════════════════════════════════════════════════════════ */

/* ── Bell Icon ───────────────────────────────────────────── */
.wm-notif-bell-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.2s ease;
  margin: 0 6px;
}
.wm-notif-bell-wrap:hover {
  background: rgba(74, 255, 204, 0.06);
}
.wm-notif-bell--active {
  background: rgba(74, 255, 204, 0.1);
}

.wm-notif-bell-icon {
  color: rgba(224, 216, 240, 0.5);
  transition: color 0.2s ease;
}
.wm-notif-bell-wrap:hover .wm-notif-bell-icon {
  color: var(--accent2, #4affcc);
}
.wm-notif-bell--has-unread .wm-notif-bell-icon {
  color: var(--accent2, #4affcc);
  filter: drop-shadow(0 0 4px rgba(74, 255, 204, 0.3));
  animation: notif-bell-glow 3s ease-in-out infinite;
}

@keyframes notif-bell-glow {
  0%, 100% { filter: drop-shadow(0 0 4px rgba(74, 255, 204, 0.2)); }
  50%      { filter: drop-shadow(0 0 8px rgba(74, 255, 204, 0.5)); }
}

/* ── Unread Badge ────────────────────────────────────────── */
.wm-notif-badge {
  position: absolute;
  top: 2px;
  right: 0;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  background: var(--hot, #ff3c78);
  color: #fff;
  font-family: 'Space Mono', monospace;
  font-size: 9px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  border-radius: 8px;
  box-shadow: 0 0 8px rgba(255, 60, 120, 0.4);
  animation: notif-badge-pop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes notif-badge-pop {
  0%   { transform: scale(0); }
  100% { transform: scale(1); }
}

/* ── Dropdown Panel ──────────────────────────────────────── */
.wm-notif-panel {
  position: absolute;
  top: 100%;
  right: 0;
  width: 340px;
  max-height: 420px;
  background: var(--bg-card, #08061a);
  border: 1px solid rgba(74, 255, 204, 0.12);
  border-radius: 6px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6),
              0 0 20px rgba(74, 255, 204, 0.04);
  z-index: 1000;
  display: none;
  flex-direction: column;
  overflow: hidden;
}
.wm-notif-panel--open {
  display: flex;
  animation: notif-panel-in 0.2s ease-out;
}

@keyframes notif-panel-in {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Panel header */
.wm-notif-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(74, 255, 204, 0.06);
}
.wm-notif-panel-title {
  font-family: 'Space Mono', monospace;
  font-size: 9px;
  letter-spacing: 2px;
  color: rgba(74, 255, 204, 0.4);
}
.wm-notif-panel-actions {
  display: flex;
  gap: 4px;
}
.wm-notif-action-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.3);
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  width: 24px;
  height: 24px;
  cursor: pointer;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.wm-notif-action-btn:hover {
  border-color: rgba(74, 255, 204, 0.3);
  color: var(--accent2, #4affcc);
  background: rgba(74, 255, 204, 0.05);
}

/* Panel list */
.wm-notif-panel-list {
  overflow-y: auto;
  flex: 1;
  max-height: 360px;
}
.wm-notif-panel-list::-webkit-scrollbar {
  width: 4px;
}
.wm-notif-panel-list::-webkit-scrollbar-thumb {
  background: rgba(74, 255, 204, 0.15);
  border-radius: 2px;
}

/* ── Notification Item ───────────────────────────────────── */
.wm-notif-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  transition: background 0.2s ease, opacity 0.3s ease, max-height 0.3s ease;
  background: rgba(74, 255, 204, 0.02);
}
.wm-notif-item--read {
  background: transparent;
}
.wm-notif-item--clickable {
  cursor: pointer;
}
.wm-notif-item--clickable:hover {
  background: rgba(74, 255, 204, 0.04);
}
.wm-notif-item--exiting {
  opacity: 0;
  max-height: 0;
  padding: 0 14px;
  overflow: hidden;
}

.wm-notif-item-icon {
  font-size: 14px;
  flex-shrink: 0;
  margin-top: 1px;
}

.wm-notif-item-content {
  flex: 1;
  min-width: 0;
}
.wm-notif-item-title {
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  color: var(--text, #e0d8f0);
  line-height: 1.3;
}
.wm-notif-item--read .wm-notif-item-title {
  color: rgba(224, 216, 240, 0.5);
}
.wm-notif-item-body {
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  color: rgba(224, 216, 240, 0.35);
  line-height: 1.3;
  margin-top: 2px;
}

.wm-notif-item-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}
.wm-notif-item-time {
  font-family: 'Space Mono', monospace;
  font-size: 8px;
  color: rgba(255, 255, 255, 0.2);
  letter-spacing: 0.5px;
  white-space: nowrap;
}
.wm-notif-item-dismiss {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.15);
  font-size: 10px;
  cursor: pointer;
  padding: 2px;
  transition: color 0.2s ease;
  font-family: 'Space Mono', monospace;
}
.wm-notif-item-dismiss:hover {
  color: var(--hot, #ff3c78);
}

/* Empty state */
.wm-notif-empty {
  padding: 32px 14px;
  text-align: center;
  font-family: 'VT323', monospace;
  font-size: 13px;
  color: rgba(74, 255, 204, 0.2);
  letter-spacing: 2px;
}

/* ── Toast Popups ────────────────────────────────────────── */
.wm-toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column-reverse;
  gap: 8px;
  pointer-events: none;
}

.wm-toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  background: var(--bg-card, #08061a);
  border: 1px solid rgba(74, 255, 204, 0.15);
  border-left: 3px solid var(--accent2, #4affcc);
  border-radius: 4px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5),
              0 0 15px rgba(74, 255, 204, 0.06);
  max-width: 340px;
  min-width: 260px;
  pointer-events: all;
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.wm-toast--visible {
  opacity: 1;
  transform: translateX(0);
}
.wm-toast--exit {
  opacity: 0;
  transform: translateX(30px);
}

.wm-toast-icon {
  font-size: 14px;
  flex-shrink: 0;
  margin-top: 1px;
}
.wm-toast-content {
  flex: 1;
  min-width: 0;
}
.wm-toast-title {
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  color: var(--text, #e0d8f0);
  line-height: 1.3;
}
.wm-toast-body {
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  color: rgba(224, 216, 240, 0.4);
  line-height: 1.3;
  margin-top: 3px;
}
.wm-toast-close {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.2);
  font-size: 11px;
  cursor: pointer;
  padding: 0 2px;
  transition: color 0.2s ease;
  font-family: 'Space Mono', monospace;
  flex-shrink: 0;
}
.wm-toast-close:hover {
  color: var(--hot, #ff3c78);
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 480px) {
  .wm-notif-panel {
    width: calc(100vw - 20px);
    right: -10px;
  }
  .wm-toast-container {
    right: 10px;
    left: 10px;
  }
  .wm-toast {
    max-width: none;
    min-width: 0;
  }
}
