/* Forum: index, topic lists, posts. Desktop first. */

.forum-category {
    margin: 26px 20px 6px;
    font-size: 1rem;
    color: #f0cf9c;
}
.forum-table {
    table-layout: fixed;
    margin: 0 20px 8px;
    width: calc(100% - 40px);
}
.forum-table .col-forum { width: 58%; }
.forum-table .col-count { width: 8%; }
.forum-table .col-last  { width: 26%; }
.forum-table td {
    vertical-align: middle;
}
.forum-table td.num, .forum-table th:nth-child(2), .forum-table th:nth-child(3) {
    text-align: center;
}
.forum-table tr.is-unread td:first-child {
    box-shadow: inset 3px 0 0 #ff8a4a;
}
.forum-row {
    display: flex;
    align-items: center;
    gap: 14px;
    color: inherit;
}
.forum-row:hover {
    text-decoration: none;
}
.forum-row:hover .forum-name {
    text-decoration: underline;
}
.forum-icon {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border: 1px solid #8a6a45;
    border-radius: 3px;
    box-shadow: 0 0 0 1px #120d0a, 0 2px 5px #000;
    object-fit: cover;
}
.forum-icon--emblem {
    display: grid;
    place-items: center;
    background: radial-gradient(ellipse at bottom, #5e1a0c, #1a0d09 70%);
    color: #e8b070;
}
.forum-name {
    font-size: 1.1rem;
    color: #f3e6cf;
}
.forum-desc, .forum-meta {
    display: block;
    font-size: .9rem;
}
.forum-desc {
    color: var(--muted);
}
.forum-last {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.forum-intro {
    padding: 10px 20px 0;
}
.unread-dot {
    display: inline-block;
    margin-left: 8px;
    padding: 1px 7px;
    border-radius: 8px;
    background: #c2331f;
    color: #fff;
    font: 700 .62rem/1.5 var(--body-font);
    text-transform: uppercase;
    vertical-align: middle;
}
.topic-title {
    font-size: 1.08rem;
    font-weight: 600;
    color: #f3e6cf;
}
.forum-table tr.is-unread .topic-title {
    color: #ffd08e;
}
.topic-flag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 8px;
    padding: 1px 7px;
    border: 1px solid #6b5a45;
    border-radius: 2px;
    font: 600 .6rem/1.5 var(--heading-font);
    text-transform: uppercase;
    letter-spacing: .06em;
    vertical-align: middle;
}
.topic-flag--pinned {
    border-color: #c8763c;
    color: #ffcf9a;
}
.topic-flag--locked {
    border-color: #777;
    color: #bbb;
}
.forum-table tr.is-pinned {
    background: #7a3a1210;
}

/* ---------- topic ---------- */
.topic-heading {
    flex-wrap: wrap;
    text-transform: none !important;
    letter-spacing: .01em !important;
    font-size: 1.5rem !important;
}
.topic-mod {
    display: flex;
    align-items: center;
    gap: 8px;
}
.topic-mod form {
    margin: 0;
}
.forum-post {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    margin: 16px 20px 0;
    border: 1px solid #5a473244;
    background: #0e0d0ccc;
    scroll-margin-top: 20px;
}
.forum-post:target {
    box-shadow: 0 0 0 1px #b2583c, 0 0 18px #b0240a33;
}
.forum-post__author {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 18px 12px;
    text-align: center;
    border-right: 1px solid #5a473244;
    background: linear-gradient(#1a1412aa, #0d0c0b00);
}
.forum-post__avatar {
    width: 84px;
    height: 84px;
    border: 1px solid #8a6a45;
    border-radius: 50%;
    box-shadow: 0 0 0 2px #120d0a, 0 4px 10px #000;
    object-fit: cover;
}
.forum-post__author strong {
    font-size: 1.05rem;
    overflow-wrap: anywhere;
}
.forum-post__main {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.forum-post__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 16px;
    border-bottom: 1px solid #5a473233;
    font-size: .9rem;
}
.forum-post__actions {
    display: flex;
    align-items: center;
    gap: 6px;
}
.forum-post__actions form {
    margin: 0;
}
.forum-post__actions .link-button {
    min-height: 30px;
    padding: 2px 6px;
    font-size: .7rem;
}
.forum-post__body {
    padding: 14px 18px 8px;
    overflow-wrap: anywhere;
}
.forum-post__edited {
    margin-top: auto;
    padding: 0 18px 10px;
}
.forum-reply {
    margin: 22px 20px 12px;
}
.forum-reply label {
    display: block;
    margin-bottom: 6px;
    color: var(--gold);
    font-weight: 600;
}

/* Pictures and videos in posts: not wider than a comfortable reading width, centred */
.forum-post__body .post-figure,
.forum-post__body .post-video,
.forum-post__body .post-gallery {
    max-width: 820px;
    margin-inline: auto;
}

/* ---------- private messages (private topics between two members) ---------- */
.forum-post__pm {
    gap: 5px;
    min-height: 0;
    padding: 2px 6px;
    font-size: .7rem;
}
.forum-table .col-with { width: 20%; }
.messages .forum-table .col-forum { width: 46%; }
.pm-avatar {
    flex-shrink: 0;
    border: 1px solid #8a6a45;
    border-radius: 50%;
    background: #120c0a;
    object-fit: cover;
}
.pm-with {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.pm-subline {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
}
.pm-post.is-new {
    animation: pm-arrive .5s ease-out;
}
@keyframes pm-arrive {
    from { opacity: 0; transform: translateY(10px); box-shadow: 0 0 18px #ff5a1f66; }
}
@media (prefers-reduced-motion: reduce) {
    .pm-post.is-new { animation: none; }
}

/* Remove menu of a conversation you started: remove for yourself or delete for both */
.pm-remove {
    position: relative;
}
.pm-remove > summary {
    list-style: none;
    cursor: pointer;
}
.pm-remove > summary::-webkit-details-marker {
    display: none;
}
.pm-remove > .pm-remove__panel {
    position: absolute;
    z-index: 40;
    top: calc(100% + 10px);
    right: 0;
    width: 290px;
    margin: 0;
    padding: 6px;
    box-shadow: 0 18px 40px #000e;
    animation: loa-flyout .18s ease-out;
}
.pm-remove__option {
    display: flex;
    flex-direction: column;
    gap: 3px;
    width: 100%;
    padding: 10px 12px;
    border: 0;
    background: none;
    color: var(--text);
    font: inherit;
    text-align: left;
    cursor: pointer;
}
.pm-remove__option:hover,
.pm-remove__option:focus-visible {
    background: linear-gradient(90deg, #42120c66, transparent);
}
.pm-remove__option strong {
    color: #e9d3ae;
}
.pm-remove__option--danger strong {
    color: #ff8a6a;
}
.pm-remove__option .muted {
    font-size: .85rem;
}

/* Subscribe / Unsubscribe on a topic */
.topic-mod .button .icon {
    margin-right: 6px;
}
