/* ========== COMMENTS HEADER ========== */

.comments-header {
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #333;
}

.comments-header h2 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 600;
}

.comments-count {
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 400;
}


/* ========== COMMENTS ========== */

.comment-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.comment {
    padding: 16px 18px;
    border: 1px solid #333;
    border-radius: 4px;
    background: var(--bg-secondary);
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 14px;
}

.comment-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

.comment-author-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.comment-author-name {
    color: var(--accent-violet);
    font-size: 11px;
    font-weight: 600;
}

.comment-date {
    color: var(--text-muted);
    font-size: 9px;
}


/* ========== COMMENT BODY ========== */

.comment-body {
    color: var(--text-primary);
    font-size: 12px;
    line-height: 1.65;
}

.comment-body p {
    margin: 0 0 12px;
}

.comment-body p:last-child {
    margin-bottom: 0;
}


/* ========== COMMENT QUOTE ========== */

.comment-quote {
    margin-bottom: 14px;
    padding: 11px 14px;
    border-left: 3px solid var(--accent-violet);
    background: var(--bg-card);
    color: var(--text-muted);
    font-size: 11px;
    line-height: 1.55;
}

.comment-quote-header {
    margin-bottom: 6px;
    color: var(--accent-violet);
    font-size: 10px;
    font-weight: 600;
}

.comment-quote p {
    margin: 0;
}


/* ========== COMMENT ACTIONS ========== */

.comment-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px solid #2d2d2d;
}

.comment-reply-btn {
    padding: 6px 8px;
    border: 0;
    background: transparent;
    color: var(--text-muted);
    font-family: var(--font-family);
    font-size: 10px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.comment-reply-btn:hover {
    color: var(--accent-violet);
}


/* ========== WRITE COMMENT ========== */

.comment-create {
    margin-top: 38px;
}

.comment-create h2 {
    margin: 0 0 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #333;
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 600;
}

.comment-input {
    width: 100%;
    min-height: 150px;
    padding: 14px;
    border: 1px solid #3a3a3a;
    border-radius: 4px;
    outline: none;
    resize: vertical;
    box-sizing: border-box;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: 12px;
    line-height: 1.6;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.comment-input::placeholder {
    color: var(--text-muted);
}

.comment-input:focus {
    border-color: var(--accent-violet);
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.15);
}

.comment-create-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
}

.comment-submit-btn {
    padding: 9px 18px;
    border: 1px solid var(--accent-violet);
    border-radius: 6px;
    background: var(--accent-violet);
    color: #fff;
    font-family: var(--font-family);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, box-shadow 0.2s ease;
}

.comment-submit-btn:hover {
    background: var(--accent-dark-violet);
    box-shadow: var(--accent-glow);
}

.back-links {
    display: flex;
    gap: 10px;
}

.topic-title {
    padding: 16px 18px 0;
    color: #00fdff;
}

/* ================================
   COMMENT IMAGES
================================ */

.comment-images {
    display: grid;
    gap: 0.75rem;
    margin-top: 1rem;
}

.comment-images-1 {
    display: flex;
}

.comment-images-2 {
    display: flex;
}

.comment-images-3 {
    display: flex;
}

.comment-image {
    display: block;
    max-height: 30px;
    width: auto;
    max-width: 80px;
    object-fit: contain;
    background: var(--bg-primary);
    border-radius: 8px;
    cursor: pointer;
    padding: 5px;
    border: 1px solid transparent;
}

.comment-image:hover {
    opacity: 0.5;
    border: 1px solid var(--accent-violet);
}

.comment-create-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.comment-image-files {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    min-width: 0;
    flex: 1;
    overflow: hidden;
}

.comment-image-files:empty {
    display: block;
}

.comment-image-file {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    min-width: 0;
    padding: 0.4rem 0.55rem;
    background: var(--bg-primary);
    border: 1px solid var(--bg-card);
    border-radius: 6px;
}

.comment-image-file-name {
    max-width: 140px;
    overflow: hidden;
    color: var(--text-muted);
    font-size: 0.78rem;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.comment-image-file-remove {
    padding: 0;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
}

.comment-image-file-remove:hover {
    color: var(--accent-pink);
}

.comment-image-upload-btn {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 0;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    cursor: pointer;
}

.comment-image-upload-btn:hover {
    background: var(--bg-card);
    border-color: var(--accent-violet);
}

.comment-image-upload-btn img {
    width: 20px;
    height: 20px;
    display: block;
}

.comment-submit-btn {
    flex-shrink: 0;
}

.comment-delete-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.35rem;
    background: transparent;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    opacity: 0.65;
    transition: opacity 0.15s ease, background 0.15s ease;
    margin-left: auto;
}

.comment-delete-btn:hover {
    background: var(--bg-card);
    opacity: 1;
    filter: saturate(1.5);
}

.comment-delete-btn img {
    display: block;
    width: 17px;
    height: 17px;
}

.comment-reply-reference {
    display: flex;
    gap: 5px;
    width: fit-content;
    padding: 2px 5px;
    border: 1px solid var(--accent-dark-violet);
    background-color: #5936ac38;
    border-radius: 5px;
    margin-bottom: 10px;
}

.comment-reply-remove {
    color: red;
    cursor: pointer;
}

.comment-reply-remove:hover {
    opacity: 0.5;
}

.comment-reply-username {
    color: #00fdff;
}