/* Стили для блока комментариев */

.comments-container {
    margin-top: 2rem;
    padding: 0 1rem;
    max-width: 100%;
}

@media (min-width: 1024px) {
    .comments-container.container {
        max-width: 1024px !important;
        padding-left: 0;
        padding-right: 0;
    }
}

@media (max-width: 640px) {
    .comments-container {
        padding: 0 0.5rem !important;
        max-width: 100% !important;
    }

    .comment-item {
        /* padding-right: 0.25rem !important; */
        max-width: 100% !important;
    }

    .comment-item p {
        font-size: 0.875rem !important;
        /* Уменьшаем размер шрифта для длинных комментариев на мобильных */
    }

    .comment-replies {
        max-width: 100% !important;
    }

    .comments-input-container {
        padding: 1rem !important;
    }

    .comment-item[data-depth="0"] .avatar-circle {
        width: 2.5rem !important;
        /* Уменьшенный размер для нулевого уровня на мобильных */
        height: 2.5rem !important;
        font-size: 0.875rem !important;
    }

    .comment-item[data-depth="1"] .avatar-circle,
    .comment-replies .avatar-circle {
        width: 2rem !important;
        /* Уменьшенный размер для ответов на мобильных */
        height: 2rem !important;
        font-size: 0.65rem !important;
    }
}

.comments-input-container {
    /* background-color: var(--card-bg); */
    transition: background-color 0.3s ease, color 0.3s ease;
    border-radius: 8px;
    /* box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); */
}

@media (min-width: 640px) {
    .comments-input-container {
        /* padding: 1.5rem; */
        /* padding-right: 1.5rem; */
        padding-top: 1.5rem;
    }
}

/* Стили для блока ввода комментариев */

.comment-input-wrapper {
    display: flex;
    flex-direction: column;
    width: 100%;
    border-radius: 8px;
    /* overflow: hidden; */
    background-color: var(--input-bg);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    /* background-color: var(--modal-bg); */
}

.comment-input-wrapper:focus-within {
    border-color: #3b82f6;
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.5);
    /* Подсветка при фокусе */
}

.comment-input-area {
    flex-grow: 1;
    position: relative;
}

#comment-input {
    min-height: 60px;
    width: 100%;
    padding: 0.75rem;
    padding-bottom: 0.5rem;
    border: none;
    color: var(--text-color);
    resize: none;
    overflow-y: auto;
    line-height: 1.5;
    white-space: pre-wrap;
    /* Для переноса строк как в textarea */
    outline: none;
    /* Убираем фокус-обводку по умолчанию */
}

#comment-input.empty::before {
    content: attr(data-placeholder);
    color: var(--text-gray, #6b7280);
    opacity: 0.5;
    pointer-events: none;
}

#comment-input:not(.empty)::before {
    display: none;
}

.reply-form-container [name="comment"].empty::before {
    content: attr(data-placeholder);
    color: var(--text-gray, #6b7280);
    opacity: 0.5;
    pointer-events: none;
}

.reply-form-container [name="comment"]:not(.empty)::before {
    display: none;
}

#comment-input:focus {
    outline: none;
    box-shadow: none;
}

.comment-controls {
    display: flex;
    align-items: center;
    justify-content: end;
    min-height: 48px;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    padding-top: 0;
    /* background-color: var(--card-bg); */
    /* border-top: 1px solid var(--border-login-color); */
}

/* Кнопка отправки */

.comment-submit-btn {
    background-color: #3b82f6;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.comment-submit-btn:hover,
.comment-submit-btn:active {
    background-color: #2563eb;
}

.comment-submit-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#comment-form .comment-submit-btn {
    display: none;
}

#comment-form .comment-submit-btn.visible {
    display: flex;
}

.reply-form-container .comment-submit-btn {
    display: none;
}

.reply-form-container .comment-submit-btn.visible {
    display: flex;
}

.comment-submit-btn .submit-icon {
    display: none;
    width: 1.5rem;
    height: 1.5rem;
    stroke: #ffffff;
    fill: none;
}

@media (max-width: 400.1px) {
    .comment-submit-btn {
        width: 2.5rem;
        height: 2.5rem;
        padding: 0;
        border-radius: 50%;
    }

    .comment-submit-btn .submit-text {
        display: none;
    }

    .comment-submit-btn .submit-icon {
        display: block !important;
    }
}

#comment-input::-webkit-scrollbar {
    width: 8px;
}

#comment-input::-webkit-scrollbar-track {
    background: var(--input-bg);
    border-radius: 4px;
}

#comment-input::-webkit-scrollbar-thumb {
    background: #3b82f6;
    border-radius: 4px;
    transition: background 0.2s ease;
}

#comment-input::-webkit-scrollbar-thumb:hover {
    background: #2563eb;
}

#comment-input {
    scrollbar-width: thin;
    scrollbar-color: #3b82f6 var(--input-bg);
}

/* Общие стили для блока комментариев */

.comment-item .avatar-circle {
    background-color: var(--circle-bg);
    color: var(--text-color);
    font-weight: 600;
    border: solid #ffffff2b 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease, color 0.3s ease;
    width: 2.75rem;
    height: 2.75rem;
    font-size: 0.875rem;
}

.comment-item[data-depth="0"] .avatar-circle {
    width: 2.7rem;
    height: 2.7rem;
    font-size: 1rem;
}

.comment-item[data-depth="1"] .avatar-circle,
.comment-replies .avatar-circle {
    font-size: 0.75rem;
    width: 2.25rem;
    height: 2.25rem;
}

.comment-item {
    /* background-color: var(--card-bg); */
    position: relative;
    border-radius: 8px;
    /* padding-top: 1rem; */
    transition: background-color 0.3s ease, color 0.3s ease;
    max-width: 100%;
    display: flex;
    flex-direction: column;
}

.comment-item .comment-header {
    display: flex;
    align-items: center;
    /* gap: 0.75rem; */
}

.comment-item .comment-meta {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.comment-item .nickname {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-color);
}

.comment-item .comment-time {
    font-size: 0.75rem;
    color: var(--text-gray, #6b7280);
    display: inline-block;
    width: fit-content;
    text-wrap-mode: nowrap;
    cursor: pointer;
    transition: color 0.2s ease;
}

.comment-item .comment-time:hover {
    color: #60a5fa !important;
}

@media (max-width: 640px) {
    .comment-time {
        font-size: 0.65rem !important;
        display: inline-block;
        width: fit-content;
        position: relative;
        cursor: default;
        transition: color 0.2s ease;
    }

    .comment-time:hover::after {
        content: attr(title);
        position: absolute;
        bottom: 80%;
        left: 100%;
        background-color: var(--modal-bg);
        color: var(--text-color);
        padding: 0.4rem 0.6rem;
        border-radius: 6px;
        font-size: 0.65rem;
        white-space: nowrap;
        z-index: 10;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
        opacity: 1;
        transition: opacity 0.2s ease, transform 0.2s ease;
        transform: translateX(-10%) translateY(-4px);
    }

    .comment-time::after {
        opacity: 0;
        transform: translateX(-50%) translateY(0);
        transition: opacity 0.2s ease, transform 0.2s ease;
    }
}

.comment-item .comment-text {
    margin-top: 0.75rem;
    font-size: 0.875rem;
    line-height: 1.5;
    word-break: break-word;
    white-space: pre-wrap;
}

@media (max-width: 640px) {
    /* .comment-item .comment-header {
        gap: 0.5rem !important;
    } */

    .comment-item .avatar-circle {
        width: 2.5rem !important;
        height: 2.5rem !important;
        font-size: 0.75rem !important;
    }

    .comment-item .nickname {
        font-size: 0.85rem !important;
    }

    .comment-item .comment-time {
        font-size: 0.65rem !important;
    }

    .comment-item .comment-text {
        font-size: 1rem !important;
        margin-top: 0.5rem !important;
        line-height: 1.6 !important;
        font-family: -apple-system, BlinkMacSystemFont, Open Sans, Roboto, Helvetica Neue, Helvetica, sans-serif;
    }
}

.comment-item p {
    word-break: break-word;
    /* Разбиваем длинные слова */
    white-space: normal;
    /* Обычный перенос текста */
    max-width: fit-content;
}

.comment-item.comment-animate {
    animation: fadeSlideInComment 0.5s ease forwards;
}

.more-replies {
    color: var(--text-buttons-color);
    cursor: pointer;
    transition: color 0.2s ease;
}

/* Кнопка "Ответить" */

.comment-action-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-color);
    opacity: 0.7;
    margin-left: -0.5rem;
    padding: 0.5rem;
    transition: opacity 0.2s ease, color 0.2s ease, background-color 0.2s ease;
    border-radius: 4px;
    touch-action: manipulation;
}

.comment-action-btn:hover,
.comment-action-btn:active {
    opacity: 1;
    background-color: var(--chapter-hover-bg);
}

@media (max-width: 640px) {
    .comment-action-btn {
        padding: 0.4rem;
    }
}

html.dark .comment-action-btn {
    color: #9ca3af;
}

/* Стили для спойлера */

.spoiler-blur {
    filter: blur(4px);
    transition: filter 0.2s ease;
    cursor: pointer;
    padding: 0 0.2rem;
    border-radius: 4px;
    display: inline-block;
}

.spoiler-blur:hover {
    filter: none;
}

.comment-item blockquote {
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    max-width: 100%;
}

/* Стили для формы ответа */

.reply-form-container {
    margin-top: 1rem;
    margin-left: 1.22rem;
    display: none;
}

.reply-form-container.show {
    display: block;
    animation: fadeInRight 0.2s ease;
}

/* .reply-form-container .comment-input-wrapper {
    width: 100%;
    max-width: calc(100% + 1.5rem);
} */

.reply-form-container .comment-input-area {
    width: 100%;
}

.reply-form-container .comment-submit-icon {
    display: none;
    transform: scale(1.2);
}

.reply-form-container .comment-submit-icon.visible {
    display: block;
}

.reply-form-container [name="comment"] {
    min-height: 50px;
    width: 100%;
    padding: 0.75rem;
    padding-bottom: 0.5.rem;
    border: none;
    color: var(--text-color);
    resize: none;
    overflow-y: auto;
    transition: height 0.3s ease;
    line-height: 1.5;
    white-space: pre-wrap;
    outline: none;
}

.reply-form-container [name="comment"]:empty::before {
    content: attr(data-placeholder);
    color: var(--text-gray, #6b7280);
    opacity: 0.5;
    pointer-events: none;
}

.reply-form-container [name="comment"]:focus {
    outline: none;
    box-shadow: none;
    border: none;
}

.reply-form-container [name="comment"]:focus {
    scroll-margin-top: 60px !important;
}

@media (max-width: 640px) {
    .reply-form-container textarea {
        min-height: 50px;
    }

    .reply-form-container {
        margin-left: 0.7rem;
    }

    /* .reply-form-container .comment-input-wrapper {
        width: 120vw;
        max-width: calc(100% + 1rem) !important;
    } */

    .reply-form-container .comment-submit-icon {
        transform: scale(1.1);
        min-width: 50px;
    }
}

/* Кнопки "свернуть / n ответов" */

.toggle-replies-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    cursor: pointer;
    /* padding-left: 0.5rem; */
    margin-right: 1rem;
    padding-bottom: 0.4rem;
    padding-top: 0.4rem;
    border-radius: 4px;
    transition: color 0.2s ease, opacity 0.2s ease;
    color: var(--text-buttons-color);
    opacity: 0.7;
    touch-action: manipulation;
    text-wrap-mode: nowrap;
}

.toggle-replies-btn:hover {
    opacity: 1;
}

@media (min-width: 640px) {
    .toggle-replies-btn:hover {
        color: var(--text-buttons-color-h);
    }
}

/* Значения ширины текстового поля ответа для уровней 0–4 */

@media (max-width: 640px) {
    /* .comment-item[data-depth="0"] .reply-form-container .comment-input-wrapper {
        max-width: calc(100vw - 3.2rem) !important;
    } */

    .comment-item[data-depth="1"] .reply-form-container .comment-input-wrapper {
        max-width: calc(100vw - 4.2rem) !important;
    }

    .comment-item[data-depth="2"] .reply-form-container .comment-input-wrapper {
        max-width: calc(100vw - 5.4rem) !important;
    }

    .comment-item[data-depth="3"] .reply-form-container .comment-input-wrapper {
        max-width: calc(100vw - 6.4rem) !important;
    }

    .comment-item[data-depth="4"] .reply-form-container .comment-input-wrapper {
        max-width: calc(100vw - 7.5rem) !important;
    }

    .comment-item[data-depth="5"] .reply-form-container .comment-input-wrapper {
        max-width: calc(100vw - 8.5rem) !important;
    }
}

/* Left-border для уровней 0–3 и 3+ */

.comment-item {
    --comment-border: none;
}

.comment-item[data-depth="0"],
.comment-item[data-depth="1"],
.comment-item[data-depth="2"],
.comment-item[data-depth="3"] {
    --comment-border: 2px solid #3b83f631;
}

/* Отступы для уровней 0–3 и 3+ */

.comment-item {
    --comment-indent: 0rem;
}

@media (max-width: 355px) {

    .comment-item[data-depth="0"],
    .comment-item[data-depth="1"],
    .comment-item[data-depth="2"],
    .comment-item[data-depth="3"],
    .comment-item[data-depth="4"] {
        --comment-indent: 16px !important;
    }
}

.comment-item[data-depth="0"],
.comment-item[data-depth="1"],
.comment-item[data-depth="2"],
.comment-item[data-depth="3"],
.comment-item[data-depth="4"] {
    --comment-indent: 26px;
}

@media (min-width: 500px) {

    .comment-item[data-depth="0"],
    .comment-item[data-depth="1"],
    .comment-item[data-depth="2"],
    .comment-item[data-depth="3"],
    .comment-item[data-depth="4"] {
        --comment-indent: 35px !important;
    }
}

/* Стили появления ответов после отправки */

.comment-replies {
    position: relative;
    padding-left: var(--comment-indent);
    border-radius: 0px 0px;
}

.comment-replies>.comment-item:where([data-depth="1"], [data-depth="2"], [data-depth="3"], [data-depth="4"], [data-depth="5"]):not(:last-child)::after {
    content: "";
    position: absolute;
    left: 0;
    margin-left: -16px;
    top: 0;
    bottom: 0;
    border-left: 1px solid var(--border-color);
    /* width: 1px;
    background-color: var(--border-color); */
    z-index: -1;
}

@media (min-width: 499px) and (max-width: 1024px) {

    .comment-replies>.comment-item:where([data-depth="1"], [data-depth="2"], [data-depth="3"], [data-depth="4"], [data-depth="5"]):not(:last-child)::after {
        margin-left: -17px;
    }
}

.comment-item[data-depth]:not([data-depth="0"]) {
    position: relative;
}

.comment-item:where([data-depth="1"], [data-depth="2"], [data-depth="3"], [data-depth="4"], [data-depth="5"])::before {
    content: "";
    position: absolute;
    right: 100%;
    margin-right: 5px;
    top: 0;
    /* выравнивание по .comment-header (после padding-top:1rem) */
    /* width: calc(var(--comment-indent) - var(--hook-space)); */
    width: 11px;
    height: 35px;
    margin-top: -15px;
    border-bottom: 1px solid var(--border-color);
    border-left: 1px solid var(--border-color);
    border-bottom-left-radius: 10px;
}

@media (max-width: 1024px) {
    .comment-item:where([data-depth="1"], [data-depth="2"], [data-depth="3"], [data-depth="4"], [data-depth="5"])::before {
        content: "";
        position: absolute;
        right: 100%;
        margin-right: 6px;
        top: 0;
        /* выравнивание по .comment-header (после padding-top:1rem) */
        /* width: calc(var(--comment-indent) - var(--hook-space)); */
        width: 11px;
        height: 35px;
        margin-top: -15px;
        border-bottom: 1px solid var(--border-color);
        border-left: 1px solid var(--border-color);
        border-bottom-left-radius: 10px;
    }
}

@media (max-width: 499px) {
    .comment-item:where([data-depth="1"], [data-depth="2"], [data-depth="3"], [data-depth="4"], [data-depth="5"])::before {
        content: "";
        position: absolute;
        right: 100%;
        margin-right: 5px;
        top: 0;
        width: 11px;
        height: 35px;
        margin-top: -15px;
        border-bottom: 1px solid var(--border-color);
        border-left: 1px solid var(--border-color);
        border-bottom-left-radius: 10px;
    }
}

.comment-replies.show {
    max-height: none;
    opacity: 1;
    display: block;
    animation: fadeIn 0.8s ease;
}

.comment-replies.hidden {
    max-height: 0;
    opacity: 0;
    display: none;
}

/* Кнопки форматирования (Bold,Italic,Spoiler...) */

.format-btn {
    background: none;
    transition: background-color 0.2s ease, transform 0.3s ease;
}

.format-btn:hover {
    background-color: var(--chapter-hover-bg);
    transform: scale(1.1);
}

/* Кнопка отмены в ответе */

.cancel-reply-btn {
    background-color: #33333380;
    font-size: 0.875rem;
    transition: background-color 0.3s ease;
}

.cancel-reply-btn:hover,
.cancel-reply-btn:active {
    background-color: #4b4b4b;
}

.cancel-reply-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Меню форматирования */

@media (max-width: 550px) {
    .format-menu {
        transform: translateY(10px);
        transition: opacity 0.3s ease, transform 0.3s ease;
    }

    .format-menu.hidden {
        pointer-events: none;
    }

    .format-menu:not(.hidden) {
        opacity: 1;
        transform: translateY(0);
    }

    .format-menu-btn {
        transition: background-color 0.2s ease, transform 0.2s ease;
    }

    .format-menu-btn:hover {
        background-color: var(--chapter-hover-bg);
        transform: scale(1.1);
    }
}

/* Всякое */

/* .toastify {
    display: none !important;
} */






.comment-deleted {
    color: #999;
    font-style: italic;
}

.comment-delete-btn {
    cursor: pointer;
    color: #ef4444;
    background: none;
    border: none;
    font-size: 0.75rem;
    margin-left: 0.5rem;
}

/* Стили для индикатора загрузки */
#loading-indicator {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    color: #6b7280;
    /* text-gray-500 */
    font-size: 0.875rem;
    line-height: 1.25rem;
}

#loading-indicator.hidden {
    display: none;
}

/* Стили для анимации появления комментариев */
.comment-animate {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.char-counter {
    position: absolute;
    top: 0;
    right: 0;
    margin-top: -1.5rem;
    color: var(--text-gray, #6b7280);
    font-size: 0.75rem;
    pointer-events: none;
    z-index: 10;
    font-family: inherit;
    /* background: rgba(255, 255, 255, 0.1); */
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: color 0.2s ease;
}

.char-counter.warning {
    color: #ef4444;
}

.comment-input-wrapper.warning {
    border-color: #ef4444;
    background-color: rgba(239, 68, 68, 0.1);
}

.comment-input-wrapper {
    transition: background-color 0.2s ease;
}

.comment-menu-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: opacity 0.2s ease, background-color 0.2s ease;
    opacity: 0.7;
}

.comment-menu-btn:hover {
    opacity: 1;
    background-color: var(--chapter-hover-bg);
}

.comment-menu {
    position: absolute;
    /* bottom: 100%; */
    top: 0;
    margin-top: -9rem;
    left: 0;
    margin-left: 4rem;
    background: var(--modal-bg);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 150px;
    z-index: 10;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.comment-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.comment-menu-item {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    background: none;
    border: none;
    font-size: 0.85rem;
    text-align: left;
    color: var(--text-color);
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.comment-menu-item:hover {
    background-color: var(--chapter-hover-bg);
}

.comment-menu-item:first-child {
    border-radius: 8px 8px 0 0;
}

.comment-menu-item:last-child {
    border-radius: 0 0 8px 8px;
}

.comment-menu-btn svg {
    transform: rotate(90deg);
}

.comment-item .vote-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.25rem;
    /* margin-left: auto; */
    padding-left: 0.5rem;
    opacity: 0.7;
    transition: opacity 0.2s ease, color 0.2s ease;
}

/* @media (max-width: 500px) {

    .comment-item:not([data-depth="0"]):not([data-depth="1"]):not([data-depth="2"]):not([data-depth="3"]):not([data-depth="4"]) .vote-container {
        flex-direction: column-reverse;
    }

} */


.comment-item .vote-container:hover {
    opacity: 1;
}

.comment-item .vote-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: background-color 0.2s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
}

.comment-item .vote-btn:hover {
    background-color: var(--chapter-hover-bg);
    transform: scale(1.1);
}

.comment-item .upvote-btn svg {
    stroke: currentColor;
    fill: none;
    width: 1rem;
    height: 1rem;
}

.comment-item .upvote-btn.active {
    color: #22c55e;
    background-color: var(--chapter-hover-bg);
    transform: scale(1.1);
}

.comment-item .downvote-btn svg {
    stroke: currentColor;
    fill: none;
    width: 1rem;
    height: 1rem;
}

.comment-item .upvote-btn:hover {
    color: #22c55e;
}

.comment-item .downvote-btn:hover {
    color: #ef4444;
}

.vote-count.positive {
    color: #22c55e;
}

.vote-count.negative {
    color: #ef4444;
}

.comment-item .downvote-btn.active {
    color: #ef4444;
    background-color: var(--chapter-hover-bg);
    transform: scale(1.1);
}

.comment-item .vote-count {
    font-size: 0.875rem;
    font-weight: 600;
    /* color: var(--text-color); */
    min-width: 1.5rem;
    text-align: center;
    font-style: normal;
}

.reply-to {
    font-size: 0.65rem;
    opacity: 0.8;
}

.reply-to-nick:hover {
    color: #60a5fa !important;
    text-decoration: underline;
}

.comment-header {
    scroll-margin-top: 15px;
}

.comment-wrapper {
    position: relative;
    scroll-margin-top: 15px;
}

.comment-wrapper:before {
    content: '';
    position: absolute;
    top: -0.5rem;
    left: -1rem;
    right: -1rem;
    bottom: -0.5rem;
    background-color: rgba(59, 130, 246, 0.1);
    border: 2px solid #3b82f6;
    border-radius: 8px;
    z-index: 100;
    opacity: 0;
    transform: scale(0.98);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

.comment-wrapper.highlight:before {
    opacity: 1;
    transform: scale(1);
}

.reply-to svg {
    transform: rotate(180deg);
}

@media (max-width: 640px) {
    .reply-to {
        flex-direction: row;
        /* align-items: flex-start;
        gap: 0; */
    }

    .reply-to svg {
        transform: rotate(180deg);
        margin-top: -5px;
    }
}


.comment-item[data-depth="4"] .reply-form-container .comment-submit-btn,
.comment-item[data-depth="5"] .reply-form-container .comment-submit-btn {
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border-radius: 50%;
}

.comment-item[data-depth="4"] .reply-form-container .comment-submit-btn .submit-text,
.comment-item[data-depth="5"] .reply-form-container .comment-submit-btn .submit-text {
    display: none;
}

.comment-item[data-depth="4"] .reply-form-container .comment-submit-btn .submit-icon,
.comment-item[data-depth="5"] .reply-form-container .comment-submit-btn .submit-icon {
    display: block !important;
}

/* Глобально для всех toast'ов */
.toastify {
    border-radius: 26px !important;
    max-width: 350px;
    padding: 12px 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    font-family: 'Inter', sans-serif;
}

/* Для кастомного класса ошибок (зелёный для успеха, красный для ошибок) */
.custom-error-toast {
    text-align: center;
    background: #424679 !important;
    color: white;
    border: 2px solid #b4d5ff !important;
}

.custom-success-toast {
    background: #10b981 !important;
    /* Зелёный для успеха */
    color: white;
    border-left: 4px solid #059669;
    /* Левая рамка */
}