/* Comentários do fórum e do player usam a mesma paleta e os mesmos controles. */
body.forum-page .ff-post-card[data-op-answer-landing] {
  --op-answer-accent: #b84018;
  --op-answer-highlight: #fff1e7;
  --op-answer-line: #dbe2eb;
}
html[data-theme="dark"] body.forum-page .ff-post-card[data-op-answer-landing],
body.forum-page.dark-theme .ff-post-card[data-op-answer-landing] {
  --op-answer-accent: #ffab7f;
  --op-answer-highlight: #2d2830;
  --op-answer-line: #34465d;
}
body.forum-page .ff-post-card[data-op-answer-landing] .ff-conversation {
  padding: 8px clamp(8px, 2vw, 16px) 14px !important;
}
body.forum-page .ff-post-card[data-op-answer-landing] .ff-conversation-heading {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px;
  margin-bottom: 12px !important;
}
body.forum-page .ff-post-card[data-op-answer-landing] .ff-conversation-heading :is(h3, label) { margin-block: 0; }
body.forum-page .ff-post-card[data-op-answer-landing] [data-thread-group] > .ff-thread {
  box-sizing: border-box; min-width: 0; padding: 8px clamp(6px, 1.4vw, 12px) !important;
}
body.forum-page .ff-post-card[data-op-answer-landing] [data-thread-group] > .ff-thread + .ff-thread {
  margin-top: 6px !important;
}
body.forum-page .ff-post-card[data-op-answer-landing] .ff-conversation > [data-thread-group] > .ff-thread + .ff-thread {
  border-top: 1px solid var(--op-answer-line);
}
body.forum-page .ff-post-card[data-op-answer-landing] .ff-comment-identity {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 3px 7px; min-width: 0;
}
body.forum-page .ff-post-card[data-op-answer-landing] .ff-comment-content > p {
  margin-block: 5px 10px !important; line-height: 1.5; overflow-wrap: anywhere;
}
body.forum-page .ff-post-card[data-op-answer-landing] .ff-comment-content > :is(.ff-social, .ff-comment-actions) {
  flex-wrap: wrap; gap: 6px 9px;
}
body.forum-page .ff-post-card[data-op-answer-landing] :is(.ff-thread, .forum-official-answer).op-comment-highlight {
  border-radius: 10px; background: var(--op-answer-highlight) !important;
  box-shadow: inset 3px 0 var(--op-answer-accent);
  scroll-margin-block: 88px 24px;
}
body.forum-page .ff-post-card[data-op-answer-landing] :is(.ff-thread, .forum-official-answer).op-comment-highlight:focus {
  outline: none !important;
}
@media (max-width: 760px) {
  body.forum-page .ff-post-card[data-op-answer-landing] .ff-conversation-heading label {
    flex: 1 1 100%; margin-inline-start: 0 !important;
  }
  body.forum-page .ff-post-card[data-op-answer-landing] .ff-comment-content > :is(.ff-social, .ff-comment-actions) {
    row-gap: 8px;
  }
}

body.forum-page :is(.ff-page-comments-sheet, .ff-video-comments-panel) {
  --op-comment-surface: #fffdf8;
  --op-comment-text: #18263a;
  --op-comment-muted: #52647c;
  --op-comment-line: #d9e1eb;
  --op-comment-accent: #a43a12;
  --op-comment-field: #f0f4f9;
  --ff-feed-card: var(--op-comment-surface);
  --ff-feed-text: var(--op-comment-text);
  --ff-feed-muted: var(--op-comment-muted);
  --ff-feed-pill: var(--op-comment-field);
  --forum-border: var(--op-comment-line);
  background: var(--op-comment-surface);
  color: var(--op-comment-text);
  color-scheme: light;
}
html[data-theme="dark"] body.forum-page :is(.ff-page-comments-sheet, .ff-video-comments-panel) {
  --op-comment-surface: #111f31;
  --op-comment-text: #f2f6fd;
  --op-comment-muted: #afbed1;
  --op-comment-line: #34465d;
  --op-comment-accent: #ffab7f;
  --op-comment-field: #1a2c41;
  color-scheme: dark;
}
body.forum-page .ff-page-comments-sheet {
  position: fixed;
  inset: 0 0 0 auto;
  margin: 0;
  width: min(530px, 100vw);
  max-width: none;
  height: 100dvh;
  max-height: none;
  padding: 0;
  border: 0;
  border-inline-start: 1px solid var(--op-comment-line);
  border-radius: 20px 0 0 20px;
  box-shadow: -12px 0 55px #07142644;
  overflow: hidden;
}
body.forum-page .ff-page-comments-sheet[open] { display: flex; flex-direction: column; }
body.forum-page .ff-page-comments-sheet[hidden] { display: none !important; }
body.forum-page .ff-page-comments-sheet::backdrop { background: #09132285; }
body.forum-page .ff-page-comments-sheet > header {
  display: flex; align-items: center; justify-content: space-between;
  flex: 0 0 auto; min-height: 53px; padding: 0 18px;
  border-bottom: 1px solid var(--op-comment-line);
}
body.forum-page .ff-page-comments-sheet > header h2 { margin: 0; color: inherit; font-size: 1.1rem; }
body.forum-page :is(.ff-page-comments-sheet > header, .ff-vc-header) button {
  width: 36px; height: 36px; border: 0; border-radius: 10px;
  background: var(--op-comment-field); color: var(--op-comment-text);
  font-size: 1.4rem; cursor: pointer;
}
body.forum-page .ff-page-comments-sheet .ff-reels-sheet-handle { display: none; }
body.forum-page .ff-page-comments-sheet .ff-reels-post-preview {
  padding: 8px 18px; border-bottom: 1px solid var(--op-comment-line); color: var(--op-comment-muted);
}
body.forum-page .ff-page-comments-sheet .ff-reels-post-byline { display: flex; align-items: center; gap: 8px; }
body.forum-page .ff-page-comments-sheet .ff-reels-post-summary { display: flex; align-items: center; gap: 8px; min-height: 0; margin: 3px 0 0; }
body.forum-page .ff-page-comments-sheet .ff-reels-post-text { flex: 1; color: var(--op-comment-text); font-size: .85rem; overflow-wrap: anywhere; }
body.forum-page .ff-page-comments-sheet :is(.ff-reels-post-avatar, .ff-reels-post-thumb) {
  flex: 0 0 28px; width: 28px; height: 28px; border-radius: 7px; overflow: hidden;
}
body.forum-page .ff-page-comments-sheet :is(.ff-reels-post-avatar, .ff-reels-post-thumb) :is(img, svg, canvas) {
  width: 100%; height: 100%; object-fit: cover;
}
body.forum-page .ff-page-comments-sheet .ff-reels-post-thumb[hidden] { display: none !important; }
body.forum-page .ff-page-comments-sheet .ff-reels-comments-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.ff-page-comment-space { pointer-events: none; }
body.forum-page .ff-page-comments-sheet .ff-page-comment-card,
body.forum-page .ff-page-comments-sheet .ff-page-comment-card > .forum-topic-expanded,
body.forum-page .ff-page-comments-sheet .ff-page-comment-card .ff-comments {
  margin: 0 !important; padding: 0 !important; height: auto !important;
  min-height: 100% !important; max-width: none !important; overflow: visible !important;
  border: 0 !important; border-radius: 0 !important; box-shadow: none !important;
  background: transparent !important; color: inherit !important;
}
body.forum-page .ff-page-comments-sheet .ff-page-comment-card > :not(.forum-topic-expanded),
body.forum-page .ff-page-comments-sheet .ff-page-comment-card > .forum-topic-expanded > :not(.op-comment-layout),
body.forum-page .ff-page-comments-sheet .ff-page-comment-card .ff-comments > summary { display: none !important; }
body.forum-page .ff-page-comments-sheet .ff-page-comment-card .ff-comments[open] {
  display: flex !important; flex-direction: column;
}
body.forum-page .ff-page-comments-sheet .ff-page-comment-card .ff-comments > :is(.ff-conversation, .forum-official-answer, .ff-participate-prompt) {
  display: block !important; margin: 0 !important; padding: 10px 18px !important;
  background: transparent !important; color: inherit !important; border: 0 !important;
}
body.forum-page .ff-page-comments-sheet .ff-page-comment-card .ff-comments > .ff-reply-root {
  display: block !important; position: sticky; z-index: 2; bottom: 0;
  min-height: 0 !important; margin: auto 0 0 !important; padding: 8px 16px max(8px, env(safe-area-inset-bottom)) !important;
  border-top: 1px solid var(--op-comment-line) !important; background: var(--op-comment-surface) !important;
}
body.forum-page .ff-page-comments-sheet .ff-comment-composer {
  position: relative; display: flex !important; flex-direction: column;
  margin: 0 !important; padding: 0 !important; min-height: 0 !important; background: transparent !important;
}
body.forum-page .ff-page-comments-sheet .ff-reply-target { display: block !important; margin: 0; color: var(--op-comment-muted); font-size: .8rem; }
body.forum-page .ff-page-comments-sheet .ff-reply-target:has(+ [data-reply-cancel][hidden]) { display: none !important; }
body.forum-page .ff-page-comments-sheet .ff-comment-composer [data-reply-cancel][hidden] { display: none !important; }
body.forum-page .ff-page-comments-sheet .ff-comment-composer > .ff-comment-text { order: 0; flex: 0 0 auto; width: 100%; min-width: 0; margin: 0; }
body.forum-page :is(.ff-page-comments-sheet .ff-comment-composer, .ff-video-comments-panel) textarea {
  display: block; min-height: 48px !important; block-size: clamp(54px, 9dvh, 82px);
  max-height: 100px; padding: 10px 13px !important;
  border: 1px solid var(--op-comment-line) !important; border-radius: 14px !important;
  background: var(--op-comment-field) !important; color: var(--op-comment-text) !important;
  width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box;
  font-size: 1rem !important; line-height: 1.4; resize: none;
}
body.forum-page :is(.ff-page-comments-sheet, .ff-video-comments-panel) textarea::placeholder { color: var(--op-comment-muted); }
body.forum-page :is(.ff-page-comments-sheet .ff-comment-composer, .ff-video-comments-panel .ff-vc-input-wrap) textarea:focus {
  border-color: var(--op-comment-accent) !important;
  outline: 2px solid var(--op-comment-accent) !important;
  outline-offset: -2px !important;
}
body.forum-page .ff-page-comments-sheet .ff-comment-toolbar { padding: 0 50px 0 0 !important; min-height: 42px; background: transparent !important; }
body.forum-page .ff-page-comments-sheet .ff-comment-submit { position: absolute; right: 0; bottom: 1px; margin: 0 !important; }
body.forum-page .ff-page-comments-sheet .ff-comment-submit [data-reply-cancel] { display: none !important; }
body.forum-page .ff-page-comments-sheet .ff-reels-link-box[hidden] { display: none !important; }
body.forum-page .ff-page-comments-sheet .ff-reels-link-box { display: flex; gap: 6px; order: 2; }
body.forum-page .ff-page-comments-sheet .ff-reels-link-box input { min-width: 0; flex: 1; }
body.forum-page :is(.ff-page-comments-sheet .ff-comment-submit button[type="submit"], .ff-video-comments-panel .ff-vc-send) {
  display: grid; place-items: center; width: 40px; height: 40px;
  border-radius: 11px !important; padding: 0 !important;
  background: var(--op-comment-accent) !important; color: var(--op-comment-surface) !important;
}
body.forum-page .ff-page-comments-sheet :is(.ff-comment-toolbar, .ff-comment-submit) button svg { width: 21px; height: 21px; }
body.forum-page :is(.ff-page-comments-sheet, .ff-video-comments-panel) .op-comment-emojis {
  order: -1; display: flex; flex-wrap: wrap; align-items: center; gap: 3px; margin: 0 0 4px;
}
body.forum-page :is(.ff-page-comments-sheet, .ff-video-comments-panel) .op-comment-emojis button {
  display: grid; place-items: center; min-width: 35px; min-height: 34px;
  padding: 0; border: 0; border-radius: 8px; background: transparent;
  font: inherit; font-size: 1.24rem; cursor: pointer;
}
body.forum-page :is(.ff-page-comments-sheet, .ff-video-comments-panel) .op-comment-emojis button:is(:hover, :focus-visible) {
  background: var(--op-comment-field); outline-color: var(--op-comment-accent);
}
body.forum-page .ff-video-comments-panel:has(textarea:disabled) .op-comment-emojis { display: none; }
body.forum-page .ff-video-comments-panel .ff-vc-compose { background: var(--op-comment-surface); border-color: var(--op-comment-line); }
body.forum-page .ff-video-comments-panel .ff-vc-list :is(.ff-comment, .ff-comment-content > p, .ff-conversation) { color: var(--op-comment-text) !important; }
body.forum-page :is(.ff-page-comments-sheet, .ff-video-comments-panel) .ff-thread > .ff-comment { position: relative; background: transparent !important; color: inherit; }
/* O resumo das respostas já oferece o controle de expandir e recolher. */
body.forum-page :is(.ff-page-comments-sheet, .ff-video-comments-panel)
  .ff-thread:has(> .ff-comment > .ff-comment-content > .ff-replies > summary)
  > .ff-thread-rail[data-thread-toggle] {
  display: none !important;
}
body.forum-page :is(.ff-page-comments-sheet, .ff-video-comments-panel) .ff-comment-identity { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
body.forum-page :is(.ff-page-comments-sheet, .ff-video-comments-panel) .ff-comment-identity time { color: var(--op-comment-muted); font-size: .76rem; }
body.forum-page :is(.ff-page-comments-sheet, .ff-video-comments-panel) .ff-comment-content > .ff-social > :is(form:has(button[aria-pressed]), a.ff-like-login) { margin-inline-start: auto; order: 5; }
body.forum-page :is(.ff-page-comments-sheet, .ff-video-comments-panel) .ff-comment-content > .ff-social button[aria-pressed="true"] { color: var(--op-comment-accent) !important; }
body.forum-page .ff-video-comments-panel :is(.ff-comment-actions button, .ff-comment-actions a, .ff-vc-toolbar button, .ff-vc-status, .ff-vc-login) { color: var(--op-comment-text) !important; }
body.forum-page .ff-video-comments-panel .ff-vc-send:disabled { opacity: .55; }
@media (max-width: 760px) {
  body.forum-page .ff-page-comments-sheet {
    inset: auto 0 0; width: 100%; height: min(78dvh, var(--ff-page-comment-height, 100dvh));
    border-radius: 20px 20px 0 0; border-inline-start: 0;
  }
  body.forum-page .ff-page-comments-sheet[data-keyboard-open] {
    top: var(--ff-page-comment-top, 0px); bottom: auto;
    height: var(--ff-page-comment-height, 100dvh);
  }
  body.forum-page .ff-page-comments-sheet .ff-reels-sheet-handle {
    display: block; align-self: center; flex: 0 0 auto; width: 37px; height: 4px;
    margin-top: 7px; border-radius: 4px; background: var(--op-comment-line);
  }
  body.forum-page .ff-page-comments-sheet .ff-reels-post-preview { display: none; }
}

body.forum-page .ff-page-comments-sheet .ff-reels-comments-body {
  position: relative; min-height: 0; overflow: hidden;
}
body.forum-page .ff-page-comments-sheet .ff-page-comment-card,
body.forum-page .ff-page-comments-sheet .ff-page-comment-card > .forum-topic-expanded {
  position: static !important; min-height: 0 !important; overflow: visible !important;
}
body.forum-page .ff-page-comments-sheet .ff-page-comment-card .op-comment-layout {
  position: absolute; inset: 0; display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-height: 0; min-width: 0;
}
body.forum-page .ff-page-comments-sheet .ff-page-comment-card .op-comment-layout > .ff-comments[open] {
  display: block !important; height: auto !important; min-height: 0 !important;
  width: 100% !important; max-width: none !important; overflow-y: auto !important;
  overscroll-behavior: contain;
}
body.forum-page .ff-page-comments-sheet .op-comment-footer {
  position: relative; min-width: 0; border-top: 1px solid var(--op-comment-line);
  background: var(--op-comment-surface);
  padding: 8px clamp(10px, 2.5vw, 16px) max(10px, env(safe-area-inset-bottom));
}
body.forum-page .ff-page-comments-sheet .op-comment-footer > :is(.ff-reply-root, .ff-participate-prompt) {
  display: block !important; width: 100% !important; max-width: none !important;
  min-height: 0 !important; margin: 0 !important; padding: 0 !important; border: 0 !important;
}
body.forum-page .ff-page-comments-sheet .ff-reply-root .ff-comment-composer,
body.forum-page .ff-video-comments-panel .ff-vc-compose {
  max-height: min(47dvh, 320px); overflow-y: auto; overscroll-behavior: contain;
}
body.forum-page .ff-page-comments-sheet .op-comment-footer .ff-comment-composer {
  box-sizing: border-box; min-width: 0; gap: 5px; padding: 2px 3px 4px !important;
}
body.forum-page .ff-video-comments-panel .ff-vc-input-wrap {
  min-width: 0; margin: 3px 1px;
}
body.forum-page .ff-page-comments-sheet .op-comment-footer .ff-comment-composer :is(.ff-comment-toolbar,.ff-comment-submit) { display: flex !important; }
body.forum-page .ff-page-comments-sheet .op-comment-footer .op-comment-actions {
  order: 3; display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; min-width: 0;
}
body.forum-page .ff-page-comments-sheet .op-comment-footer .ff-comment-submit {
  position: static; flex: 0 0 auto; margin: 0 !important; min-height: 44px;
}
body.forum-page .ff-page-comments-sheet .op-comment-footer .ff-comment-toolbar {
  min-height: 44px; min-width: 0; padding-inline-end: 0 !important; flex-wrap: wrap;
}
body.forum-page .ff-page-comments-sheet .op-comment-footer .ff-comment-send-status {
  order: 5; padding-inline-end: 50px; margin: 4px 0 0;
}
body.forum-page .ff-page-comments-sheet .op-comment-footer .ff-comment-submit button[type="submit"],
body.forum-page .ff-video-comments-panel .ff-vc-toolbar button.ff-vc-send:not(:disabled) {
  min-width: 44px; min-height: 44px; background: #b84018 !important; color: white !important;
  border: 0 !important; box-shadow: 0 2px 8px #8e300638;
}
body.forum-page .ff-page-comments-sheet .op-comment-footer .ff-comment-submit button[type="submit"]:disabled { opacity: .55; }
body.forum-page :is(.ff-page-comments-sheet .ff-comment-submit, .ff-video-comments-panel .ff-vc-send) svg { pointer-events: none; }
body.forum-page .ff-page-comments-sheet .op-comment-actions + .ff-reels-link-box { order: 2; }
body.forum-page :is(.ff-page-comments-sheet, .ff-video-comments-panel) .op-comment-emojis {
  display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 0;
}
body.forum-page :is(.ff-page-comments-sheet, .ff-video-comments-panel) .op-comment-emojis button {
  min-width: 0;
}
body.forum-page .ff-video-comments-panel:has(textarea:disabled) .op-comment-emojis { display: none; }
.op-comment-media { display: none; }
@media (max-width: 760px) {
  body.forum-page :is(.ff-page-comments-sheet .ff-comment-composer, .ff-video-comments-panel) textarea {
    block-size: clamp(48px, 8dvh, 68px);
  }
  body.forum-page .ff-page-comments-sheet[data-keyboard-open] .op-comment-footer .ff-comment-composer {
    max-height: min(320px, calc(var(--ff-page-comment-height, 100dvh) * .58));
  }
}
@media (min-width: 761px) {
  body.forum-page .ff-page-comments-sheet[open] {
    inset: 0; margin: auto; width: min(530px, calc(100vw - 40px));
    height: min(780px, calc(100dvh - 56px)); border: 1px solid var(--op-comment-line);
    border-radius: 20px; grid-template-rows: auto auto minmax(0, 1fr);
  }
  body.forum-page .ff-page-comments-sheet[open]:has(.op-comment-media:not([hidden])) {
    display: grid; width: min(1160px, calc(100vw - 48px));
    grid-template-columns: minmax(0, 1.18fr) minmax(0, 1fr);
  }
  body.forum-page .ff-page-comments-sheet:has(.op-comment-media:not([hidden])) > header { grid-area: 1 / 2; }
  body.forum-page .ff-page-comments-sheet:has(.op-comment-media:not([hidden])) > .ff-reels-post-preview { grid-area: 2 / 2; }
  body.forum-page .ff-page-comments-sheet:has(.op-comment-media:not([hidden])) > .ff-reels-comments-body { grid-area: 3 / 2; }
  body.forum-page .ff-page-comments-sheet .op-comment-media:not([hidden]) {
    display: grid; position: relative; grid-area: 1 / 1 / 4 / 2;
    min-width: 0; min-height: 0; place-items: center; background: #0b1420;
  }
  .op-comment-media > :is(img, video) { display: block; width: 100%; height: 100%; object-fit: contain; min-height: 0; }
  .op-comment-media-controls {
    position: absolute; inset-inline: 12px; bottom: 14px;
    display: flex; justify-content: space-between; pointer-events: none;
  }
  .op-comment-media-controls button {
    pointer-events: auto; border: 1px solid #fff6; border-radius: 12px; width: 41px; height: 41px;
    color: white; background: #172538e8; font: inherit; font-size: 1.4rem; cursor: pointer;
  }
  body.forum-page .ff-video-viewer-panel:has(.ff-video-comments-panel:not([hidden])) > .ff-video-viewer-stage {
    position: absolute; inset-inline: 0 auto; width: max(52%, calc(100% - 440px)) !important;
    max-width: none; margin-inline: 0;
  }
  body.forum-page .ff-video-viewer-panel:has(.ff-video-comments-panel:not([hidden])) > .ff-video-comments-veil { display: none; }
}
