/* ReBBu Unified Web: the group forum (discussions.php). The group's head, the topics as a list of rows, the posts as
   panels with the writer beside the text; the editor below. */

.ud-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px 22px; flex-wrap: wrap; margin-bottom: var(--uw-gap); padding-top: 18px; padding-bottom: 18px; }
.ud-tabs { list-style: none; margin: 0; padding: 4px; display: inline-flex; gap: 4px; border-radius: 999px; background: var(--uw-night); align-self: flex-start; }
.ud-tabs a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 18px; border-radius: 999px; color: var(--uw-muted); text-decoration: none; font-weight: 500; font-size: 14px; }
.uw-page .ud-tabs a { color: var(--uw-muted); }
.uw-page .ud-tabs a[aria-current="page"] { background: var(--uw-panel-raised); color: #fff; }
.ud-group-actions { display: flex; gap: 10px; }

.ud-chip { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--uw-panel-raised); color: var(--uw-text); font-size: 12px; font-weight: 700; }
.ud-chip-gold { background: var(--uw-gold); color: #3a2600; }
.ud-chip-closed { background: #5a2a31; color: #ffd0d3; }
.ud-chip-new { background: var(--uw-ok); color: #06250f; }

/* the topics */
.ud-new { margin-bottom: var(--uw-gap); }
.ud-new:not([open]) { padding: 0; background: none; border: 0; box-shadow: none; }
.ud-new > summary { list-style: none; display: inline-flex; }
.ud-new > summary::-webkit-details-marker { display: none; }
.ud-new[open] > summary { display: none; }
.ud-new form .uw-h2 { margin-bottom: 18px; }
.ud-thread { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 240px); gap: 24px; align-items: center; padding: 18px 0; }
.ud-thread-sticky { box-shadow: inset 4px 0 0 var(--uw-gold); padding-left: 18px; }
.ud-thread-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ud-thread-title { font-size: 18px; font-weight: 700; text-decoration: none; overflow: hidden; text-overflow: ellipsis; }
.ud-thread-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.ud-thread-chips:empty { display: none; }
.ud-thread-numbers { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-size: 14px; color: var(--uw-muted); white-space: nowrap; }
.ud-thread-last { font-size: 14px; color: var(--uw-muted); text-decoration: none; }
.uw-page a.ud-thread-last { color: var(--uw-muted); }
.uw-page a.ud-thread-last:hover { color: var(--uw-text); }

/* one topic */
.ud-topic-head { margin-bottom: var(--uw-gap); }
.ud-back { font-size: 14px; }
.ud-topic-title { font: 700 32px/1.2 var(--uw-font-display); margin: 8px 0 10px 0; }
.ud-topic-meta { display: flex; gap: 10px 18px; flex-wrap: wrap; align-items: center; margin: 0; color: var(--uw-muted); font-size: 14px; }
.ud-settings { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--uw-line); }
.ud-settings summary { cursor: pointer; font-weight: 700; color: var(--uw-link); }
.ud-settings form { margin-top: 18px; max-width: 640px; }
.ud-radios { border: 0; margin: 0 0 12px 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ud-radios legend { margin-bottom: 8px; color: var(--uw-muted); font-weight: 500; font-size: 14px; }
.ud-radios label { display: flex; gap: 8px; align-items: center; }

.ud-posts { list-style: none; margin: 0; padding: 0; }
.ud-post { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 28px; padding: 0; overflow: hidden; }
.ud-posts > li + li { margin-top: 18px; }
.ud-author { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 22px 14px; text-align: center; background: var(--uw-night); }
.ud-author-figure { image-rendering: pixelated; }
.ud-author-name { font-weight: 700; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.ud-presence { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--uw-muted); }
.ud-presence::before { content: ""; flex: none; width: 14px; height: 8px; clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); background: var(--uw-muted); }
.ud-online::before { background: var(--uw-ok); }
.ud-author-badges { display: flex; gap: 6px; justify-content: center; }
.ud-author-badges img { image-rendering: pixelated; }
.ud-author-motto { font-size: 13px; color: var(--uw-muted); font-style: italic; overflow-wrap: anywhere; }
.ud-post-main { display: flex; flex-direction: column; gap: 12px; padding: 22px var(--uw-pad) 22px 0; min-width: 0; }
.ud-post-head { display: flex; justify-content: space-between; gap: 10px 18px; flex-wrap: wrap; padding-bottom: 12px; border-bottom: 1px solid var(--uw-line); }
.ud-post-title { font-weight: 700; }
.ud-post-body { overflow-wrap: anywhere; }
.ud-post-body .bbcode-quote, .ud-preview-body .bbcode-quote { margin: 10px 0; padding: 12px 16px; border-left: 4px solid var(--uw-sky-deep); border-radius: 0 var(--uw-radius-small) var(--uw-radius-small) 0; background: var(--uw-night); color: var(--uw-muted); }
.ud-post-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; }
.ud-action { padding: 6px 14px; border: 0; border-radius: 999px; background: var(--uw-panel-raised); color: var(--uw-text); font: 500 13px var(--uw-font); cursor: pointer; }
.ud-action:hover { background: var(--uw-line); }
.ud-danger { color: #ffb3b5; }
.uw-page .uw-pagination { margin: 18px 0; }

/* the editor */
.ud-write { margin-top: var(--uw-gap); }
.ud-editor { display: flex; gap: 6px; flex-wrap: wrap; padding: 8px; border: 1px solid var(--uw-line); border-bottom: 0; border-radius: 12px 12px 0 0; background: var(--uw-panel-raised); }
.ud-tool { padding: 6px 12px; border: 0; border-radius: 8px; background: var(--uw-night); color: var(--uw-text); font: 500 13px var(--uw-font); cursor: pointer; }
.ud-tool:hover { background: var(--uw-line); }
.ud-tool-b { font-weight: 700; } .ud-tool-i { font-style: italic; } .ud-tool-u { text-decoration: underline; } .ud-tool-s { text-decoration: line-through; }
.ud-message { display: block; min-height: 170px; border-radius: 0 0 12px 12px; resize: vertical; margin-bottom: 18px; }
.ud-captcha .uw-input { width: 180px; }
.ud-preview { margin: 0 0 18px 0; padding: 18px 20px; border-radius: var(--uw-radius-small); background: var(--uw-night); }
.ud-preview .uw-h3 { margin-bottom: 10px; font-size: 15px; color: var(--uw-muted); }

@media (max-width: 900px) {
	.ud-thread { grid-template-columns: minmax(0, 1fr); gap: 8px; }
	.ud-thread-numbers { flex-direction: row; gap: 14px; }
}
@media (max-width: 640px) {
	.ud-post { grid-template-columns: minmax(0, 1fr); gap: 0; }
	.ud-author { flex-direction: row; flex-wrap: wrap; justify-content: flex-start; text-align: left; padding: 14px 20px; }
	.ud-author-figure { width: 32px; height: 55px; }
	.ud-post-main { padding: 18px 20px; }
}
