/*
 * v2-comments.css — the comment widget (frontend/partials/comments/*, rendered
 * by GET ajax/comment/widget/{anime} into #content-comments; comments.js) and
 * the anime's reaction bar, in the animeunity-v2 vocabulary: `bg-fore-800`
 * cards on the page, `fore-700` fields, the blue-200 accent, Overpass.
 * Pushed by partials/anime/scripts (anime + episode pages); a community post
 * page that shows the same widget can link it too (rules are scoped to
 * .cm-widget / #cm-reactions / the panels comments.js puts on <body>).
 *
 * Ported from the first skin's public/assets/animeunity/css/animeunity-comments.css
 * (tmp/v2/anime/gen-comments-css.mjs: same selectors — every hook and state
 * class comments.js writes is styled — with the v2 tokens), then the v2
 * additions at the top. No markup of the widget changed.
 */

/* ---------- v2 additions ---------- */

/* Bootstrap is not loaded in v2: the handful of helpers the widget's markup uses. */
.cm-widget, #cm-gif-panel { font-family: Overpass, sans-serif; }
.cm-widget .mr-1 { margin-right: .25rem; }
.cm-widget .mr-2 { margin-right: .5rem; }
.cm-widget .ml-1 { margin-left: .25rem; }
.cm-widget .ml-2 { margin-left: .5rem; }
.cm-widget .mt-1 { margin-top: .25rem; }
.cm-widget .mt-3 { margin-top: 1rem; }
.cm-widget .mb-0 { margin-bottom: 0; }
.cm-widget .text-muted { color: rgba(var(--tw-text-300)); }
.cm-widget .clearfix::after { content: ""; display: block; clear: both; }
.cm-widget .sc-header .clearfix, .cm-widget .ci-buttons .clearfix { display: none; }
.cm-widget .btn { text-decoration: none; }
.cm-widget .user-name .badge-img, .cm-widget .user-name img { display: inline-block; max-height: 18px; margin-right: 4px; vertical-align: -3px; }
.cm-widget .comment-form textarea.form-control { -webkit-user-select: text; user-select: text; }
/* In-form errors are never the fixed toast. */
.cm-widget .alert { position: static; width: auto; box-shadow: none; }
/* The "Carica commenti" state and the loader comments.js shows while the widget loads. */
#content-comments > .loading, #content-comments .cm-loading { width: 26px; height: 26px; margin: 1rem auto; border: 3px solid rgba(var(--tw-blue-200), .2); border-top-color: rgba(var(--tw-blue-200)); border-radius: 50%; animation: v2-cm-spin .8s linear infinite; }
.v2-comments .v2-pill { background-color: rgba(var(--tw-fore-600)); }
.v2-comments .v2-pill:hover { background-color: rgba(var(--tw-fore-500)); }
.v2-comments .v2-pill.au-active { background-color: rgba(var(--tw-blue-200)); color: #fff; }

/* ---------- ported rules ---------- */

/* The anime's reaction bar (CMS): pills in the range buttons' look. */
#cm-reactions { margin-bottom: 15px; }
#cm-reactions:empty { display: none; }
/* One row always: the pills share the width, and scroll sideways only when
   the screen is too narrow to fit them all. */
#cm-reactions .cm-reactions-inner { display: flex; flex-wrap: nowrap; gap: 6px; overflow-x: auto; scrollbar-width: none; }
#cm-reactions .cm-reactions-inner::-webkit-scrollbar { display: none; }
#cm-reactions .cm-reactions-inner > .cm-rx { flex: 1 0 auto; justify-content: center; }
/* More pills past an edge (v2-shell.js reactionRow sets the classes): that edge fades out and a round
   arrow sits on it; the arrow pages the row. */
#cm-reactions { position: relative; }
#cm-reactions.v2-rx-more .cm-reactions-inner { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 64px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 64px), transparent); }
#cm-reactions.v2-rx-less .cm-reactions-inner { -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 64px), transparent); mask-image: linear-gradient(to left, #000 calc(100% - 64px), transparent); }
#cm-reactions.v2-rx-more.v2-rx-less .cm-reactions-inner { -webkit-mask-image: linear-gradient(to right, transparent, #000 64px, #000 calc(100% - 64px), transparent); mask-image: linear-gradient(to right, transparent, #000 64px, #000 calc(100% - 64px), transparent); }
#cm-reactions .v2-rx-arrow {
    position: absolute; top: 2px; z-index: 2; display: flex; align-items: center; justify-content: center;
    width: 28px; height: 28px; margin: 0; padding: 0 0 2px; border: 0; border-radius: 50%;
    background-color: rgba(var(--tw-blue-200)); color: #fff; font-size: 22px; font-weight: 700; line-height: 1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .45); cursor: pointer;
    opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
}
#cm-reactions .v2-rx-arrow--prev { left: 0; transform: translateX(-4px); }
#cm-reactions .v2-rx-arrow--next { right: 0; transform: translateX(4px); }
#cm-reactions.v2-rx-less .v2-rx-arrow--prev,
#cm-reactions.v2-rx-more .v2-rx-arrow--next { opacity: 1; pointer-events: auto; transform: none; }
#cm-reactions.v2-rx-more .v2-rx-arrow--next { animation: v2-rx-nudge 1.6s ease-in-out 2; }
#cm-reactions .v2-rx-arrow:hover { filter: brightness(1.15); }
#cm-reactions .v2-rx-arrow:focus { outline: none; }
@keyframes v2-rx-nudge { 0%, 100% { transform: none; } 50% { transform: translateX(3px); } }
#cm-reactions .cm-rx {
    display: inline-flex; align-items: center; gap: 6px; height: 32px; margin: 0; padding: 0 10px 0 4px;
    border: 0; border-radius: .375rem; background-color: rgba(var(--tw-fore-800)); color: rgba(var(--tw-text-100));
    font-family: inherit; font-size: 13px; font-weight: 600; line-height: 32px; box-shadow: none; cursor: pointer;
    transition: background-color .15s, color .15s;
}
#cm-reactions .cm-rx:hover { background-color: rgba(var(--tw-blue-200)); color: #fff; }
#cm-reactions .cm-rx:focus { outline: none; }
#cm-reactions .cm-rx.is-active { background-color: rgba(var(--tw-blue-200)); color: #fff; }
#cm-reactions .cm-rx.is-pending { opacity: .6; }
#cm-reactions .cm-rx-gif { width: 24px; height: 24px; max-width: none; border-radius: 4px; object-fit: cover; }
#cm-reactions .cm-rx-emoji { width: 24px; font-size: 16px; line-height: 24px; text-align: center; }
#cm-reactions .cm-rx-count { color: rgba(var(--tw-text-200)); font-weight: 400; }
#cm-reactions .cm-rx:hover .cm-rx-count,
#cm-reactions .cm-rx.is-active .cm-rx-count { color: rgba(255, 255, 255, .85); }
#cm-reactions .cm-rx-count:empty { display: none; }
#cm-reactions .cm-rx-pop { animation: v2-rx-pop .35s ease; }
@keyframes v2-rx-pop { 50% { transform: scale(1.1); } }
@media (max-width: 1199px) {
    #cm-reactions .cm-rx { gap: 4px; padding: 0 8px 0 4px; font-size: 12px; }
}
@media (max-width: 575px) {
    #cm-reactions .cm-reactions-inner { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
    #cm-reactions .cm-reactions-inner::-webkit-scrollbar { display: none; }
    #cm-reactions .cm-rx { flex-shrink: 0; }
    #cm-reactions .cm-rx-label { display: none; }
}

/* ------------------------------------------------------- the widget */

.cm-widget { color: rgba(var(--tw-text-200)); font-size: 13px; font-weight: 600; line-height: 19.5px; }
.cm-widget a { color: inherit; }
.cm-widget p { margin-bottom: 0; }
.cm-widget button, .cm-widget .btn, #cm-gif-panel button {
    margin: 0; border: 0; border-radius: 0; background: none; box-shadow: none;
    color: inherit; font-family: inherit; font-weight: 600; text-transform: none;
}
.cm-widget button:hover, #cm-gif-panel button:hover { background: none; }
.cm-widget button:focus, .cm-widget .btn:focus { outline: none; box-shadow: none; }

/* Header: "N commenti" · Ordina per */
.cm-widget .sc-header { display: flex; align-items: center; margin-bottom: 15px; line-height: 30px; }
.cm-widget .sc-header .sc-h-title { color: rgba(var(--tw-text-200)); font-size: 14px; font-weight: 600; }
.cm-widget .sc-header .sc-h-title .cm-count { color: rgba(var(--tw-text-100)); font-weight: 900; }
.cm-widget .sc-header .sc-h-title i { margin-right: 6px; color: rgba(var(--tw-blue-100)); }
.cm-widget .sc-header .sc-h-sort { position: relative; margin-left: auto; }
.cm-widget .sc-header .sc-h-sort > .btn {
    display: inline-block; padding: 0 10px; border-radius: .375rem; background-color: rgba(var(--tw-fore-800)); color: rgba(var(--tw-text-100));
    font-size: 13px; font-weight: 400; line-height: 29px; cursor: pointer;
}
.cm-widget .sc-header .sc-h-sort > .btn:hover, .cm-widget .sc-header .sc-h-sort.show > .btn { background-color: rgba(var(--tw-blue-200)); color: #fff; }

/* Drop-downs (sort, "Altro" on a comment): the first skin's header menu look. */
.cm-widget .dropdown-menu {
    position: absolute; top: 100%; z-index: 60; display: none; min-width: 170px; margin: 4px 0 0; padding: 7px 0;
    border: 1px solid rgba(var(--tw-fore-600)); border-radius: .25rem; background-color: rgba(var(--tw-fore-800));
    box-shadow: 0 0 18px rgba(16, 16, 16, .3); font-size: 13px; text-align: left;
}
.cm-widget .show > .dropdown-menu { display: block; }
.cm-widget .sc-h-sort .dropdown-menu { right: 0; left: auto; }
.cm-widget .dropdown-menu .dropdown-item {
    display: block; padding: 6px 20px; color: rgba(var(--tw-text-200)); background: none;
    font-weight: 600; line-height: 1.5; white-space: nowrap; cursor: pointer;
}
.cm-widget .dropdown-menu .dropdown-item:hover { background-color: rgba(var(--tw-fore-700)); color: rgba(var(--tw-text-100)); }
.cm-widget .dropdown-menu .dropdown-item.active { background: none; color: rgba(var(--tw-blue-100)); }
.cm-widget .dropdown-menu .dropdown-item .ic-active { display: none; }
.cm-widget .dropdown-menu .dropdown-item.active .ic-active { display: inline-block; }

/* Rules note above the composer. */
.cm-widget .cm-rules-note { margin: 0 0 15px; padding: 10px 15px; border-radius: .25rem; background-color: rgba(var(--tw-fore-800)); border-left: 3px solid #e3c000; color: rgba(var(--tw-text-200)); font-size: 12px; line-height: 18px; }
.cm-widget .cm-rules-note a { color: rgba(var(--tw-blue-100)); font-weight: 700; }

/* Avatars: the first skin's round nav avatar, scaled (GUIDE §13). */
.cm-widget .user-avatar {
    position: absolute; left: 15px; top: 14px; display: none; width: 36px; height: 36px; overflow: hidden;
    border-radius: 50%; background-color: rgba(var(--tw-fore-700));
}
.cm-widget .user-avatar::before {
    content: attr(data-initial); position: absolute; left: 0; top: 0; width: 100%; height: 100%;
    color: rgba(var(--tw-text-200)); font-size: 15px; font-weight: 700; line-height: 36px; text-align: center;
}
.cm-widget .user-avatar .user-avatar-img { position: relative; z-index: 1; display: block; width: 100%; height: 100%; max-width: none; object-fit: cover; }

/* Composer card: "Commenta come …" + the field. */
.cm-widget .comment-input { position: relative; margin-bottom: 20px; padding: 14px 15px; border-radius: .25rem; background: rgba(var(--tw-fore-800)); }
.cm-widget .ci-form > .user-name { margin-bottom: 8px; color: rgba(var(--tw-text-200)); font-size: 12px; font-weight: 600; }
.cm-widget .ci-form > .user-name .link-highlight { color: rgba(var(--tw-text-100)); font-weight: 900; }
.cm-widget .comment-input.is-collapsed .comment-form { display: none; }
.cm-widget .comment-form { position: relative; margin: 0; }
.cm-widget .comment-form .comment-container { position: relative; }
.cm-widget .comment-form .au-ci-field,
.cm-widget .comment-form .cm-composer-grow { position: relative; border-radius: .375rem; background-color: rgba(var(--tw-fore-700)); box-shadow: inset 0 0 0 1px transparent; transition: box-shadow .2s; }
.cm-widget .comment-form .au-ci-field:focus-within,
.cm-widget .comment-form .cm-composer-grow:focus-within { box-shadow: inset 0 0 0 1px rgba(var(--tw-blue-200)); }
.cm-widget .comment-form textarea.form-control {
    display: block; width: 100%; min-height: 70px; height: 70px; margin: 0; padding: 10px 80px 10px 12px;
    border: 0; border-radius: .375rem; background-color: transparent; box-shadow: none;
    color: rgba(var(--tw-text-100)); font-family: inherit; font-size: 13px; font-weight: 600; line-height: 19.5px; resize: none; overflow: hidden; field-sizing: content;
}
.cm-widget .comment-form textarea.form-control::placeholder { color: rgba(var(--tw-text-200)); opacity: .7; }
.cm-widget .comment-form textarea.form-control:focus { outline: none; box-shadow: none; }
.cm-widget .comment-input.is-reply textarea.form-control { min-height: 50px; height: 50px; }
.cm-widget .comment-form .ci-emo { position: absolute; top: 4px; right: 4px; z-index: 2; display: flex; }
.cm-widget .comment-form .ci-emo .cb-icon { width: 32px; height: 32px; color: rgba(var(--tw-text-200)); font-size: 15px; line-height: 32px; text-align: center; cursor: pointer; }
.cm-widget .comment-form .ci-emo .cb-icon:hover { color: rgba(var(--tw-blue-100)); }
.cm-widget .comment-form .ci-emo .cb-icon:focus { outline: none; }
.cm-widget .comment-form .ci-emo .au-gif-label { display: inline-block; padding: 0 3px; border: 1.5px solid currentColor; border-radius: .25rem; font-size: 9px; font-weight: 700; line-height: 13px; vertical-align: middle; }
.cm-widget .comment-form .ci-buttons { display: flex; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.cm-widget .comment-form .ci-b-left { display: flex; flex-wrap: wrap; align-items: center; }
.cm-widget .comment-form .ci-b-right { display: flex; align-items: center; margin-left: auto; }
.cm-widget .comment-form .cb-li { display: flex; align-items: center; }
.cm-widget .comment-form .btn-spoil { display: inline-block; padding: 0 10px; border-radius: .375rem; background: rgba(var(--tw-fore-700)); color: rgba(var(--tw-text-200)); font-size: 12px; font-weight: 600; line-height: 26px; cursor: pointer; }
.cm-widget .comment-form .btn-spoil i { margin-right: 4px; opacity: .4; }
.cm-widget .comment-form .btn-spoil:hover { color: rgba(var(--tw-text-100)); }
.cm-widget .comment-form .btn-spoil.active { background-color: #dc3545; color: #fff; }
.cm-widget .comment-form .btn-spoil.active i { opacity: 1; }
.cm-widget .cm-fmt-bar { display: flex; margin-left: 5px; }
.cm-widget .cm-fmt-btn { width: 26px; height: 26px; padding: 0; color: rgba(var(--tw-text-200)); font-size: 12px; line-height: 26px; text-align: center; cursor: pointer; }
.cm-widget .cm-fmt-btn:hover { color: rgba(var(--tw-blue-100)); }
.cm-widget .cm-fmt-btn strong, .cm-widget .cm-fmt-i, .cm-widget .cm-fmt-s { font-size: 12px; }
.cm-widget .cm-fmt-i { font-style: italic; }
.cm-widget .cm-fmt-s { text-decoration: line-through; }
.cm-widget .cm-fmt-ts { display: none; }
.cm-player-ready .cm-widget .cm-fmt-ts { display: inline-block; }
/* Submit: the first skin's primary button; Cancel: a plain link. */
.cm-widget .comment-form .ci-b-right button[type=submit],
.cm-widget .comment-form .ci-b-right .btn-primary {
    margin: 0 0 0 10px; padding: 5.25px 12px; border-radius: .25rem; background-color: rgba(var(--tw-blue-200)); color: #fff;
    font-size: 14px; font-weight: 400; line-height: 1.5; cursor: pointer;
}
.cm-widget .comment-form .ci-b-right button[type=submit]:hover,
.cm-widget .comment-form .ci-b-right .btn-primary:hover { background-color: rgba(var(--tw-blue-300)); }
.cm-widget .comment-form .ci-b-right .btn-secondary,
.cm-widget .comment-form .ci-b-right .cm-edit-cancel { padding: 0 6px; background: none; border: 0; color: rgba(var(--tw-text-200)); font-size: 13px; font-weight: 600; cursor: pointer; }
.cm-widget .comment-form .ci-b-right .btn-secondary:hover,
.cm-widget .comment-form .ci-b-right .cm-edit-cancel:hover { color: #dc3545; }
/* In-form errors stay in the form (app.css makes every .alert a fixed toast). */
.cm-widget .cm-error,
.cm-widget .alert-danger {
    position: static; transform: none; min-width: 0; z-index: auto; flex: 0 0 100%; margin: 0 0 10px; padding: 8px 15px;
    border: 0; border-radius: .25rem; background-color: rgba(220, 53, 69, .12); color: #dc3545; font-size: 12px; font-weight: 600; line-height: 18px; text-align: left;
}
.cm-widget .loading-absolute { position: absolute; left: 0; top: 0; right: 0; bottom: 0; z-index: 5; display: flex; align-items: center; justify-content: center; background-color: rgba(var(--tw-fore-800), .7); border-radius: .375rem; }
.cm-widget .loading-absolute .loading,
#cm-gif-panel .loading { width: 26px; height: 26px; border: 3px solid rgba(var(--tw-blue-200), .2); border-top-color: rgba(var(--tw-blue-200)); border-radius: 50%; animation: v2-cm-spin .8s linear infinite; }
.cm-widget .loading-absolute .loading > div { display: none; }
@keyframes v2-cm-spin { to { transform: rotate(360deg); } }
/* Guests: comments-guest.js opens the sign-in on any touch of the form. */
.cm-widget .guest-comment-form textarea.form-control { cursor: pointer; }

/* ------------------------------------------------------ one comment */

.cm-widget .cw_l-line { position: relative; margin-bottom: 15px; padding: 14px 15px; border-radius: .25rem; background: rgba(var(--tw-fore-800)); }
.cm-widget .cw_l-line:last-child { margin-bottom: 0; }
.cm-widget .cw_l-line.comment-focus { box-shadow: inset 0 0 0 1px rgba(var(--tw-blue-100)); }
.cm-widget .cw_l-line .ipinned { margin-bottom: 4px; color: #f2870d; font-size: 10px; font-weight: 700; text-transform: uppercase; }
.cm-widget .cw_l-line .ihead { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 10px; line-height: 1.4; }
.cm-widget .cw_l-line .ihead .user-name { color: rgba(var(--tw-text-100)); font-size: 14px; font-weight: 900; text-decoration: none; }
.cm-widget .cw_l-line .ihead .user-name:hover { color: rgba(var(--tw-blue-100)); }
.cm-widget .cw_l-line .ihead .time { color: rgba(var(--tw-text-200)); font-size: 11.2px; font-weight: 400; }
.cm-widget .cw_l-line .ihead .eps { padding: 0 6px; border-radius: .25rem; background-color: #3480ea; color: #fff; font-size: 10px; font-weight: 700; line-height: 16px; }
.cm-widget .cm-ban-badge,
.cm-widget .cm-staff-badge { display: inline-block; margin-left: 6px; padding: 0 5px; border-radius: .25rem; background-color: rgba(var(--tw-blue-200)); color: #fff; font-size: 9px; font-weight: 700; line-height: 15px; text-transform: uppercase; vertical-align: 2px; }
.cm-widget .cm-ban-badge { background-color: #dc3545; }
.cm-widget .cm-edited-label { color: rgba(var(--tw-text-200)); }

/* Body: the plot's 13px / 19.5 text. */
.cm-widget .ibody { position: relative; margin: 6px 0 8px; color: rgba(var(--tw-text-200)); font-size: 13px; font-weight: 600; line-height: 19.5px; word-wrap: break-word; overflow-wrap: anywhere; }
.cm-widget .cm-body p { margin-bottom: 5px; }
.cm-widget .cm-body p:last-child { margin-bottom: 0; }
.cm-widget .cm-body strong, .cm-widget .cm-body b { font-weight: 900; color: rgba(var(--tw-text-100)); }
.cm-widget .cm-body a { color: rgba(var(--tw-blue-100)); }
.cm-widget .cm-body blockquote { margin: 0 0 5px; padding: 2px 0 2px 10px; border-left: 3px solid rgba(var(--tw-fore-600)); color: rgba(var(--tw-text-200)); opacity: .85; }
.cm-widget .cm-body .tag-name, .cm-widget .tag-name { margin-right: 4px; color: rgba(var(--tw-blue-100)); font-weight: 700; }
.cm-widget .cm-body img { max-width: 100%; }
.cm-widget .cm-gif-wrap { display: block; margin-top: 5px; }
.cm-widget .cm-gif-wrap img, .cm-widget .cm-embed-gif { max-width: 220px; max-height: 220px; border-radius: .25rem; }
.cm-widget .cm-comment-notice { color: rgba(var(--tw-text-200)); font-style: italic; font-size: 12px; }
.cm-widget .cm-comment-notice i { margin-right: 4px; }
.cm-widget .cm-thread-locked { position: static; transform: none; min-width: 0; margin-bottom: 8px; padding: 6px 12px; border: 0; border-radius: .25rem; background-color: rgba(227, 192, 0, .12); color: rgba(var(--tw-text-200)); font-size: 12px; }
/* Spoiler curtain */
.cm-widget .ibody.is-spoil > .cm-body { filter: blur(5px); user-select: none; pointer-events: none; }
.cm-widget .show-spoil:empty { display: none; }
.cm-widget .ibody.is-spoil > .show-spoil { position: absolute; left: 0; top: 0; right: 0; bottom: 0; display: flex; align-items: center; justify-content: flex-start; margin: 0 !important; }
.cm-widget .show-spoil .btn { padding: 0 10px; border-radius: .25rem; background-color: rgba(var(--tw-blue-200)); color: #fff; font-size: 12px; font-weight: 400; line-height: 26px; cursor: pointer; }
.cm-widget .show-spoil .btn:hover { background-color: rgba(var(--tw-blue-300)); }
.cm-widget .cm-auto-spoil { padding: 0 4px; border-radius: .25rem; background-color: rgba(var(--tw-text-100)); color: rgba(var(--tw-fore-800)); }
.cm-widget .cm-auto-spoil.is-open { background-color: rgba(var(--tw-fore-700)); color: inherit; }
.cm-widget .cm-auto-spoil-toggle { margin-left: 4px; padding: 0 6px; border-radius: .25rem; background-color: rgba(var(--tw-blue-200)); color: #fff; font-size: 10px; line-height: 16px; cursor: pointer; }
.cm-widget .cm-ts { display: inline; padding: 0 5px; border-radius: .25rem; background-color: rgba(var(--tw-blue-200), .12); color: rgba(var(--tw-blue-100)); font-size: 12px; font-weight: 700; cursor: pointer; }
.cm-widget .cm-ts.cm-ts--bad { background-color: rgba(var(--tw-fore-700)); color: rgba(var(--tw-text-200)); cursor: default; }

/* Actions: the first skin's small text actions (.unstile-a.fs12), hover rgba(var(--tw-blue-100)). */
.cm-widget .ibottom { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 14px; }
.cm-widget .ibottom .ib-li { position: relative; }
.cm-widget .ibottom .ib-li > .btn {
    display: inline-block; padding: 0; color: rgba(var(--tw-text-200)); font-size: 12px; font-weight: 600; line-height: 22px;
    cursor: pointer; transition: color .15s;
}
.cm-widget .ibottom .ib-li > .btn:hover,
.cm-widget .ibottom .ib-more.show > .btn { color: rgba(var(--tw-blue-100)); }
.cm-widget .ibottom .ib-li > .btn i { margin-right: 4px; }
.cm-widget .ibottom .cm-btn-vote.active { color: rgba(var(--tw-blue-200)); }
.cm-widget .ibottom .ib-dislike .cm-btn-vote.active { color: #dc3545; }
.cm-widget .ibottom .value:empty { display: none; }
.cm-widget .ibottom .ib-more .dropdown-menu { left: 0; }
.cm-widget .ibottom .clearfix { display: none; }

/* Reply form and replies, indented inside the comment card. */
.cm-widget .reply-block { margin-top: 12px; padding: 0; background: none; }
.cm-widget .replies { margin-top: 8px; }
.cm-widget .replies-wrap { padding-top: 10px; }
.cm-widget .replies-wrap .cw_l-line { margin-bottom: 10px; padding: 10px 0 10px 12px; border-left: 2px solid rgba(var(--tw-fore-600)); border-radius: 0; background: none; }
.cm-widget .replies-wrap .cw_l-line:last-child { margin-bottom: 0; }
.cm-widget .replies-wrap .cw_l-line .user-avatar { left: 12px; top: 10px; width: 28px; height: 28px; }
.cm-widget .replies-wrap .cw_l-line .user-avatar::before { font-size: 12px; line-height: 28px; }
.cm-widget .reply-block .user-avatar { left: 0; top: 0; width: 28px; height: 28px; }
.cm-widget .reply-block .user-avatar::before { font-size: 12px; line-height: 28px; }
.cm-widget .replies-wrap.is-thread-locked { opacity: .8; }
.cm-widget .cm-anchor { display: block; height: 0; }
.cm-widget .rep-more .cm-btn-show-rep { padding: 0; color: rgba(var(--tw-blue-100)); font-size: 12px; font-weight: 700; line-height: 20px; cursor: pointer; }
.cm-widget .rep-more .cm-btn-show-rep:hover { text-decoration: underline; }
.cm-widget .rep-more .cm-btn-show-rep i { margin-right: 6px; transition: transform .2s; }
.cm-widget .rep-more .cm-btn-show-rep.active i { transform: rotate(180deg); }
.cm-widget .rep-more .cm-btn-show-rep span::before { content: 'Mostra '; }
.cm-widget .rep-more .cm-btn-show-rep.active span::before { content: 'Nascondi '; }

/* Pager: the range pill look, centred. */
.cm-widget .cm-foot { margin-top: 20px; text-align: center; }
.cm-widget .cm-foot #cm-view-more { display: inline-block; padding: 5px 12px; border-radius: .375rem; background-color: rgba(var(--tw-fore-800)); color: rgba(var(--tw-text-100)); font-size: 13px; font-weight: 400; line-height: 19.5px; cursor: pointer; }
.cm-widget .cm-foot #cm-view-more:hover { background-color: rgba(var(--tw-blue-200)); color: #fff; }
.cm-widget .cm-foot #cm-view-more i { margin-right: 6px; }
.cm-widget .no-result { padding: 15px; border-radius: .25rem; background: rgba(var(--tw-fore-800)); color: rgba(var(--tw-text-100)); font-size: 14px; text-align: center; }

/* Inline edit composer (comments.js template). */
.cm-widget .cm-edit-composer-wrap { position: relative; margin: 5px 0; padding: 0; background: none; }
.cm-widget .cm-edit-composer-wrap .ci-form { width: 100%; }
.cm-widget .cm-edit-composer-wrap .cm-composer-grow { display: flex; flex-direction: column; }
.cm-widget .cm-edit-composer-wrap .cm-composer-grow .cm-fmt-bar { order: 2; margin: 0 0 4px 8px; }

/* From 767px: an avatar column inside each card. */
@media (min-width: 767px) {
    .cm-widget .user-avatar { display: block; }
    .cm-widget .comment-input,
    .cm-widget .cw_l-line { padding-left: 64px; }
    .cm-widget .replies-wrap .cw_l-line { padding-left: 52px; }
    .cm-widget .reply-block.comment-input { padding-left: 40px; }
}
@media (max-width: 766px) {
    .cm-widget .comment-form textarea.form-control { padding-right: 75px; }
}

/* ---------------------------------- panels comments.js puts on <body> */

/* emoji-picker (custom element) and the GIF panel: hidden until opened;
   comments.js writes only left / top. */
emoji-picker.emoji-picker { display: none; }
emoji-picker.emoji-picker.cm-emoji-open {
    position: fixed; z-index: 1060; display: block; width: 320px; height: 340px;
    --background: rgba(var(--tw-fore-800)); --border-color: rgba(var(--tw-fore-600)); --indicator-color: rgba(var(--tw-blue-100));
    --input-border-color: rgba(var(--tw-fore-600)); --input-font-color: rgba(var(--tw-text-100)); --outline-color: rgba(var(--tw-blue-200));
    --button-hover-background: rgba(var(--tw-fore-700));
    box-shadow: 0 0 40px 2px rgba(0, 0, 0, .35); border-radius: .375rem;
}
#cm-gif-panel { display: none; }
#cm-gif-panel.cm-gif-open {
    position: fixed; z-index: 1060; display: flex; flex-direction: column; width: 320px; height: 360px; max-width: calc(100vw - 16px);
    padding: 10px; border-radius: .375rem; background-color: rgba(var(--tw-fore-800)); box-shadow: 0 0 40px 2px rgba(0, 0, 0, .35);
    color: rgba(var(--tw-text-200)); font-size: 12px; font-weight: 600;
}
#cm-gif-panel .cm-gif-head { display: flex; gap: 6px; margin-bottom: 8px; }
#cm-gif-panel .cm-gif-q { flex: 1; height: 32px; margin: 0; padding: 0 12px; border: 0; border-radius: .375rem; background: rgba(var(--tw-fore-700)); color: rgba(var(--tw-text-100)); font-size: 13px; }
#cm-gif-panel .cm-gif-q:focus { box-shadow: inset 0 0 0 1px rgba(var(--tw-blue-200)); outline: none; }
#cm-gif-panel .cm-gif-close { width: 32px; height: 32px; padding: 0; border-radius: .375rem; background-color: #dc3545; color: #fff; font-size: 16px; line-height: 32px; cursor: pointer; }
#cm-gif-panel .cm-gif-close:hover { background-color: #c82333; }
#cm-gif-panel .cm-gif-grid { display: grid; flex: 1; grid-template-columns: 1fr 1fr; gap: 6px; overflow-y: auto; }
#cm-gif-panel .cm-gif-tile { display: block; padding: 0; border-radius: .25rem; overflow: hidden; background-color: rgba(var(--tw-fore-700)); cursor: pointer; }
#cm-gif-panel .cm-gif-tile img { display: block; width: 100%; height: 100px; object-fit: cover; }
#cm-gif-panel .cm-gif-msg { padding: 10px; color: rgba(var(--tw-text-200)); text-align: center; }
