/* Inbox: messages, conversation, notification centre (guide stage 17). */

/* ---------- Inbox list ---------- */
.inb-search { position: relative; }
.inb-search svg { position: absolute; left: 14px; top: 14px; color: var(--muted); pointer-events: none; }
.inb-search .input { padding-left: 42px; }
.inb-row .body .s { display: block; }
.inb-row.inb-unread .body .t { color: var(--text); font-weight: 750; }
.inb-row.inb-unread .body .s { color: var(--text); }
.inb-row .trail { flex-direction: column; align-items: flex-end; gap: 4px; font-size: 12px; }
.inb-count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--gold); color: var(--gold-ink); font-size: 11.5px; font-weight: 800; line-height: 20px; text-align: center; }
.inb-pick { max-height: 60dvh; overflow-y: auto; margin: 0 -18px; }

/* ---------- Conversation ---------- */
.inb-chat {
  display: flex; flex-direction: column; width: 100%; max-width: 720px; margin: 0 auto; padding: 0 16px;
  height: calc(100dvh - var(--top-h) - var(--tab-h) - env(safe-area-inset-bottom) - 16px);
}
@media (min-width: 960px) { .inb-chat { height: calc(100dvh - var(--top-h) - 40px); padding: 0 28px; } }
.inb-chat-head { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); flex: none; }
.inb-chat-head .who { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; }
.inb-chat-head .who:hover .name { color: var(--gold-2); }
.inb-chat-head .name { font-weight: 700; }
.inb-thread { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 16px 2px; overscroll-behavior: contain; }
.inb-thread > :first-child { margin-top: auto; }
.inb-msg { display: flex; flex-direction: column; max-width: 82%; align-self: flex-start; align-items: flex-start; }
.inb-msg.me { align-self: flex-end; align-items: flex-end; }
.inb-bubble { padding: 10px 14px; border-radius: 18px 18px 18px 6px; background: var(--surface-2); overflow-wrap: anywhere; white-space: pre-wrap; }
.inb-msg.me .inb-bubble { background: var(--gold); color: var(--gold-ink); border-radius: 18px 18px 6px 18px; font-weight: 550; }
.inb-time { font-size: 11.5px; color: var(--faint); margin: 3px 6px 0; }
.inb-hello { align-self: center; text-align: center; color: var(--muted); padding: 24px 12px; margin-bottom: auto; }
.inb-hello .avatar { margin: 0 auto; }
.inb-typing .inb-bubble { display: inline-flex; gap: 4px; align-items: center; min-height: 40px; }
.inb-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: inb-blink 1.1s infinite; }
.inb-typing i:nth-child(2) { animation-delay: .18s; }
.inb-typing i:nth-child(3) { animation-delay: .36s; }
@keyframes inb-blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.inb-composer { flex: none; display: flex; gap: 8px; padding: 10px 0 4px; border-top: 1px solid var(--line-soft); }
.inb-composer .input { flex: 1; border-radius: 999px; }
.inb-composer .btn { border-radius: 50%; }

/* ---------- Notification centre ---------- */
.inb-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; display: inline-block; background: var(--muted); }
.inb-dot.inb-order { background: var(--blue); }
.inb-dot.inb-earnings { background: var(--green); }
.inb-dot.inb-social { background: var(--purple); }
.inb-dot.inb-events { background: var(--cyan); }
.inb-dot.inb-admin { background: var(--gold); }
.list-item .lead.inb-order { background: rgba(75, 141, 255, .16); color: #9cc0ff; }
.list-item .lead.inb-earnings { background: rgba(24, 192, 138, .16); color: #5fe0b5; }
.list-item .lead.inb-social { background: rgba(169, 107, 255, .16); color: #cfadff; }
.list-item .lead.inb-events { background: rgba(25, 185, 214, .16); color: #7fdff0; }
.list-item .lead.inb-admin { background: rgba(245, 168, 0, .16); color: var(--gold-2); }
.inb-notif { align-items: flex-start; }
.inb-notif .body .s { display: block; margin-top: 1px; }
.inb-notif .inb-meta { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 12px; color: var(--faint); }
.inb-notif.inb-unread { background: rgba(245, 168, 0, .06); }
.inb-notif.inb-unread .body .t { font-weight: 750; }
.inb-notif:not(.inb-unread) .body .t { color: var(--muted); }
.inb-new { width: 10px; height: 10px; border-radius: 50%; background: var(--gold); margin-top: 6px; }
.inb-legend { display: grid; grid-template-columns: auto 1fr; gap: 8px 12px; align-items: baseline; font-size: 13.5px; }
.inb-legend .k { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; }
.inb-legend .f { color: var(--faint); font-size: 12.5px; }
@media (min-width: 620px) { .inb-legend { grid-template-columns: auto 1fr auto; } }
@media (max-width: 619px) { .inb-legend .f { grid-column: 2; margin-top: -6px; } }
