/* Our additions to the forums. Thredded's own styles are built into thredded.css. */

.forum-latest { margin-bottom: 24px; padding: 16px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper-2); }
.forum-latest__title { margin: 0 0 10px; font-size: 1.05rem; }
.forum-latest__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.forum-latest__topic { display: block; font-weight: 600; overflow-wrap: anywhere; }
.forum-latest__meta { color: var(--ink-3); font-size: 0.85rem; }

/* One line for each thread where there's room: the title gives way before the details. */
@media (min-width: 700px) {
  .forum-latest__list { gap: 6px; }
  .forum-latest__list li { display: flex; align-items: baseline; gap: 16px; }
  .forum-latest__topic { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .forum-latest__meta { flex: none; max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* Thredded has no side margins on phones, and its follow icons and post menus sit past
   the edge of the content, so they stuck out and made the page scroll sideways. */
@media (max-width: 34rem) {
  .thredded--main-container { padding: 0 16px; }
  .thredded--main-container .thredded--topics--follow-icon { right: -28px; }
}

/* Long lines in a code block wrap, which also keeps contact messages readable. */
.thredded--post--content pre { white-space: pre-wrap; overflow-wrap: anywhere; }

.contact-panel { margin: 16px 0; }
.contact-panel__done { margin: 12px 0 0; }

/* Members' reports on a post, on the moderation pages (ForumPostReport). */
.thredded--post-reports {
  margin: 8px 0;
  padding-left: 1.2em;
  color: var(--ink-2);
}
.thredded--post-reports q { font-style: italic; }

.thredded--scoped-navigation { display: flex; align-items: center; gap: 12px; }
.forum-mark-read form { margin: 0; }
.forum-mark-read__button { padding: 3px 10px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: inherit; font: inherit; font-size: 0.8125rem; white-space: nowrap; cursor: pointer; }
.forum-mark-read__button:hover { border-color: var(--red); color: var(--red); }
/* Thredded's top row is icons only at this size, so this is one too, and the forum names make room for it. */
@media (max-width: 48rem) {
  .forum-mark-read__button { display: grid; place-items: center; width: 2rem; height: 2rem; padding: 0; font-size: 0; }
  .forum-mark-read__button::before { content: "✓"; font-size: 1.1rem; }
  .thredded--main-navigation:has(.forum-mark-read) .thredded--navigation-breadcrumbs { margin-right: 2.75rem; }
}

/* Old threads (ForumArchive): the board's archive list, and the label beside archived
   threads in lists such as search results. */
.forum-archive__heading { margin: 0 0 4px; font-size: 1.1rem; }
.forum-archive__lead { margin: 0 0 16px; color: var(--ink-3); font-size: 0.9rem; }
.forum-archive__link { margin: 16px 0 0; text-align: center; }
.forum-archive__label { margin-left: 6px; padding: 1px 6px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-3); font-size: 0.75rem; font-weight: 400; vertical-align: middle; }

/* Contact form spam (admin/contact_messages/spam_list): each held message as it was sent. */
.contact-spam__body { margin: 8px 0 12px; padding: 10px 12px; border-radius: var(--radius); background: var(--paper-2); white-space: pre-wrap; overflow-wrap: anywhere; font-size: 0.9rem; }

/* Who a new private message is to (recipient_picker_controller.js): the chosen names and the
   box to type in look like one field, with the matching members listed under it. Thredded
   shows a hidden textarea anyway, so say it again. */
.recipient-picker textarea[hidden] { display: none; }
.recipient-picker__combo { position: relative; }
.recipient-picker__box { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 5px 8px; border: 1px solid var(--line); border-radius: var(--radius-small); cursor: text; }
.recipient-picker__box:focus-within { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
.recipient-picker__chips { display: contents; }
.recipient-picker__chip { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; min-height: 32px; padding: 2px 10px 2px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper-2); color: var(--ink); font-size: 0.9rem; overflow-wrap: anywhere; cursor: pointer; }
.recipient-picker__chip:hover { border-color: var(--red); }
.recipient-picker__chip span { color: var(--ink-3); font-size: 1.15rem; line-height: 1; }
/* 16px or more, so phones don't zoom in on it. */
.thredded--form .recipient-picker__box input.recipient-picker__input { flex: 1 1 9em; width: auto; min-width: 0; margin: 0; padding: 4px; border: 0; background: transparent; box-shadow: none; outline: none; font-size: 1rem; }
.recipient-picker__list { position: absolute; z-index: 20; left: 0; right: 0; max-height: 18rem; overflow-y: auto; margin-top: 4px; border: 1px solid var(--line); border-radius: var(--radius-small); background: var(--paper); box-shadow: var(--shadow); }
.recipient-picker__option { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 12px; overflow-wrap: anywhere; cursor: pointer; }
.recipient-picker__option img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.recipient-picker__option:hover, .recipient-picker__option[aria-selected="true"] { background: var(--red-soft); }
.recipient-picker__option[aria-selected="true"] { box-shadow: inset 3px 0 0 var(--red); }
.recipient-picker__problem, .recipient-picker__hint { margin: 6px 0 0; font-size: 0.85rem; }
.recipient-picker__problem:empty { display: none; }
.recipient-picker__hint { color: var(--ink-3); }
