/* cBB Reactions: Zeina surfaces, post footer and reaction browser. */
.reaction-post-bar, .reactions-launcher, .reactions-login, .reactions-view-dialog, .reactions-dropdown, .reactions-view-list {
    --rx-accent: var(--color-primary, 132, 49, 69);
    --rx-bg: #fff;
    --rx-soft: #f8fafc;
    --rx-ink: #263347;
    --rx-muted: #64748b;
    --rx-line: rgba(100, 116, 139, .17);
}
.dark .reaction-post-bar, .dark .reactions-launcher, .dark .reactions-login, .dark .reactions-view-dialog, .dark .reactions-dropdown, .dark .reactions-view-list {
    --rx-accent: var(--color-primary-dark, var(--color-primary, 213, 129, 149));
    --rx-bg: #182133;
    --rx-soft: #172235;
    --rx-ink: #f1f5f9;
    --rx-muted: #a8b4c6;
    --rx-line: rgba(148, 163, 184, .18);
}
.reaction-post-bar {
    display: flex; flex-direction: row; align-items: center; gap: 14px;
    clear: both; margin: 18px 0 0; padding: 14px 0 2px;
    border: 0; border-block-start: 1px solid var(--rx-line); border-radius: 0;
    background: transparent; color: var(--rx-muted); line-height: 1.5;
}
.reaction-post-bar::after, .reaction-score-list::after, .reaction-launcher-wrapper::before { display: none; }
.reaction-post-bar .reaction-score-list {
    display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
    order: 0; min-width: 0; margin: 0; padding: 0; flex: 1;
}
.reaction-post-bar .reaction-score-list.empty { display: none; }
.reaction-empty-hint { display: none; font-size: 13px; color: var(--rx-muted); }
.reaction-score-list.empty + .reaction-empty-hint { display: block; flex: 1; }
.reaction-post-bar .list-scores {
    display: flex; order: 0; flex-wrap: wrap; gap: 2px; align-items: center; max-width: 100%;
    padding: 3px; border: 1px solid var(--rx-line); border-radius: 12px; background: var(--rx-soft);
}
.reaction-post-bar .list-scores .reaction-score-chip {
    display: inline-flex; float: none; align-items: center; justify-content: center; gap: 6px;
    min-width: 46px; min-height: 34px; margin: 0; padding: 6px 9px;
    border: 0; border-radius: 8px; background: transparent;
    color: var(--rx-ink); font-size: 12px; font-weight: 600; line-height: 1;
    text-decoration: none; transition: background-color 140ms ease, border-color 140ms ease;
}
.reaction-post-bar .list-scores .reaction-score-chip.is-mine { background: rgba(var(--rx-accent), .12); box-shadow: inset 0 0 0 1px rgba(var(--rx-accent), .25); }
.reaction-post-bar .reaction-score-list .list-scores a.reaction-score-chip { margin: 0; }
.reaction-post-bar .list-scores .reaction-score-chip img { width: 20px; height: 20px; border-radius: 0; object-fit: contain; }
.reaction-score-count { font-variant-numeric: tabular-nums; }
.reaction-post-bar .list-label { order: 1; min-width: 0; max-width: 100%; white-space: normal; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.reaction-post-bar .list-label a, .reaction-post-bar .list-label > span { display: block; float: none; border: 0; padding: 0; color: var(--rx-muted); font-size: inherit; line-height: inherit; text-decoration: none; border-radius: 2px; }
.reaction-post-bar .list-label a { position: relative; padding-inline-end: 18px; }
.reaction-summary-names { min-width: 0; overflow-wrap: anywhere; color: var(--rx-ink); font-weight: 500; }
.reaction-summary-arrow { position: absolute; inset-inline-end: 0; top: 50%; transform: translateY(-50%); opacity: .65; }
.rtl .reaction-summary-arrow { transform: translateY(-50%) rotate(180deg); }
.reaction-post-bar .list-label a.reaction-social-summary {
    display: grid; grid-template-columns: auto minmax(0, 1fr) 14px; align-items: center; gap: 11px;
    min-height: 44px; width: fit-content; max-width: 100%; padding: 2px 0; border-radius: 8px;
    text-decoration: none;
}
.reaction-preview { display: inline-flex; align-items: center; flex-shrink: 0; padding-inline-end: 1px; }
.reaction-post-bar .reaction-preview img { position: relative; width: 30px; height: 30px; border: 3px solid var(--rx-bg); border-radius: 50%; background: var(--rx-bg); object-fit: contain; }
.reaction-preview img:nth-child(1) { z-index: 3; }
.reaction-preview img:nth-child(2) { z-index: 2; }
.reaction-preview img:not(:first-child) { margin-inline-start: -8px; }
.reaction-post-bar .reaction-social-summary .reaction-summary-arrow { position: static; transform: none; opacity: .5; }
.rtl .reaction-post-bar .reaction-social-summary .reaction-summary-arrow { transform: rotate(180deg); }
.reaction-post-bar .reaction-label-desktop { display: inline; }
.reaction-post-bar .reaction-label-mobile { display: none; }
.reaction-post-bar .reaction-launcher-wrapper { order: 0; flex-shrink: 0; margin: 0; margin-inline-start: auto; padding: 0; }
.reaction-launcher-wrapper, li.reactions-launcher, li.reactions-login { list-style: none; padding: 0; }
.reactions-login .icon { stroke: currentColor; fill: currentColor; }
:is(.reactions-launcher, .reactions-login) > a.reaction-button {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    width: auto; height: auto; min-height: 42px; margin: 0; padding: 9px 12px;
    border: 1px solid var(--rx-line); border-radius: 10px; background: transparent;
    color: var(--rx-ink); font: inherit; text-decoration: none; box-shadow: none; text-shadow: none;
    transition: background-color 140ms ease, border-color 140ms ease;
}
:is(.reactions-launcher, .reactions-login) > a.reaction-button.default-icon { width: auto; }
:is(.reactions-launcher, .reactions-login) > a.reaction-button span { display: inline; font-size: 13px; font-weight: 550; line-height: 1.3; }
:is(.reactions-launcher, .reactions-login) > a.reaction-button img, :is(.reactions-launcher, .reactions-login) > a.reaction-button svg { flex-shrink: 0; width: 21px; height: 21px; object-fit: contain; }
:is(.reactions-launcher, .reactions-login) > a.reaction-button.default-icon img { filter: none; opacity: 1; }
:is(.reactions-launcher, .reactions-login) > a.reaction-button:not(.default-icon) { border-color: rgba(var(--rx-accent), .3); background: rgba(var(--rx-accent), .06); }
:is(.reactions-launcher, .reactions-login) > a.reaction-button:not(.default-icon) span { color: var(--rx-ink) !important; }
/* Override the site's older inline lively-shake / scale rules, including dark mode. */
:is(.reactions-launcher, .reactions-login) > a.reaction-button,
:is(.reactions-launcher, .reactions-login) > a.reaction-button:hover,
:is(.reactions-launcher, .reactions-login) > a.reaction-button:active,
:is(.reactions-launcher, .reactions-login) > a.reaction-button:focus {
    animation: none !important; transform: none !important; scale: none !important; rotate: none !important; translate: none !important;
    box-shadow: none !important; will-change: auto !important; color: var(--rx-ink) !important;
    transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease !important;
}
:is(.reactions-launcher, .reactions-login) > a.reaction-button img, :is(.reactions-launcher, .reactions-login) > a.reaction-button svg, :is(.reactions-launcher, .reactions-login) > a.reaction-button span {
    animation: none !important; transform: none !important; scale: none !important; rotate: none !important; translate: none !important; transition: none !important;
}
:is(.reactions-launcher, .reactions-login) > a.reaction-button span { color: var(--rx-ink) !important; }
:is(.reactions-launcher, .reactions-login) > a.reaction-button.default-icon { border-radius: 10px; }

/* Preserve the CaniDev dialog lifecycle and confirmation overlays. */
.cbb-overlay.reactions-view-overlay { background: rgba(11, 18, 31, .55); opacity: 1; backdrop-filter: blur(3px); }
body > .cbb-dialog.reactions-view-dialog.fixed {
    top: 50%; left: 50%; right: auto; bottom: auto; transform: translate(-50%, -50%);
    width: min(40rem, calc(100vw - 2rem)) !important;
    max-height: calc(100vh - 2rem); max-height: calc(100dvh - 2rem);
    display: flex; flex-direction: column; overflow: hidden;
    animation: none;
    border: 1px solid var(--rx-line); border-radius: 20px;
    background: var(--rx-bg); color: var(--rx-ink); font: inherit; font-size: 14px;
    box-shadow: 0 24px 80px -20px rgba(10, 20, 36, .34);
}
.reactions-view-dialog *, .reactions-dropdown *, .reactions-view-list * { box-sizing: border-box; font-family: inherit; }
.cbb-dialog.reactions-view-dialog > .cbb-dialog-header {
    display: flex; flex-direction: row-reverse; align-items: center; justify-content: space-between; gap: 16px;
    flex-shrink: 0; margin: 0; padding: 20px 22px 16px 26px;
    border: 0; color: var(--rx-ink); background: transparent; font-size: 22px; line-height: 1.25; font-weight: 650; letter-spacing: -.025em;
}
.reactions-view-dialog .cbb-dialog-title { min-width: 0; overflow-wrap: anywhere; }
.reactions-view-dialog .cbb-dialog-title:focus { outline: none; }
.cbb-dialog.reactions-view-dialog .cbb-dialog-close {
    display: inline-flex; align-items: center; justify-content: center; float: none; flex-shrink: 0; position: relative;
    width: 44px; height: 44px; margin: -3px -8px -3px 0; padding: 12px; border: 0; border-radius: 50%;
    color: var(--rx-muted); font-size: 0; text-decoration: none;
}
.reactions-view-dialog .cbb-dialog-close::before, .reactions-view-dialog .cbb-dialog-close::after { content: ''; position: absolute; width: 16px; height: 1.5px; background: currentColor; transform: rotate(45deg); }
.reactions-view-dialog .cbb-dialog-close::after { transform: rotate(-45deg); }
.reactions-view-dialog .cbb-dialog-close i { display: none; }
.cbb-dialog.reactions-view-dialog > .cbb-dialog-content {
    display: flex; flex-direction: column; position: relative; margin: 0; padding: 0; min-height: 120px;
    height: min(29rem, calc(100vh - 8rem)) !important; height: min(29rem, calc(100dvh - 8rem)) !important;
    max-height: none !important; overflow: hidden; font-size: 14px;
}
.reactions-view-dialog .reactions-list { display: flex; flex: 1; flex-direction: column; min-height: 0; min-width: 0; width: 100%; }
.reactions-view-dialog .reactions-list .tab-header {
    display: flex; align-items: center; gap: 6px; flex-shrink: 0; margin: 0; padding: 0 24px 14px;
    border-bottom: 1px solid var(--rx-line); overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin;
}
.reactions-view-dialog .reactions-list .tab-header a {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px; flex-shrink: 0;
    height: 42px; min-width: 58px; padding: 7px 12px; line-height: 1;
    border: 1px solid transparent; border-radius: 11px; color: var(--rx-muted); background: var(--rx-soft); text-decoration: none;
}
.reactions-view-dialog .reactions-list .tab-header a.active { color: var(--rx-ink); background: rgba(var(--rx-accent), .1); border-color: rgba(var(--rx-accent), .35); }
.reactions-view-dialog .reactions-list .tab-header a img { width: 24px; height: 24px; margin: 0; object-fit: contain; }
.reactions-view-dialog .reactions-list .tab-header a span { display: inline; font-size: 13px; font-weight: 550; }
.reactions-view-dialog .reactions-list .tab-header a .tab-counter { font-variant-numeric: tabular-nums; }
.reactions-view-dialog .reactions-list .tab-content { flex: 1; min-height: 0; margin: 0; padding: 4px 24px 16px; overflow-y: auto; overscroll-behavior: contain; list-style: none; scrollbar-width: thin; scrollbar-color: #94a3b866 transparent; }
.reactions-view-dialog .reactions-list .tab-content.cbb-helper-hidden { display: none; }
.reactions-view-dialog .reactions-list .tab-content li { display: flex; flex-direction: row; align-items: center; gap: 14px; min-height: 78px; margin: 0; padding: 14px 0; border-bottom: 1px solid var(--rx-line); }
.reactions-view-dialog .reactions-list .tab-content li:last-child { border-bottom: 0; }
.reactions-view-dialog .reaction-row-pictures { flex-shrink: 0; width: 44px; height: 44px; margin: 0; }
.reactions-view-dialog .reaction-row-pictures .user-avatar { width: 44px; height: 44px; border-radius: 14px; background: var(--rx-soft); }
.reactions-view-dialog .reaction-row-pictures .user-avatar img { width: 100%; height: 100%; max-width: none; object-fit: cover; }
.reactions-view-dialog .reaction-row-pictures .reaction-image { width: 22px; height: 22px; right: -5px; bottom: -3px; border: 2px solid var(--rx-bg); border-radius: 50%; background: var(--rx-bg); object-fit: contain; }
.reactions-view-dialog .reaction-row-info { flex: 1; min-width: 0; width: auto; }
.reactions-view-dialog .reaction-row-info .cbb-helper-text { white-space: normal; overflow-wrap: anywhere; font-size: 14px; line-height: 1.4; }
.reactions-view-dialog .reaction-row-info .username, .reactions-view-dialog .reaction-row-info .username-coloured { font-size: 14px; font-weight: 600; text-decoration: none; }
.reactions-view-dialog .reaction-row-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 10px; margin-top: 4px; color: var(--rx-muted); font-size: 12px; line-height: 1.45; }
.reactions-view-dialog .reaction-row-rank:empty { display: none; }
.reactions-view-dialog .reaction-row-rank img { display: block; max-width: 160px; max-height: 22px; width: auto; }
.reactions-view-dialog .reaction-row-time { display: inline; padding: 0; color: var(--rx-muted); white-space: normal; font-size: 12px; }
.reactions-view-dialog .reaction-row-actions { display: flex; flex-shrink: 0; align-items: center; gap: 4px; }
.reactions-view-dialog .reaction-row-actions:empty { display: none; }
.reactions-view-dialog .reaction-row-actions a.icon-only { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin: 0; padding: 10px; border: 0; border-radius: 10px; background: transparent; color: var(--rx-muted); box-shadow: none; font-size: 14px; }
.reactions-view-dialog .reaction-row-actions svg { display: block; }
.reactions-view-dialog .reactions-empty-state { display: grid; place-content: center; flex: 1; min-height: 160px; padding: 28px; color: var(--rx-muted); text-align: center; line-height: 1.6; }
.reactions-view-dialog .reactions-list .tab-content li.reactions-empty-state { display: grid; min-height: 160px; border: 0; text-align: center; }
.reactions-view-dialog .reactions-loading { top: 50%; transform: translate(-50%, -50%); }
.reactions-view-dialog .reactions-loading, .reactions-view-dialog .reactions-loading > span { width: 32px; height: 32px; }
.reactions-view-dialog .reactions-loading > span, .reactions-dropdown .reactions-loading > span { border-top-color: rgba(var(--rx-accent), 1); }

/* Emoji chooser and anonymous reaction summary. */
.cbb-dropdown.reactions-dropdown, .cbb-dropdown.reactions-view-list {
    padding: 6px; border: 1px solid var(--rx-line); border-radius: 15px; background: var(--rx-bg); color: var(--rx-ink);
    box-shadow: 0 12px 36px -12px rgba(10, 20, 36, .25); font: inherit; font-size: 14px;
    max-width: calc(100vw - 20px);
}
.cbb-dropdown.reactions-dropdown > .cbb-dropdown-pointer,
.cbb-dropdown.reactions-view-list > .cbb-dropdown-pointer { border-bottom-color: var(--rx-line); }
.cbb-dropdown.reactions-dropdown > .cbb-dropdown-pointer::before,
.cbb-dropdown.reactions-view-list > .cbb-dropdown-pointer::before { border-bottom-color: var(--rx-bg); }
.cbb-dropdown.reactions-dropdown { width: max-content; padding: 4px; }
.reactions-dropdown .reaction-selector { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; margin: 0; padding: 0; }
.reactions-dropdown .reaction-selector li { display: block; margin: 0; }
.reactions-dropdown .reaction-selector a { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 10px; }
.reactions-dropdown .reaction-selector img { display: block; width: 28px; height: 28px; transform: none !important; animation: none !important; transition: none; }
.reactions-view-list .cbb-menu { margin: 0; padding: 4px; border: 0; background: transparent; color: var(--rx-ink); list-style: none; }
.reactions-view-list .cbb-menu li { display: flex; align-items: center; gap: 10px; padding: 10px; font-size: 13px; }
.reactions-view-list .tab-counter { margin-inline-start: auto; font-variant-numeric: tabular-nums; }
.reaction-post-bar a:focus-visible, .reactions-launcher a:focus-visible, .reactions-view-dialog a:focus-visible, .reactions-dropdown a:focus-visible { outline: 2px solid rgba(var(--rx-accent), 1); outline-offset: 3px; }
@media (hover: hover) and (pointer: fine) {
    .reaction-post-bar .list-scores .reaction-score-chip:hover, :is(.reactions-launcher, .reactions-login) > a.reaction-button:hover, .reactions-view-dialog .reactions-list .tab-header a:hover, .reactions-dropdown .reaction-selector a:hover, .reactions-view-dialog .cbb-dialog-close:hover, .reactions-view-dialog .reaction-row-actions a:hover { background: rgba(var(--rx-accent), .09); color: var(--rx-ink); }
    .reaction-post-bar .list-label a:hover { color: var(--rx-ink); text-decoration: underline; text-underline-offset: 3px; }
}
@media (max-width: 600px) {
    .reaction-post-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; }
    .reaction-post-bar .reaction-score-list { display: flex; min-width: 0; grid-column: 1; }
    .reaction-post-bar .list-scores { grid-column: 1 / -1; gap: 2px; justify-self: start; }
    .reaction-post-bar .list-label { grid-column: 1; }
    .reaction-post-bar .reaction-launcher-wrapper { grid-column: 2; grid-row: 1; }
    .reaction-post-bar .reaction-score-list.empty ~ .reaction-launcher-wrapper { grid-row: 1; }
    .reaction-post-bar .list-scores .reaction-score-chip { min-width: 38px; padding: 6px 5px; gap: 4px; }
    .reaction-post-bar .list-scores .reaction-score-chip img { width: 18px; height: 18px; }
    .reaction-post-bar .list-scores .reaction-score-chip:nth-child(n) { display: inline-flex; }
    .reaction-post-bar .reaction-launcher-wrapper { padding-top: 0; }
    .reaction-post-bar :is(.reactions-launcher, .reactions-login) > a.reaction-button { width: 44px; height: 44px; min-height: 44px; padding: 10px; }
    .reaction-post-bar :is(.reactions-launcher, .reactions-login) > a.reaction-button span { display: none; }
    .reaction-post-bar .list-label a.reaction-social-summary { gap: 9px; }
    .reaction-post-bar .reaction-preview img { width: 28px; height: 28px; }
    .reaction-empty-hint { align-self: center; font-size: 12px; }
    body > .cbb-dialog.reactions-view-dialog.fixed { border-radius: 17px; width: calc(100vw - 24px) !important; }
    .cbb-dialog.reactions-view-dialog > .cbb-dialog-header { padding: 16px 18px 14px 20px; font-size: 21px; }
    .reactions-view-dialog .reactions-list .tab-header { padding: 0 18px 12px; gap: 5px; }
    .reactions-view-dialog .reactions-list .tab-header a { padding: 7px 10px; min-width: 54px; }
    .reactions-view-dialog .reactions-list .tab-content { padding: 3px 18px 12px; }
    .reactions-view-dialog .reactions-list .tab-content li { gap: 12px; }
    .reactions-view-dialog .reaction-row-meta { flex-direction: column; align-items: flex-start; gap: 2px; }
}
.rtl .reaction-post-bar .reaction-score-list { float: none; margin: 0; }
.rtl .reactions-view-dialog .reaction-row-pictures { margin: 0; }
.rtl .reactions-view-dialog .reaction-row-pictures .reaction-image { right: auto; left: -5px; }
@media (max-width: 360px) {
    .reactions-dropdown .reaction-selector a { width: 38px; }
}
@media (prefers-reduced-motion: reduce) {
    .reaction-post-bar a, .reactions-launcher a, .reactions-dropdown .reaction-selector img { transition: none; }
    .reactions-dropdown .reaction-selector a:hover img { transform: none; }
}
