/*
 * aw-comments.css — the CMS comment widget (the first skin's partials/comments/* markup, unchanged: comments.js,
 * comments-guest.js and community.min.js hooks; partials/watch/comments holds the box) in animeworld.ac's comment
 * vocabulary (css/pages/comments-comments.css: `.comment-card`, `.comment-composer`, `.comment-empty` — bordered
 * 8px cards on the white widget, Nunito Sans, its --cc-* palette, light and dark).
 * Package B (title + watch); shared by the title / episode page and community posts
 * (#content-comments-community). Loaded on every page by the layout: every rule is scoped to the widget's own
 * roots (#comments, #cm-reactions, .cm-widget, emoji-picker.emoji-picker, #cm-gif-panel).
 *
 * Derived once from the first skin's animeunity-comments.css (same class hooks, tmp/aw/watch/gen-comments.mjs),
 * then maintained by hand.
 *
 * Class hooks styled: #comments .au-cm-tabs .cm-by(.au-active) · .au-cm-load · #cm-reactions .cm-rx* ·
 *   .cm-widget .sc-header (.sc-h-title .cm-count, .sc-h-sort) · .cm-rules-note · .comment-input (.user-avatar,
 *   .user-name, .ci-form) · .comment-form (.au-ci-field, textarea.comment-subject, .ci-emo .cb-icon, .ci-buttons
 *   .ci-b-left/right, .btn-spoil, .cm-fmt-btn, .cm-error) · .cw_l-line (.info .ihead .user-name .time .eps, .ibody
 *   .cm-body .show-spoil, .ibottom .ib-li .btn .cm-btn-vote .value, .ib-more .cm-menu) · .replies .rep-more
 *   .cm-btn-show-rep · #cm-view-more · .no-result · emoji-picker · #cm-gif-panel · body tokens (.cm-ts,
 *   .cm-auto-spoil, .cm-gif-wrap) · comments.js templates (.cm-edit-composer-wrap, .cm-comment-notice,
 *   .cm-thread-locked, .cm-edited-label).
 */

/* animeworld's comment palette (comments-comments.css `.comment-card { --cc-… }`), on this widget's roots. */
#comments, #cm-reactions, .cm-widget, emoji-picker.emoji-picker, #cm-gif-panel {
    --cc-bg: #fff; --cc-soft: #f3f5f8; --cc-border: #e2e6ec; --cc-text: #2f3337; --cc-muted: #8a919c; --cc-icon: #98a0aa;
    --cc-name: #2b6cb0; --cc-accent: #367dc3; --cc-tag: #1f64a8; --cc-tag-bg: rgba(54, 125, 195, .12); --cc-veil: rgba(255, 255, 255, .7);
}
body.dark #comments, body.dark #cm-reactions, body.dark .cm-widget, body.dark emoji-picker.emoji-picker, body.dark #cm-gif-panel {
    --cc-bg: #1c1b1b; --cc-soft: #272626; --cc-border: #303030; --cc-text: #ccc8c8; --cc-muted: #8e8c8c; --cc-icon: #7b7979;
    --cc-name: #74b7f9; --cc-tag: #8cc4fb; --cc-tag-bg: rgba(116, 183, 249, .14); --cc-veil: rgba(28, 27, 27, .7);
}

/* ------------------------------------------------- the box (title / episode page) */

.widget.comment#comments .widget-body { padding: 10px; }
.widget.comment#comments .widget-body > .content.hidden { display: none !important; }
/* The current scope pill is .au-active (the tab look is aw-watch.css's .aw-tab); "Regole" open: it rests. */
.widget.comment#comments.aw-rules-open .widget-title .aw-tabs .cm-by.au-active { border-bottom-color: rgba(0, 0, 0, 0); }
.widget.comment#comments.aw-rules-open .widget-title .aw-tabs .cm-by.au-active:hover { border-bottom-color: #eee; }
body.dark .widget.comment#comments.aw-rules-open .widget-title .aw-tabs .cm-by.au-active:hover { border-bottom-color: #484848; }
.widget.comment#comments #rules { color: #6d6d6d; }
body.dark .widget.comment#comments #rules { color: #b1b1b1; }
.widget.comment#comments #rules hr { margin: 10px 0; border-top-color: #eee; }
body.dark .widget.comment#comments #rules hr { border-top-color: rgba(51, 51, 51, .84); }
/* Until comments.js loads the thread: animeworld's dashed empty box with the trigger. */
#comments .au-cm-load { margin: 4px 0 0; }
#comments .au-cm-load .comment-empty-title { margin-bottom: 8px; }
#comments .au-cm-load .btn { margin: 0; font-family: "Nunito Sans", sans-serif; font-size: 13px; font-weight: 700; padding: 5px 16px; border-radius: 6px; cursor: pointer; }
#content-comments { font-family: "Nunito Sans", sans-serif; }

/* The anime's reaction bar (CMS): pills in the range buttons' look. */
#cm-reactions { margin-bottom: 15px; }
#cm-reactions:empty { display: none; }
#cm-reactions .cm-reactions-inner { display: flex; flex-wrap: wrap; gap: 8px; }
#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: 6px; background-color: var(--cc-bg); color: var(--cc-text);
    font-family: inherit; font-size: 13px; font-weight: 400; line-height: 32px; box-shadow: none; cursor: pointer;
    transition: background-color .15s, color .15s;
}
#cm-reactions .cm-rx:hover { background-color: var(--cc-accent); color: #fff; }
#cm-reactions .cm-rx:focus { outline: none; }
#cm-reactions .cm-rx.is-active { background-color: var(--cc-accent); 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: var(--cc-muted); 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: aw-rx-pop .35s ease; }
@keyframes aw-rx-pop { 50% { transform: scale(1.1); } }
@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: var(--cc-muted); font-size: 13px; font-weight: 400; 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: 400; 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: var(--cc-muted); font-size: 14px; font-weight: 400; }
.cm-widget .sc-header .sc-h-title .cm-count { color: var(--cc-text); font-weight: 700; }
.cm-widget .sc-header .sc-h-title i { margin-right: 6px; color: var(--cc-name); }
.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: 6px; background-color: var(--cc-bg); color: var(--cc-text);
    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: var(--cc-accent); 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 var(--cc-border); border-radius: 3.5px; background-color: var(--cc-bg);
    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: var(--cc-muted); background: none;
    font-weight: 400; line-height: 1.5; white-space: nowrap; cursor: pointer;
}
.cm-widget .dropdown-menu .dropdown-item:hover { background-color: var(--cc-soft); color: var(--cc-text); }
.cm-widget .dropdown-menu .dropdown-item.active { background: none; color: var(--cc-name); }
.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: 3px; background-color: var(--cc-bg); border-left: 3px solid #e3c000; color: var(--cc-muted); font-size: 12px; line-height: 18px; }
.cm-widget .cm-rules-note a { color: var(--cc-name); 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: var(--cc-soft);
}
.cm-widget .user-avatar::before {
    content: attr(data-initial); position: absolute; left: 0; top: 0; width: 100%; height: 100%;
    color: var(--cc-muted); 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: 3px; background: var(--cc-bg); }
.cm-widget .ci-form > .user-name { margin-bottom: 8px; color: var(--cc-muted); font-size: 12px; font-weight: 400; }
.cm-widget .ci-form > .user-name .link-highlight { color: var(--cc-text); font-weight: 700; }
.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: 6px; background-color: var(--cc-soft); 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 var(--cc-accent); }
.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: 6px; background-color: transparent; box-shadow: none;
    color: var(--cc-text); font-family: inherit; font-size: 13px; font-weight: 400; line-height: 19.5px; resize: none; overflow: hidden; field-sizing: content;
}
.cm-widget .comment-form textarea.form-control::placeholder { color: var(--cc-muted); 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: var(--cc-muted); font-size: 15px; line-height: 32px; text-align: center; cursor: pointer; }
.cm-widget .comment-form .ci-emo .cb-icon:hover { color: var(--cc-name); }
.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: 3px; 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: 6px; background: var(--cc-soft); color: var(--cc-muted); font-size: 12px; font-weight: 400; 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: var(--cc-text); }
.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: var(--cc-muted); font-size: 12px; line-height: 26px; text-align: center; cursor: pointer; }
.cm-widget .cm-fmt-btn:hover { color: var(--cc-name); }
.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: 3.5px; background-color: var(--cc-accent); 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: #2b649c; }
.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: var(--cc-muted); font-size: 13px; font-weight: 400; 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: 3px; background-color: rgba(220, 53, 69, .12); color: #dc3545; font-size: 12px; font-weight: 400; 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: var(--cc-veil); border-radius: 6px; }
.cm-widget .loading-absolute .loading,
#cm-gif-panel .loading { width: 26px; height: 26px; border: 3px solid rgba(54, 125, 195, .2); border-top-color: var(--cc-accent); border-radius: 50%; animation: aw-cm-spin .8s linear infinite; }
.cm-widget .loading-absolute .loading > div { display: none; }
@keyframes aw-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: 3px; background: var(--cc-bg); }
.cm-widget .cw_l-line:last-child { margin-bottom: 0; }
.cm-widget .cw_l-line.comment-focus { box-shadow: inset 0 0 0 1px var(--cc-name); }
.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: var(--cc-text); font-size: 14px; font-weight: 700; text-decoration: none; }
.cm-widget .cw_l-line .ihead .user-name:hover { color: var(--cc-name); }
.cm-widget .cw_l-line .ihead .time { color: var(--cc-muted); font-size: 11.2px; font-weight: 400; }
.cm-widget .cw_l-line .ihead .eps { padding: 0 6px; border-radius: 3px; background-color: var(--cc-accent); 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: 3px; background-color: var(--cc-accent); 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: var(--cc-muted); }

/* Body: the plot's 13px / 19.5 text. */
.cm-widget .ibody { position: relative; margin: 6px 0 8px; color: var(--cc-muted); font-size: 13px; font-weight: 400; 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: 700; color: var(--cc-text); }
.cm-widget .cm-body a { color: var(--cc-name); }
.cm-widget .cm-body blockquote { margin: 0 0 5px; padding: 2px 0 2px 10px; border-left: 3px solid var(--cc-border); color: var(--cc-muted); opacity: .85; }
.cm-widget .cm-body .tag-name, .cm-widget .tag-name { margin-right: 4px; color: var(--cc-name); 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: 3px; }
.cm-widget .cm-comment-notice { color: var(--cc-muted); 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: 3px; background-color: rgba(227, 192, 0, .12); color: var(--cc-muted); 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: 3.5px; background-color: var(--cc-accent); color: #fff; font-size: 12px; font-weight: 400; line-height: 26px; cursor: pointer; }
.cm-widget .show-spoil .btn:hover { background-color: #2b649c; }
.cm-widget .cm-auto-spoil { padding: 0 4px; border-radius: 3px; background-color: var(--cc-text); color: var(--cc-bg); }
.cm-widget .cm-auto-spoil.is-open { background-color: var(--cc-soft); color: inherit; }
.cm-widget .cm-auto-spoil-toggle { margin-left: 4px; padding: 0 6px; border-radius: 3px; background-color: var(--cc-accent); color: #fff; font-size: 10px; line-height: 16px; cursor: pointer; }
.cm-widget .cm-ts { display: inline; padding: 0 5px; border-radius: 3px; background-color: rgba(54, 125, 195, .12); color: var(--cc-name); font-size: 12px; font-weight: 700; cursor: pointer; }
.cm-widget .cm-ts.cm-ts--bad { background-color: var(--cc-soft); color: var(--cc-muted); cursor: default; }

/* Actions: the first skin's small text actions (.unstile-a.fs12), hover var(--cc-name). */
.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: var(--cc-muted); font-size: 12px; font-weight: 400; line-height: 22px;
    cursor: pointer; transition: color .15s;
}
.cm-widget .ibottom .ib-li > .btn:hover,
.cm-widget .ibottom .ib-more.show > .btn { color: var(--cc-name); }
.cm-widget .ibottom .ib-li > .btn i { margin-right: 4px; }
.cm-widget .ibottom .cm-btn-vote.active { color: var(--cc-accent); }
.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 var(--cc-border); 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: var(--cc-name); 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: 6px; background-color: var(--cc-bg); color: var(--cc-text); font-size: 13px; font-weight: 400; line-height: 19.5px; cursor: pointer; }
.cm-widget .cm-foot #cm-view-more:hover { background-color: var(--cc-accent); color: #fff; }
.cm-widget .cm-foot #cm-view-more i { margin-right: 6px; }
.cm-widget .no-result { padding: 15px; border-radius: 3px; background: var(--cc-bg); color: var(--cc-text); 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: var(--cc-bg); --border-color: var(--cc-border); --indicator-color: var(--cc-name);
    --input-border-color: var(--cc-border); --input-font-color: var(--cc-text); --outline-color: var(--cc-accent);
    --button-hover-background: var(--cc-soft);
    box-shadow: 0 0 40px 2px rgba(0, 0, 0, .35); border-radius: 6px;
}
#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: 6px; background-color: var(--cc-bg); box-shadow: 0 0 40px 2px rgba(0, 0, 0, .35);
    color: var(--cc-muted); font-size: 12px; font-weight: 400;
}
#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: 6px; background: var(--cc-soft); color: var(--cc-text); font-size: 13px; }
#cm-gif-panel .cm-gif-q:focus { box-shadow: inset 0 0 0 1px var(--cc-accent); outline: none; }
#cm-gif-panel .cm-gif-close { width: 32px; height: 32px; padding: 0; border-radius: 6px; 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: 3px; overflow: hidden; background-color: var(--cc-soft); 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: var(--cc-muted); text-align: center; }

/* ---------------------------------------------- animeworld's card look on top of the hooks above */

#cm-reactions .cm-rx { border: 1px solid var(--cc-border); border-radius: 999px; height: 30px; line-height: 28px; font-family: "Nunito Sans", sans-serif; font-weight: 700; }
#cm-reactions .cm-rx:hover, #cm-reactions .cm-rx.is-active { border-color: var(--cc-accent); }
.cm-widget { font-family: "Nunito Sans", sans-serif; font-size: 14px; line-height: 1.5; color: var(--cc-text); }
.cm-widget .sc-header .sc-h-title .cm-count { font-weight: 800; }
.cm-widget .sc-header .sc-h-title i { color: var(--cc-icon); }
.cm-widget .sc-header .sc-h-sort > .btn { border: 1px solid var(--cc-border); background: var(--cc-bg); color: var(--cc-text); font-weight: 700; }
.cm-widget .sc-header .sc-h-sort > .btn:hover, .cm-widget .sc-header .sc-h-sort.show > .btn { background: var(--cc-soft); color: var(--cc-accent); }
.cm-widget .dropdown-menu { border-radius: 6px; box-shadow: 0 6px 18px rgba(0, 0, 0, .14); max-height: none !important; }
.cm-widget .dropdown-menu .dropdown-item { font-weight: 600; width: auto; }
.cm-widget .dropdown-menu .dropdown-item.active { color: var(--cc-accent); }
/* Composer (animeworld's .comment-composer) and comment cards (.comment-card). */
.cm-widget .comment-input,
.cm-widget .cw_l-line { border: 1px solid var(--cc-border); border-radius: 8px; background: var(--cc-bg); }
.cm-widget .comment-input { margin-bottom: 14px; padding: 14px 16px; }
.cm-widget .cw_l-line { margin-bottom: 14px; padding: 14px 16px 12px; }
.cm-widget .ci-form > .user-name { font-weight: 600; color: var(--cc-muted); }
.cm-widget .ci-form > .user-name .link-highlight { color: var(--cc-name); font-weight: 700; }
.cm-widget .comment-form .au-ci-field,
.cm-widget .comment-form .cm-composer-grow { border-radius: 8px; background: var(--cc-bg); box-shadow: inset 0 0 0 1px var(--cc-border); }
.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 var(--cc-accent); }
.cm-widget .comment-form textarea.form-control { min-height: 96px; height: 96px; max-height: 260px; border-radius: 8px; font-size: 14.5px; font-weight: 400; line-height: 1.5; color: var(--cc-text); }
.cm-widget .comment-input.is-reply textarea.form-control { min-height: 60px; height: 60px; }
.cm-widget .comment-form .ci-emo .cb-icon { color: var(--cc-icon); }
.cm-widget .comment-form .ci-emo .cb-icon:hover { color: var(--cc-accent); }
.cm-widget .comment-form .btn-spoil { border-radius: 6px; font-weight: 700; }
.cm-widget .cm-fmt-btn { color: var(--cc-icon); border-radius: 6px; }
.cm-widget .cm-fmt-btn:hover { background: var(--cc-soft); color: var(--cc-accent); }
.cm-widget .comment-form .ci-b-right button[type=submit],
.cm-widget .comment-form .ci-b-right .btn-primary { padding: 7px 18px; border-radius: 6px; font-size: 14px; font-weight: 700; color: #fff; }
.cm-widget .comment-form .ci-b-right .btn-secondary,
.cm-widget .comment-form .ci-b-right .cm-edit-cancel { font-weight: 700; }
.cm-widget .user-avatar { left: 16px; top: 14px; width: 42px; height: 42px; background: var(--cc-soft); }
.cm-widget .user-avatar::before { line-height: 42px; }
.cm-widget .cw_l-line .ihead .user-name { color: var(--cc-name); font-size: 15px; font-weight: 700; }
.cm-widget .cw_l-line .ihead .user-name:hover { color: var(--cc-accent); text-decoration: none; }
/* position / float: css/pages/header-header.css has a global `.time` (the bell's rows: absolute, bottom right). */
.cm-widget .cw_l-line .ihead .time { position: static; float: none; font-size: 12.5px; font-weight: 400; color: var(--cc-muted); }
.cm-widget .ibody { margin: 8px 0 0; font-size: 15px; font-weight: 400; line-height: 1.6; color: var(--cc-text); }
.cm-widget .cm-body strong, .cm-widget .cm-body b { font-weight: 700; }
.cm-widget .cm-body a { color: var(--cc-accent); }
.cm-widget .cm-body .tag-name, .cm-widget .tag-name { padding: 0 4px; border-radius: 4px; background: var(--cc-tag-bg); color: var(--cc-tag); }
.cm-widget .ibottom { margin: 12px 0 0; padding: 8px 0 0; border-top: 1px solid var(--cc-border); gap: 2px 4px; }
.cm-widget .ibottom .ib-li > .btn { padding: 0 9px; border-radius: 6px; color: var(--cc-icon); font-size: 13px; font-weight: 700; line-height: 30px; }
.cm-widget .ibottom .ib-li > .btn:hover,
.cm-widget .ibottom .ib-more.show > .btn { background: var(--cc-soft); color: var(--cc-accent); }
.cm-widget .ibottom .cm-btn-vote.active { color: var(--cc-accent); }
.cm-widget .ibottom .ib-dislike .cm-btn-vote.active { color: #e83838; }
.cm-widget .ibottom .ib-more { margin-left: auto; }
.cm-widget .ibottom .ib-more .dropdown-menu { left: auto; right: 0; }
.cm-widget .replies-wrap .cw_l-line { border: 0; border-left: 3px solid var(--cc-accent); border-radius: 0; }
.cm-widget .replies-wrap .cw_l-line .ibottom { border-top: 0; margin-top: 4px; padding-top: 0; }
.cm-widget .reply-block.comment-input { border: 0; }
.cm-widget .rep-more .cm-btn-show-rep { color: var(--cc-accent); }
.cm-widget .cm-foot #cm-view-more { border: 1px solid var(--cc-border); font-weight: 700; color: var(--cc-text); }
.cm-widget .cm-foot #cm-view-more:hover { background: var(--cc-soft); color: var(--cc-accent); }
/* The empty thread: animeworld's .comment-empty. */
.cm-widget .no-result { margin: 4px 0 0; padding: 26px 16px; border: 1px dashed var(--cc-border); border-radius: 8px; background: none; color: var(--cc-text); font-size: 1rem; font-weight: 800; }
.cm-widget .no-result:before { content: "\f086"; display: block; margin-bottom: 8px; font-family: "Font Awesome 6 Free"; font-weight: 400; font-size: 1.9rem; line-height: 1; color: var(--cc-icon); }
/* Guests: animeworld's dashed "Effettua l'accesso per commentare" box in place of the composer
   (comments-guest.js opens the sign-in on any touch of the form). */
.cm-widget .comment-input.guest-comment-form { padding: 16px; border-style: dashed; text-align: center; cursor: pointer; }
.cm-widget .comment-input.guest-comment-form .user-avatar,
.cm-widget .comment-input.guest-comment-form .ci-form > .user-name,
.cm-widget .comment-input.guest-comment-form .ci-buttons,
.cm-widget .comment-input.guest-comment-form .ci-emo,
.cm-widget .comment-input.guest-comment-form textarea.form-control { display: none; }
.cm-widget .comment-input.guest-comment-form .comment-form .au-ci-field { background: none; box-shadow: none; }
.cm-widget .comment-input.guest-comment-form .comment-form .au-ci-field:before { content: "\f023"; margin-right: 8px; font-family: "Font Awesome 6 Free"; font-weight: 900; color: var(--cc-muted); }
.cm-widget .comment-input.guest-comment-form .comment-form .au-ci-field:after { content: "Effettua l'accesso per commentare."; font-size: 15px; font-weight: 700; color: var(--cc-accent); }
@media (min-width: 767px) {
    .cm-widget .comment-input,
    .cm-widget .cw_l-line { padding-left: 70px; }
    .cm-widget .comment-input.guest-comment-form { padding-left: 16px; }
    .cm-widget .replies-wrap .cw_l-line { padding-left: 52px; }
    .cm-widget .replies-wrap .cw_l-line .user-avatar { left: 12px; top: 10px; width: 30px; height: 30px; }
    .cm-widget .replies-wrap .cw_l-line .user-avatar::before { line-height: 30px; }
    .cm-widget .reply-block.comment-input { padding-left: 0; }
    .cm-widget .reply-block .user-avatar { display: none; }
}

/* The reaction bar on one line (owner, 2026-11-19): it scrolls sideways, and while more pills wait past the right
   edge the last visible one fades out (aw-shell.js sets .aw-rx-more / .aw-rx-less from the scroll position). */
#cm-reactions .cm-reactions-inner {
    flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; scroll-behavior: smooth;
}
#cm-reactions .cm-reactions-inner::-webkit-scrollbar { display: none; }
#cm-reactions .cm-rx { flex-shrink: 0; }
#cm-reactions.aw-rx-more .cm-reactions-inner {
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 90px), transparent);
    mask-image: linear-gradient(to right, #000 calc(100% - 90px), transparent);
}
#cm-reactions.aw-rx-less .cm-reactions-inner {
    -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 90px), transparent);
    mask-image: linear-gradient(to left, #000 calc(100% - 90px), transparent);
}
#cm-reactions.aw-rx-more.aw-rx-less .cm-reactions-inner {
    -webkit-mask-image: linear-gradient(to right, transparent, #000 90px, #000 calc(100% - 90px), transparent);
    mask-image: linear-gradient(to right, transparent, #000 90px, #000 calc(100% - 90px), transparent);
}
