/* Notification Center — bell icon, badge, panel, list items */
/* Loaded on all portal pages via <link> in <head> */

/* ── Bell Icon ──────────────────────────────────────────── */
.nav-notification-btn {
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  transition: background 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nav-notification-btn:hover {
  background: rgba(139, 92, 246, 0.12);
}
.bell-icon {
  width: 22px;
  height: 22px;
  color: var(--text);
}

/* ── Badge ─────────────────────────────────────────────── */
.notification-badge {
  position: absolute;
  top: 0;
  right: 0;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  min-width: 16px;
  height: 16px;
  line-height: 16px;
  padding: 0 4px;
  border-radius: 10px;
  text-align: center;
  display: none;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

/* ── Panel ─────────────────────────────────────────────── */
.notification-panel {
  position: fixed;
  z-index: 500;
  width: 380px;
  max-height: 520px;
  background: var(--s1, #0d0f1c);
  border: 1px solid var(--border2, rgba(255,255,255,0.14));
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  display: none;
  flex-direction: column;
}
.notification-panel.open {
  display: flex;
}

/* ── Header ────────────────────────────────────────────── */
.notification-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border, rgba(255,255,255,0.08));
}
.notification-header h3 {
  font-size: 15px;
  font-weight: 800;
  color: var(--text, #e8ecf8);
  margin: 0;
}
.mark-all-read-btn {
  background: none;
  border: none;
  color: var(--muted, #8896b3);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.15s;
}
.mark-all-read-btn:hover {
  background: rgba(255,255,255,0.06);
  color: var(--text, #e8ecf8);
}

/* ── Tabs ──────────────────────────────────────────────── */
.notification-tabs {
  display: flex;
  gap: 4px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--border, rgba(255,255,255,0.08));
}
.ntab {
  background: none;
  border: none;
  color: var(--muted, #8896b3);
  font-size: 12px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, color 0.15s;
  letter-spacing: 0.02em;
}
.ntab:hover {
  background: rgba(255,255,255,0.06);
  color: var(--text, #e8ecf8);
}
.ntab.active {
  background: rgba(139, 92, 246, 0.15);
  color: var(--purple, #8b5cf6);
}

/* ── List ───────────────────────────────────────────────── */
.notification-list {
  flex: 1;
  overflow-y: auto;
  max-height: 320px;
}
.notification-empty {
  padding: 32px 16px;
  text-align: center;
  color: var(--dim, #4a5580);
  font-size: 14px;
}

/* ── Item ───────────────────────────────────────────────── */
.notification-item {
  display: flex;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border, rgba(255,255,255,0.08));
  transition: background 0.15s;
  align-items: flex-start;
}
.notification-item:hover {
  background: rgba(255,255,255,0.03);
}
.notification-item.unread {
  background: rgba(139, 92, 246, 0.05);
}
.notification-item.claimed {
  opacity: 0.6;
}

.notification-icon {
  font-size: 22px;
  line-height: 1;
  flex-shrink: 0;
  width: 32px;
  text-align: center;
}

.notification-content {
  flex: 1;
  min-width: 0;
}
.notification-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text, #e8ecf8);
  margin-bottom: 2px;
}
.notification-message {
  font-size: 12px;
  color: var(--muted, #8896b3);
  line-height: 1.4;
  margin-bottom: 4px;
}
.notification-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 11px;
}
.notification-time {
  color: var(--dim, #4a5580);
}
.notification-reward {
  color: var(--yellow, #fbbf24);
  font-weight: 700;
}
.notification-reward.claimed {
  color: var(--dim, #4a5580);
  text-decoration: line-through;
}

.notification-actions {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

/* ── Claim Button ────────────────────────────────────────── */
.claim-btn {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  border: none;
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
  color: #000;
  transition: filter 0.15s, transform 0.1s;
  white-space: nowrap;
}
.claim-btn:hover {
  filter: brightness(1.1);
  transform: scale(1.03);
}
.claim-btn:active {
  transform: scale(0.97);
}

.claimed-label {
  font-size: 11px;
  color: var(--green, #10b981);
  font-weight: 700;
  white-space: nowrap;
}

/* ── Footer ─────────────────────────────────────────────── */
.notification-footer {
  padding: 10px 16px;
  border-top: 1px solid var(--border, rgba(255,255,255,0.08));
}
.claim-all-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--purpled, #6d28d9), var(--blue, #3b82f6));
  border: none;
  border-radius: 8px;
  padding: 9px;
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: 0.02em;
  transition: filter 0.15s;
}
.claim-all-btn:hover {
  filter: brightness(1.1);
}
.claim-all-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ── Mobile ─────────────────────────────────────────────── */
@media (max-width: 640px) {
  .notification-panel {
    width: calc(100vw - 16px);
    right: 8px !important;
    max-height: 70vh;
  }
  .notification-list {
    max-height: 50vh;
  }
}