﻿/* Comments (Watch page) */

.watch-comments-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0 10px 0;
}

.watch-comments-title {
    font-size: 18px;
    font-weight: 700;
}

.watch-comments-btn {
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.18);
    background: rgba(255,255,255,0.06);
    color: #fff;
    cursor: pointer;
    font-size: 13px;
    text-decoration: none !important;
}

    .watch-comments-btn:hover,
    .watch-comments-btn:focus,
    .watch-comments-btn:active {
        background: rgba(255,255,255,0.10);
        text-decoration: none !important;
    }

.comments-loading,
.comments-error,
.comments-empty {
    padding: 10px 0;
    color: rgba(255,255,255,0.75);
    font-size: 14px;
}

.comments-error {
    color: #ff7a7a;
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 6px 0 2px 0;
}

/* ===== comment item ===== */

.comment-item {
    display: flex;
    gap: 12px;
}

.comment-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex: 0 0 auto;
    cursor: pointer;
    overflow: hidden;
    background: rgba(255,255,255,0.08);
}

    .comment-avatar img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

    .comment-avatar.placeholder {
        display: grid;
        place-items: center;
        font-weight: 700;
        color: rgba(255,255,255,0.9);
        user-select: none;
    }

.comment-body {
    flex: 1;
    min-width: 0;
}

.comment-header {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.comment-author {
    font-weight: 700;
    color: rgba(255,255,255,0.95);
    font-size: 14px;
}

.comment-time {
    font-size: 12px;
    color: rgba(255,255,255,0.55);
}

.comment-text {
    margin-top: 2px;
    font-size: 14px;
    line-height: 1.35;
    color: rgba(255,255,255,0.92);
    word-break: break-word;
}

    .comment-text a {
        color: #3ea6ff;
        text-decoration: none;
    }

        .comment-text a:hover {
            text-decoration: underline;
        }

.comment-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 6px;
    color: rgba(255,255,255,0.70);
    font-size: 12px;
}

.comment-like {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Replies toggle button */
.comment-replies-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    border: none;
    background: rgba(62,166,255,0.12);
    color: #3ea6ff;
    cursor: pointer;
    font-weight: 700;
    text-decoration: none !important;
}

    .comment-replies-btn:hover,
    .comment-replies-btn:focus,
    .comment-replies-btn:active {
        background: rgba(62,166,255,0.16);
        text-decoration: none !important;
    }

    .comment-replies-btn .chev {
        font-size: 12px;
        opacity: 0.9;
    }

    .comment-replies-btn .count {
        font-variant-numeric: tabular-nums;
    }

.comment-badge {
    color: #ff6a00;
    font-weight: 600;
}

/* ===== replies (indented like YouTube) ===== */

.replies-wrap {
    margin-top: 10px;
    /* Сдвиг вправо относительно аватара родителя:
       36px (avatar) + 12px (gap) ≈ 48px */
    margin-left: 48px;
    padding-left: 14px;
    border-left: 2px solid rgba(255,255,255,0.10);
}

.replies-loading {
    color: rgba(255,255,255,0.70);
    font-size: 13px;
    padding: 6px 0;
}

.reply-item {
    display: flex;
    gap: 10px;
    padding: 8px 0;
}

.reply-left {
    flex: 0 0 auto;
}

.reply-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    overflow: hidden;
    background: rgba(255,255,255,0.08);
}

    .reply-avatar.placeholder {
        display: grid;
        place-items: center;
        font-weight: 700;
        color: rgba(255,255,255,0.9);
        user-select: none;
    }

.reply-body {
    flex: 1;
    min-width: 0;
}

.reply-header {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.reply-author {
    font-weight: 700;
    color: rgba(255,255,255,0.95);
    font-size: 13px;
}

.reply-time {
    font-size: 12px;
    color: rgba(255,255,255,0.55);
}

.reply-text {
    margin-top: 2px;
    font-size: 13.5px;
    line-height: 1.35;
    color: rgba(255,255,255,0.90);
    word-break: break-word;
}

    .reply-text a {
        color: #3ea6ff;
        text-decoration: none;
    }

        .reply-text a:hover {
            text-decoration: underline;
        }

.replies-more {
    padding: 6px 0 2px 0;
}

.replies-more-btn {
    padding: 6px 12px;
    border-radius: 999px;
    border: none;
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.92);
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none !important;
}

    .replies-more-btn:hover,
    .replies-more-btn:focus,
    .replies-more-btn:active {
        background: rgba(255,255,255,0.12);
        text-decoration: none !important;
    }

    .replies-more-btn:disabled {
        opacity: 0.6;
        cursor: default;
    }

.replies-error {
    color: #ff7a7a;
    font-size: 13px;
    padding: 6px 0;
}
