/* O Jailbreaks — the forum (forum/): the "public jb" forum channel from the Discord. Builds on styles.css and
   members.css (page layout, tabs, panels, form fields, the lock panel). */

.fm.is-reading .mb-hero { display: none; } /* reading or writing a post: straight to it */
.fm.is-reading { padding-top: calc(var(--header-h) + 34px); }

/* ---------- The list ---------- */
.fm-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.fm-search { position: relative; flex: 1 1 240px; display: flex; }
.fm-search .ico { position: absolute; left: 15px; top: 50%; translate: 0 -50%; font-size: 18px; color: var(--muted); pointer-events: none; }
.fm-search input {
  width: 100%; height: 50px; padding: 0 16px 0 44px; border-radius: 15px; border: 1px solid var(--line); background: rgba(10, 16, 30, .6);
  color: var(--text); font: 400 15px var(--font); transition: border-color .25s, box-shadow .25s;
}
.fm-search input::placeholder { color: var(--dim); }
.fm-search input:focus { outline: 0; border-color: var(--blue-2); box-shadow: 0 0 0 4px rgba(47, 107, 255, .15); }
.fm-new-btn { height: 50px; }

.fm-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.fm-tag {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, .03); color: var(--text-2); font: 500 13px var(--font); white-space: nowrap; transition: border-color .2s, background .2s, color .2s;
}
button.fm-tag:hover { border-color: var(--line-3); color: #fff; }
.fm-tag[aria-pressed="true"] { border-color: rgba(79, 141, 255, .7); background: rgba(47, 107, 255, .2); color: #fff; }
.fm-tag img { width: 16px; height: 16px; object-fit: contain; }
.fm-tag.is-small { height: 24px; padding: 0 9px; font-size: 12px; }
.fm-tag.is-pin { border-color: rgba(245, 197, 74, .45); color: #f5d27a; }
.fm-tag.is-pin .ico, .fm-tag.is-lock .ico { font-size: 13px; }

.fm-posts { display: grid; gap: 10px; }
.fm-card {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; padding: 16px 18px; border-radius: 18px; border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(17, 26, 46, .62), rgba(7, 11, 20, .7)); transition: border-color .25s, background .25s, transform .3s var(--ease);
  animation: mb-row .5s var(--ease) both; animation-delay: calc(var(--i, 0) * 30ms);
}
.fm-card:hover { border-color: var(--line-3); transform: translateY(-2px); }
.fm-card:focus-visible { outline: 2px solid var(--blue-2); outline-offset: 3px; }
.fm-card.is-pinned { border-color: rgba(245, 197, 74, .32); }
.fm-card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.fm-card-tags:empty { display: none; }
.fm-card-title { font: 700 18px/1.3 var(--font); color: #fff; overflow-wrap: anywhere; }
.fm-card-preview { margin-top: 6px; font-size: 14.5px; line-height: 1.55; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.fm-card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 12px; font-size: 13px; color: var(--dim); }
.fm-card-meta .fm-who { display: inline-flex; align-items: center; gap: 7px; color: var(--text-2); font-weight: 500; min-width: 0; }
.fm-card-meta .fm-who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 22ch; }
.fm-card-meta img, .fm-card-meta .fm-av-blank { width: 22px; height: 22px; border-radius: 50%; background: var(--panel); object-fit: cover; flex-shrink: 0; }
.fm-card-meta > span:not(.fm-who) { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.fm-card-meta .ico { font-size: 15px; }
.fm-thumb { width: 92px; height: 92px; border-radius: 12px; object-fit: cover; background: var(--panel); border: 1px solid var(--line); }
.fm-card.is-loading { height: 118px; animation: mb-pulse 1.4s ease-in-out infinite alternate; }
.fm-more-row { display: flex; justify-content: center; margin: 16px 0; }
.fm-more-row:has(> [hidden]) { margin: 0; }
.fm-note { margin: 12px 0; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .03); font-size: 14px; line-height: 1.55; color: var(--text-2); }
.fm-note a { color: #a9cbff; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- One post ---------- */
.fm-back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 18px; color: var(--text-2); font: 600 14px var(--font); transition: color .2s; }
.fm-back .ico { font-size: 18px; }
.fm-back:hover { color: #fff; }
.fm-head { margin-bottom: 18px; }
.fm-tagrow { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.fm-tagrow:empty { display: none; }
.fm-title { font: 800 clamp(26px, 4vw, 40px)/1.15 var(--font); letter-spacing: -.02em; color: #fff; overflow-wrap: anywhere; }
.fm-head-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-top: 14px; }
.fm-meta { font-size: 13.5px; color: var(--muted); }
.fm-head-foot .pp-mbtn { height: 38px; }

.fm-msg { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 14px; padding: 16px 18px; border-radius: 18px; border: 1px solid var(--line); background: rgba(10, 16, 30, .55); }
.fm-msg.is-starter { padding: 20px 22px; border-color: var(--line-2); background: linear-gradient(160deg, rgba(17, 26, 46, .75), rgba(7, 11, 20, .82)); }
.fm-msg.is-new { animation: mb-row .5s var(--ease) both; }
.fm-av { width: 40px; height: 40px; border-radius: 50%; background: var(--panel); object-fit: cover; }
.fm-by { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-bottom: 6px; }
.fm-by b { font-weight: 600; color: #fff; overflow-wrap: anywhere; }
.fm-by time, .fm-by .fm-edited { font-size: 12.5px; color: var(--dim); }
.fm-badge { display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border-radius: 5px; background: rgba(88, 101, 242, .9); color: #fff; font: 600 10.5px/1 var(--font); letter-spacing: .02em; align-self: center; }
.fm-badge.is-staff { background: rgba(71, 230, 161, .16); color: #8ff0c4; border: 1px solid rgba(71, 230, 161, .45); }
.fm-badge.is-web { background: rgba(47, 107, 255, .22); color: #a9cbff; border: 1px solid rgba(79, 141, 255, .45); }
.fm-tools { display: flex; gap: 8px; margin-left: auto; align-self: center; }
.fm-tools button { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 9px; border-radius: 8px; color: var(--muted); font: 500 12.5px var(--font); transition: color .2s, background .2s; }
.fm-tools button:hover { color: #ff9b9b; background: rgba(255, 92, 92, .1); }
.fm-tools .ico { font-size: 15px; }

.fm-replies-head { margin: 26px 0 12px; font: 600 13px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.fm-replies { display: grid; gap: 8px; }
.fm-reply { margin-top: 18px; }
.fm-reply textarea { min-height: 96px; }
.fm-reply-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
.fm-reply-foot .mb-count { justify-self: auto; }

/* What people wrote (Discord's formatting) */
.fm-text { font-size: 15px; line-height: 1.6; color: var(--text); overflow-wrap: anywhere; }
.fm-text > * + * { margin-top: 8px; }
.fm-text p { white-space: pre-wrap; }
.fm-text strong { color: #fff; font-weight: 700; }
.fm-text a { color: #8fb6ff; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(143, 182, 255, .4); }
.fm-text a:hover { text-decoration-color: currentColor; }
.fm-text code { padding: 1px 5px; border-radius: 5px; background: rgba(255, 255, 255, .07); font: 400 .88em var(--mono); }
.fm-text blockquote { padding-left: 12px; border-left: 3px solid var(--line-3); color: var(--text-2); }
.fm-text ul, .fm-text ol { padding-left: 22px; }
.fm-text ul { list-style: disc; }
.fm-text ol { list-style: decimal; }
.fm-text .fm-h { font-weight: 800; color: #fff; line-height: 1.3; }
.fm-text .fm-h1 { font-size: 1.45em; }
.fm-text .fm-h2 { font-size: 1.25em; }
.fm-text .fm-h3 { font-size: 1.1em; }
.fm-text .fm-sub { font-size: 12.5px; color: var(--dim); }
.fm-text .fm-mention { padding: 0 3px; border-radius: 4px; background: rgba(88, 101, 242, .25); color: #c9cdfb; font-weight: 500; }
.fm-text .fm-emoji { width: 1.375em; height: 1.375em; object-fit: contain; vertical-align: -.3em; }
.fm-text .fm-spoiler { border-radius: 4px; background: #1b2233; color: transparent; cursor: pointer; transition: background .2s, color .2s; }
.fm-text .fm-spoiler > * { visibility: hidden; }
.fm-text .fm-spoiler.is-shown { background: rgba(255, 255, 255, .08); color: inherit; cursor: auto; }
.fm-text .fm-spoiler.is-shown > * { visibility: visible; }
.fm-text time { padding: 0 3px; border-radius: 4px; background: rgba(255, 255, 255, .06); }
.fm-code { border-radius: 12px; border: 1px solid var(--line); background: #070b14; overflow: hidden; }
.fm-code-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; height: 36px; padding: 0 6px 0 12px; border-bottom: 1px solid var(--line); font: 500 12px var(--mono); color: var(--dim); }
.fm-code-bar button { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 7px; color: var(--text-2); font: 600 12px var(--font); transition: background .2s, color .2s; }
.fm-code-bar button:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.fm-code-bar button.is-done { color: var(--green); }
.fm-code-bar .ico { font-size: 14px; }
.fm-code pre { max-height: 460px; margin: 0; padding: 12px 14px; overflow: auto; font: 400 13px/1.6 var(--mono); color: #dbe5ff; white-space: pre-wrap; overflow-wrap: anywhere; }
.fm-code code { padding: 0; background: none; font: inherit; }

/* Files, link previews, reactions */
.fm-files { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.fm-img { display: block; max-width: min(100%, 420px); border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--panel); }
.fm-img img { display: block; max-width: 100%; max-height: 360px; width: auto; height: auto; object-fit: contain; }
.fm-img.is-spoiler img { filter: blur(26px); }
.fm-img.is-spoiler.is-shown img { filter: none; }
.fm-file { display: inline-flex; align-items: center; gap: 10px; max-width: 100%; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .03); color: var(--text); font-size: 14px; }
.fm-file:hover { border-color: var(--line-3); }
.fm-file .ico { font-size: 20px; color: #a9cbff; flex-shrink: 0; }
.fm-file span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fm-file small { color: var(--dim); white-space: nowrap; }
.fm-embed { margin-top: 10px; max-width: 520px; padding: 12px 14px; border-radius: 8px; border-left: 4px solid var(--c, var(--line-3)); background: rgba(255, 255, 255, .035); }
.fm-embed small { display: block; margin-bottom: 4px; font-size: 12px; color: var(--dim); }
.fm-embed b, .fm-embed b a { display: block; color: #8fb6ff; font-weight: 600; }
.fm-embed .fm-text { margin-top: 4px; font-size: 14px; color: var(--text-2); }
.fm-embed img { display: block; max-width: 100%; max-height: 300px; margin-top: 10px; border-radius: 8px; }
.fm-reacts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.fm-react { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 9px; border-radius: 8px; border: 1px solid var(--line); background: rgba(255, 255, 255, .04); font-size: 13px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.fm-react img { width: 18px; height: 18px; object-fit: contain; }

/* ---------- A new post ---------- */
.fm-compose-title { font: 800 24px var(--font); color: #fff; }
.fm-compose input[type="text"] {
  width: 100%; height: 50px; padding: 0 16px; border-radius: 14px; border: 1px solid var(--line-2); background: rgba(6, 10, 20, .8); color: var(--text);
  font: 400 15px var(--font); transition: border-color .25s, box-shadow .25s;
}
.fm-compose input[type="text"]:focus { outline: 0; border-color: var(--blue-2); box-shadow: 0 0 0 4px rgba(47, 107, 255, .15); }
.fm-pick { border: 0; padding: 0; margin: 0; min-width: 0; }
.fm-pick legend { padding: 0; margin-bottom: 8px; font: 600 14.5px var(--font); color: #fff; }
.fm-pick small { display: block; margin-bottom: 10px; font-size: 13px; color: var(--muted); }
.fm-pick .fm-tags { margin: 0; }
.fm-guidelines { padding: 14px 16px; border-radius: 14px; border: 1px solid rgba(79, 141, 255, .3); background: rgba(47, 107, 255, .07); }
.fm-guidelines b { display: block; margin-bottom: 6px; font-size: 13px; color: #a9cbff; }
.fm-guidelines .fm-text { font-size: 14px; color: var(--text-2); }

@media (max-width: 680px) {
  .fm.is-reading { padding-top: calc(var(--header-h) + 18px); }
  .fm-bar .mb-tabs { flex: 1 1 100%; }
  .fm-new-btn { flex: 1 1 100%; justify-content: space-between; }
  .fm-card { grid-template-columns: minmax(0, 1fr); padding: 14px; }
  .fm-thumb { grid-row: 1; width: 100%; height: 150px; }
  .fm-msg { grid-template-columns: 32px minmax(0, 1fr); gap: 10px; padding: 13px 14px; }
  .fm-msg.is-starter { padding: 16px; }
  .fm-av { width: 32px; height: 32px; }
  .fm-reply-foot .btn { flex: 1; justify-content: space-between; }
  .fm-tools button span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .fm-card, .fm-msg.is-new { animation: none; }
  .fm-card:hover { transform: none; }
}
