/* ------------------------------------------------------------------ *
 * The shared social layers (S3): the inbox, lenses, replies, «مفید بود»
 * and the state of your own posts. Its own sheet so the entry stylesheet is
 * not the place two people edit at once; every var() has a fallback.
 * ------------------------------------------------------------------ */

.hud-inbox b:empty { display: none; }
.hud-inbox.has-unread b { background: var(--orange, #ed6d1c); color: #fff; }

.inbox { display: grid; gap: .8rem; }
.inbox-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.inbox-item {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: .7rem .85rem;
  border: 1px solid var(--line, rgba(61, 47, 40, .14));
  border-radius: .85rem;
  background: var(--surface, #fff);
  color: inherit;
  font: inherit;
  text-align: start;
  cursor: pointer;
}
.inbox-item:hover { border-color: var(--orange-soft, #a94304); }
.inbox-item:focus-visible { outline: 2px solid var(--orange-soft, #a94304); outline-offset: 2px; }
[data-unread] .inbox-item { border-inline-start: 4px solid var(--orange, #ed6d1c); background: #fff7f1; }
.inbox-text { display: block; font-weight: 700; line-height: 1.7; }
.inbox-when { display: block; margin-top: .15rem; color: var(--ink-3, #6a5e57); font-size: .72rem; }
.inbox-prefs { margin-top: .4rem; padding: .6rem .8rem; border: 1px dashed var(--line-strong, rgba(61, 47, 40, .28)); border-radius: .85rem; }
.inbox-prefs summary { cursor: pointer; font-weight: 700; min-height: 44px; display: flex; align-items: center; }
.inbox-prefs .consent { margin: .35rem 0; }

/* The push switch inside the preferences. Boxed away from the topic list
   because it answers a different question — the list is «چی», this is «کجا». */
.inbox-push {
  margin: .2rem 0 .7rem; padding: .5rem .65rem;
  background: var(--surface-2, rgba(0, 0, 0, .03)); border-radius: .7rem;
}
.inbox-push .consent { margin: 0; }
.inbox-push .field-note { margin: .3rem 0 0; font-size: .76rem; }
.inbox-push input:disabled + span { opacity: .6; }

.lens-row { margin: .9rem 0 .3rem; }
.lens-row .chip-button bdi { margin-inline-start: .3rem; opacity: .75; font-weight: 600; }

.reply-target {
  margin: 0 0 .6rem;
  padding: .45rem .7rem;
  border-radius: .7rem;
  background: #fff7f1;
  font-size: .8rem;
}
.reply-target .link-button { margin-inline-start: .5rem; }

.reply-list { list-style: none; margin: .5rem 0 0; padding: 0 0 0 0; display: grid; gap: .45rem; }
.reply-list:empty { display: none; }
.reply-list > li {
  margin-inline-start: 1.6rem;
  padding: .55rem .75rem;
  border-inline-start: 3px solid rgba(237, 109, 28, .35);
  border-radius: .6rem;
  background: rgba(255, 250, 244, .9);
}
.reply-list .post-head strong { font-size: .86rem; }

.post-state {
  margin: .35rem 0 0;
  padding: .4rem .65rem;
  border-radius: .6rem;
  font-size: .76rem;
  line-height: 1.7;
  background: #fdf0cf;
  color: #5b4a2a;
}
.post-state[data-state="removed"] { background: #f1ede8; color: #453a34; }
li[data-removed] .post-head { opacity: .7; }

.link-button[data-helpful][aria-pressed="true"] { color: var(--state-done, #3d6b45); font-weight: 700; }

@media (prefers-reduced-motion: reduce) {
  .inbox-item { transition: none; }
}

/* S4 — the two switches on the companion screen and «دیدم» in the room. */
.crew-visibility { margin-top: 0.75rem; }
.compare-consent { margin-top: 0.75rem; }
.gap-seen {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem;
  margin: 0.75rem 0 0;
}
.gap-seen .field-note { margin: 0; flex: 1 1 14rem; }
.gap-seen [data-gap-seen][disabled] { opacity: 0.85; border-style: dashed; }
