/* PROSPER — notification inbox (design/16). Loaded on every public page
   with the main nav; styles the self-injected nav button, badge, panel,
   toast, and the Settings notification-preference rows. Palette comes
   from styles.css :root variables, with fallbacks. */

.inbox-btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%; cursor: pointer;
  background: transparent; border: 1px solid var(--line-soft, rgba(174, 230, 255, 0.1));
  color: var(--ice, #aee6ff);
  transition: box-shadow 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.inbox-btn:hover { border-color: var(--ice, #aee6ff); box-shadow: var(--glow-soft, 0 0 22px rgba(110, 180, 255, 0.22)); }

.inbox-badge {
  position: absolute; top: -5px; right: -6px;
  min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 999px; box-sizing: border-box;
  background: var(--sapphire, #3d7dc4); color: #fff;
  font-size: 0.62rem; font-weight: 700; line-height: 17px; text-align: center;
  border: 1px solid rgba(5, 7, 11, 0.65);
}
.inbox-badge.is-zero, .inbox-badge[hidden] { display: none; }

.inbox-panel {
  position: fixed; top: 64px; right: 12px; z-index: 1200;
  width: min(400px, calc(100vw - 24px));
  max-height: calc(100dvh - 80px);
  display: flex; flex-direction: column;
  background: var(--panel-solid, #0d1420);
  border: 1px solid var(--line, rgba(174, 230, 255, 0.18));
  border-radius: 14px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55), var(--glow-soft, 0 0 22px rgba(110, 180, 255, 0.22));
  color: var(--text, #eef4fb);
  opacity: 0; transform: translateY(-6px); pointer-events: none;
  visibility: hidden;
}
.inbox-panel.is-open { opacity: 1; transform: translateY(0); pointer-events: auto; visibility: visible; }
@media (prefers-reduced-motion: no-preference) {
  .inbox-panel { transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s; }
}

.inbox-head {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  padding: 0.85rem 1rem 0.6rem;
}
.inbox-title { margin: 0; font-size: 1.05rem; letter-spacing: 0.06em; }
.inbox-head-actions { display: inline-flex; align-items: center; gap: 0.4rem; }
.inbox-markall {
  background: none; border: none; cursor: pointer; padding: 0.25rem 0.35rem;
  color: var(--ice-mid, #4fc3ff); font-size: 0.78rem; font-weight: 600;
}
.inbox-markall:hover { color: var(--ice-soft, #eaf7ff); text-decoration: underline; }
.inbox-markall[hidden] { display: none; }
.inbox-close {
  background: none; border: 1px solid var(--line-soft, rgba(174, 230, 255, 0.1));
  width: 28px; height: 28px; border-radius: 50%; cursor: pointer;
  color: var(--muted, #9db8cc); font-size: 1rem; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
}
.inbox-close:hover { color: var(--text, #eef4fb); border-color: var(--ice, #aee6ff); }

.inbox-tabs {
  display: flex; flex-wrap: wrap; gap: 0.35rem;
  padding: 0.35rem 1rem 0.7rem;
  border-bottom: 1px solid var(--line-soft, rgba(174, 230, 255, 0.1));
}
.inbox-tab {
  background: transparent; cursor: pointer;
  border: 1px solid var(--line-soft, rgba(174, 230, 255, 0.1));
  border-radius: 999px; padding: 0.28rem 0.65rem;
  color: var(--muted, #9db8cc); font-size: 0.74rem; font-weight: 600;
}
.inbox-tab:hover { color: var(--ice-soft, #eaf7ff); border-color: var(--ice, #aee6ff); }
.inbox-tab.is-active {
  color: #fff; background: var(--sapphire, #3d7dc4);
  border-color: var(--sapphire, #3d7dc4);
}

.inbox-list { overflow-y: auto; padding: 0.4rem 0.5rem 0.6rem; }
.inbox-empty {
  margin: 0; padding: 1.4rem 1rem; text-align: center;
  color: var(--faint, #5f7a8f); font-size: 0.85rem;
}

.inbox-row {
  position: relative;
  display: flex; align-items: flex-start; gap: 0.65rem;
  padding: 0.65rem 0.55rem; border-radius: 10px; cursor: pointer;
}
.inbox-row:hover { background: rgba(174, 230, 255, 0.06); }
.inbox-row.is-unread { background: rgba(61, 125, 196, 0.12); }
.inbox-row.is-unread:hover { background: rgba(61, 125, 196, 0.18); }
.inbox-row-img {
  width: 34px; height: 34px; border-radius: 9px; object-fit: cover; flex: none;
  border: 1px solid var(--line-soft, rgba(174, 230, 255, 0.1));
}
.inbox-row-icon {
  width: 34px; height: 34px; border-radius: 9px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--ice, #aee6ff);
  border: 1px solid var(--line-soft, rgba(174, 230, 255, 0.1));
  background: rgba(174, 230, 255, 0.05);
}
.inbox-row-main { display: flex; flex-direction: column; gap: 0.15rem; flex: 1; min-width: 0; }
.inbox-row-title { font-size: 0.86rem; color: var(--text, #eef4fb); }
.inbox-row-body {
  font-size: 0.8rem; color: var(--muted, #9db8cc);
  overflow: hidden; text-overflow: ellipsis;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.inbox-row-time { font-size: 0.72rem; color: var(--faint, #5f7a8f); }
.inbox-dot {
  width: 8px; height: 8px; border-radius: 50%; flex: none; margin-top: 0.35rem;
  background: var(--ice-mid, #4fc3ff); box-shadow: 0 0 8px rgba(79, 195, 255, 0.8);
}
.inbox-dismiss {
  background: none; border: none; cursor: pointer; flex: none;
  color: var(--faint, #5f7a8f); font-size: 1rem; line-height: 1; padding: 0.15rem 0.3rem;
}
.inbox-dismiss:hover { color: var(--text, #eef4fb); }

.inbox-toast {
  position: fixed; right: 16px; bottom: 16px; z-index: 1300;
  display: flex; align-items: center; gap: 0.65rem;
  max-width: min(360px, calc(100vw - 32px));
  padding: 0.75rem 0.9rem; cursor: pointer;
  background: var(--panel-solid, #0d1420);
  border: 1px solid var(--line, rgba(174, 230, 255, 0.18));
  border-radius: 12px; color: var(--text, #eef4fb);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.55), var(--glow-soft, 0 0 22px rgba(110, 180, 255, 0.22));
}
.inbox-toast-main { display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; }
.inbox-toast-main strong { font-size: 0.82rem; }
.inbox-toast-main span {
  font-size: 0.8rem; color: var(--muted, #9db8cc);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

@media (max-width: 720px) {
  .inbox-panel {
    left: 8px; right: 8px; top: 56px; width: auto;
    max-height: calc(100dvh - 64px);
  }
}

/* Settings — notification preference rows (settings.html, design/16). */
.notif-pref-row {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.55rem 0; cursor: pointer;
  border-bottom: 1px solid var(--line-soft, rgba(174, 230, 255, 0.1));
}
.notif-pref-row:last-of-type { border-bottom: none; }
.notif-pref-row input[type="checkbox"] {
  width: 1.1rem; height: 1.1rem; flex: none;
  accent-color: var(--sapphire, #3d7dc4);
}
.notif-pref-row input[type="checkbox"]:disabled { opacity: 0.5; cursor: wait; }
