/*
 * animeunity-comments.css — the CMS comment widget (partials/comments/*,
 * partials/watch/comments; comments.js, comments-guest.js, community.min.js)
 * in animeunity's vocabulary (tmp/visual/GUIDE.md, tmp/watch/SPEC.md §4).
 * Owned by the ANIME+WATCH area; shared by the anime / episode template and
 * community posts (#content-comments-community). Loaded on every page.
 *
 * animeunity has no comments: the thread is composed from its sidebar pieces —
 * the .info-wrapper strip as the box heading, bg-1 cards (radius 3, padding
 * 14px 15px) for the composer and each comment, Overpass 13px/600 text in
 * --color-text, names in --color-text-0, #3db4f2 for links / hover, #007bff
 * for buttons and the active pills (.btn-episode-nav look), --color-background
 * (the page colour) for inset fields. On the anime page everything below the
 * red bar inherits weight 900 (animeunity's unclosed <b>): every weight here is
 * explicit. Tokens only — both themes come free.
 *
 * Class hooks styled (stable — anime and community include the partials):
 *   #comments .au-cm-head .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).
 */

/* ------------------------------------------------- the box (anime page) */

#anime #comments.au-comments { margin-top: 10px; font-weight: 600; }
#anime #comments .au-cm-head {
    display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 10px 18px !important; margin-bottom: 15px;
}
#anime #comments .au-cm-head > strong { font-size: 16px; font-weight: 900; color: var(--color-text-0); }
#comments .au-cm-tabs { margin-left: auto; display: inline-flex; flex-wrap: wrap; gap: 6px; }
#comments .au-cm-tabs .cm-by {
    display: inline-block; min-width: 50px; padding: 4px 10px; border-radius: 6px; background: var(--color-background);
    color: var(--color-text-0); font-size: 13px; font-weight: 400; line-height: 1.5; text-align: center; cursor: pointer;
    user-select: none; transition: background .15s, color .15s;
}
#comments .au-cm-tabs .cm-by:hover,
#comments .au-cm-tabs .cm-by.au-active { background: #007bff; color: #fff; }
#comments .au-cm-tabs .cm-by:focus { outline: none; }
#comments .au-cm-load { padding: 10px 0 5px; text-align: center; }
#comments .au-cm-load .btn { font-size: 14px; font-weight: 400; cursor: pointer; }

/* 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(--color-background-1); color: var(--color-text-0);
    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: #007bff; color: #fff; }
#cm-reactions .cm-rx:focus { outline: none; }
#cm-reactions .cm-rx.is-active { background-color: #007bff; 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(--color-text); 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: au-rx-pop .35s ease; }
@keyframes au-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(--color-text); 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: var(--color-text); font-size: 14px; font-weight: 600; }
.cm-widget .sc-header .sc-h-title .cm-count { color: var(--color-text-0); font-weight: 900; }
.cm-widget .sc-header .sc-h-title i { margin-right: 6px; color: #3db4f2; }
.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(--color-background-1); color: var(--color-text-0);
    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: #007bff; color: #fff; }

/* Drop-downs (sort, "Altro" on a comment): animeunity'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(--color-divider); border-radius: 3.5px; background-color: var(--color-background-1);
    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(--color-text); background: none;
    font-weight: 600; line-height: 1.5; white-space: nowrap; cursor: pointer;
}
.cm-widget .dropdown-menu .dropdown-item:hover { background-color: var(--color-background); color: var(--color-text-0); }
.cm-widget .dropdown-menu .dropdown-item.active { background: none; color: #3db4f2; }
.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(--color-background-1); border-left: 3px solid #e3c000; color: var(--color-text); font-size: 12px; line-height: 18px; }
.cm-widget .cm-rules-note a { color: #3db4f2; font-weight: 700; }

/* Avatars: animeunity'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(--color-background);
}
.cm-widget .user-avatar::before {
    content: attr(data-initial); position: absolute; left: 0; top: 0; width: 100%; height: 100%;
    color: var(--color-text); 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(--color-background-1); }
.cm-widget .ci-form > .user-name { margin-bottom: 8px; color: var(--color-text); font-size: 12px; font-weight: 600; }
.cm-widget .ci-form > .user-name .link-highlight { color: var(--color-text-0); 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: 6px; background-color: var(--color-background); 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 #007bff; }
.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(--color-text-0); 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: var(--color-text); 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(--color-text); font-size: 15px; line-height: 32px; text-align: center; cursor: pointer; }
.cm-widget .comment-form .ci-emo .cb-icon:hover { color: #3db4f2; }
.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(--color-background); color: var(--color-text); 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: var(--color-text-0); }
.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(--color-text); font-size: 12px; line-height: 26px; text-align: center; cursor: pointer; }
.cm-widget .cm-fmt-btn:hover { color: #3db4f2; }
.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: animeunity'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: #007bff; 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: #0069d9; }
.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(--color-text); 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: 3px; 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(--color-background-1-rgb), .7); border-radius: 6px; }
.cm-widget .loading-absolute .loading,
#cm-gif-panel .loading { width: 26px; height: 26px; border: 3px solid rgba(0, 123, 255, .2); border-top-color: #007bff; border-radius: 50%; animation: au-cm-spin .8s linear infinite; }
.cm-widget .loading-absolute .loading > div { display: none; }
@keyframes au-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(--color-background-1); }
.cm-widget .cw_l-line:last-child { margin-bottom: 0; }
.cm-widget .cw_l-line.comment-focus { box-shadow: inset 0 0 0 1px #3db4f2; }
.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(--color-text-0); font-size: 14px; font-weight: 900; text-decoration: none; }
.cm-widget .cw_l-line .ihead .user-name:hover { color: #3db4f2; }
.cm-widget .cw_l-line .ihead .time { color: var(--color-text); font-size: 11.2px; font-weight: 400; }
.cm-widget .cw_l-line .ihead .eps { padding: 0 6px; border-radius: 3px; 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: 3px; background-color: #007bff; 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(--color-text); }

/* Body: the plot's 13px / 19.5 text. */
.cm-widget .ibody { position: relative; margin: 6px 0 8px; color: var(--color-text); 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: var(--color-text-0); }
.cm-widget .cm-body a { color: #3db4f2; }
.cm-widget .cm-body blockquote { margin: 0 0 5px; padding: 2px 0 2px 10px; border-left: 3px solid var(--color-divider); color: var(--color-text); opacity: .85; }
.cm-widget .cm-body .tag-name, .cm-widget .tag-name { margin-right: 4px; color: #3db4f2; 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(--color-text); 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(--color-text); 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: #007bff; color: #fff; font-size: 12px; font-weight: 400; line-height: 26px; cursor: pointer; }
.cm-widget .show-spoil .btn:hover { background-color: #0069d9; }
.cm-widget .cm-auto-spoil { padding: 0 4px; border-radius: 3px; background-color: var(--color-text-0); color: var(--color-background-1); }
.cm-widget .cm-auto-spoil.is-open { background-color: var(--color-background); color: inherit; }
.cm-widget .cm-auto-spoil-toggle { margin-left: 4px; padding: 0 6px; border-radius: 3px; background-color: #007bff; 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(0, 123, 255, .12); color: #3db4f2; font-size: 12px; font-weight: 700; cursor: pointer; }
.cm-widget .cm-ts.cm-ts--bad { background-color: var(--color-background); color: var(--color-text); cursor: default; }

/* Actions: animeunity's small text actions (.unstile-a.fs12), hover #3db4f2. */
.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(--color-text); 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: #3db4f2; }
.cm-widget .ibottom .ib-li > .btn i { margin-right: 4px; }
.cm-widget .ibottom .cm-btn-vote.active { color: #007bff; }
.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(--color-divider); 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: #3db4f2; 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(--color-background-1); color: var(--color-text-0); font-size: 13px; font-weight: 400; line-height: 19.5px; cursor: pointer; }
.cm-widget .cm-foot #cm-view-more:hover { background-color: #007bff; color: #fff; }
.cm-widget .cm-foot #cm-view-more i { margin-right: 6px; }
.cm-widget .no-result { padding: 15px; border-radius: 3px; background: var(--color-background-1); color: var(--color-text-0); 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(--color-background-1); --border-color: var(--color-divider); --indicator-color: #3db4f2;
    --input-border-color: var(--color-divider); --input-font-color: var(--color-text-0); --outline-color: #007bff;
    --button-hover-background: var(--color-background);
    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(--color-background-1); box-shadow: 0 0 40px 2px rgba(0, 0, 0, .35);
    color: var(--color-text); 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: 6px; background: var(--color-background); color: var(--color-text-0); font-size: 13px; }
#cm-gif-panel .cm-gif-q:focus { box-shadow: inset 0 0 0 1px #007bff; 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(--color-background); 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(--color-text); text-align: center; }
