/* Notifications bell button + slide-in panel. Panel overlays the app
   without tearing down gameplay (not a .screen). Responsive: full-width
   on mobile (≤719px), fixed 420px on wider viewports. */

.notifications-btn {
  position: relative;
  background: transparent;
  border: 1px solid var(--border, #333);
  color: var(--text, #eee);
  border-radius: 8px;
  padding: 6px 8px;
  cursor: pointer;
  font: inherit;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: background 120ms ease, border-color 120ms ease;
}
.notifications-btn:hover { background: rgba(255,255,255,0.06); }
.notifications-btn-icon { font-size: 16px; line-height: 1; }
.notifications-btn-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--accent, #00e5a0);
  color: #000;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  box-sizing: border-box;
}
.notifications-btn-badge.hidden { display: none; }

/* Panel ──────────────────────────────────────────────────────── */

.notifications-panel {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: flex;
  justify-content: flex-end;
  pointer-events: none;
}
.notifications-panel.hidden { display: none; }
.notifications-panel-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
  pointer-events: auto;
}
.notifications-panel-content {
  position: relative;
  pointer-events: auto;
  background: var(--card, #151515);
  border-left: 1px solid var(--border, #333);
  width: 100vw;
  max-width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 24px rgba(0,0,0,0.5);
}
@media (min-width: 720px) {
  .notifications-panel-content {
    width: 420px;
    max-width: 420px;
  }
}

.notifications-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border, #333);
  flex: 0 0 auto;
}
.notifications-panel-title {
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 13px;
  color: var(--accent, #00e5a0);
}
.notifications-panel-list {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 8px 0;
}
.notifications-panel-footer {
  flex: 0 0 auto;
  padding: 10px 16px;
  border-top: 1px solid var(--border, #333);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.notifications-panel-empty {
  padding: 24px 16px;
  color: var(--muted, #888);
  text-align: center;
  font-size: 13px;
}

/* Row ─────────────────────────────────────────────────────────── */

.notif-row {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  align-items: start;
  position: relative;
}
.notif-row.unread { background: rgba(0, 229, 160, 0.04); }
.notif-row.resolved { opacity: 0.55; }

.notif-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--border, #333);
  object-fit: cover;
  display: block;
}
.notif-avatar-placeholder {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--border, #333);
  color: #eee;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.notif-body { min-width: 0; }
.notif-text {
  font-size: 13px;
  line-height: 1.4;
  color: var(--text, #eee);
  word-break: break-word;
}
.notif-text strong { color: var(--accent, #00e5a0); }
.notif-meta {
  font-size: 11px;
  color: var(--muted, #888);
  margin-top: 2px;
}
.notif-message {
  font-size: 12px;
  color: var(--muted, #aaa);
  font-style: italic;
  margin-top: 4px;
  display: block;
}
.notif-actions {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.notif-action {
  background: transparent;
  border: 1px solid var(--border, #333);
  color: var(--text, #eee);
  padding: 4px 10px;
  border-radius: 6px;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.notif-action:hover { background: rgba(255,255,255,0.06); }
.notif-action-primary {
  background: var(--accent, #00e5a0);
  color: #000;
  border-color: var(--accent, #00e5a0);
  font-weight: 600;
}
.notif-action-primary:hover { filter: brightness(0.95); background: var(--accent, #00e5a0); }

.notif-delete {
  background: transparent;
  border: none;
  color: var(--muted, #888);
  cursor: pointer;
  padding: 4px 6px;
  font-size: 14px;
  line-height: 1;
  align-self: start;
}
.notif-delete:hover { color: var(--text, #eee); }

.notif-resolved-label {
  font-size: 11px;
  color: var(--accent, #00e5a0);
  margin-top: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Invite-friend picker inside existing invite-modal ──────────── */

.invite-friends-picker {
  margin-top: 14px;
  border-top: 1px solid var(--border, #333);
  padding-top: 12px;
}
.invite-friends-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted, #aaa);
  margin-bottom: 8px;
}
.invite-friends-list {
  max-height: 240px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.invite-friend-row {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  gap: 8px;
  align-items: center;
  background: transparent;
  border: 1px solid var(--border, #333);
  border-radius: 6px;
  padding: 6px 8px;
  text-align: left;
}
.invite-friend-row:disabled { opacity: 0.55; }
.invite-friend-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--border, #333);
  object-fit: cover;
}
.invite-friend-name {
  font-size: 13px;
  color: var(--text, #eee);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.invite-friend-status {
  font-size: 11px;
  color: var(--muted, #888);
}
.invite-friend-empty {
  color: var(--muted, #888);
  font-size: 12px;
  padding: 10px;
  text-align: center;
}
