/* static/css/comments.css - Consistent with claim_detail.css styling */

/* Comments Section Container */
.comments-section {
    background: white;
    border: 1px solid #ddd;
    padding: 20px;
    margin-top: 20px;
    position: relative;
}

.comments-section h2 {
    position: absolute;
    width: 200px;
    top: 0;
    left: 0;
    font-size: 13px;
    margin: 0;
    padding: 8px 16px;
    background: rgb(81, 81, 81);
    color: white;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.comments-section-content {
    margin-top: 30px;
}

/* Comment Form */
.comment-form {
    margin-bottom: 20px;
}

.comment-form textarea {
    width: 100%;
    min-height: 80px;
    padding: 8px;
    border: 1px solid #ccc;
    font-family: Verdana, Geneva, sans-serif;
    font-size: 13px;
    margin-bottom: 8px;
    resize: vertical;
    box-sizing: border-box;
}

.comment-form textarea:focus {
    outline: none;
    border-color: #828282;
}

/* Login prompt */
.login-prompt {
    font-size: 12px;
    color: #828282;
    margin-bottom: 15px;
}

.login-prompt a {
    color: #000;
    text-decoration: underline;
}

/* Comments List */
.comments-list {
    margin-top: 15px;
}

/* Individual Comment */
.comment {
    padding: 8px 0;
    font-size: 13px;
    line-height: 1.5;
}

/* Thread indicator bar for nested comments */
.comment-indent-0 { margin-left: 0; }

/* Shared styles for all indented comments */
.comment-indent-1,
.comment-indent-2,
.comment-indent-3,
.comment-indent-4,
.comment-indent-5,
.comment-indent-6,
.comment-indent-7,
.comment-indent-8,
.comment-indent-9,
.comment-indent-10,
.comment-indent-deep {
    border-left: 2px solid #ddd;
    padding-left: 12px;
}

/* Explicit increasing indentation for each level to ensure stepping */
.comment-indent-1 { margin-left: 24px; }
.comment-indent-2 { margin-left: 48px; }
.comment-indent-3 { margin-left: 72px; }
.comment-indent-4 { margin-left: 96px; }
.comment-indent-5 { margin-left: 120px; }
.comment-indent-6 { margin-left: 144px; }
.comment-indent-7 { margin-left: 168px; }
.comment-indent-8 { margin-left: 192px; }
.comment-indent-9 { margin-left: 216px; }
.comment-indent-10 { margin-left: 240px; }

/* Deeper nesting - cap and indicate */
.comment-indent-deep {
    margin-left: 240px;
    border-left-style: dotted;
}

/* Comment header line - matches .claim-meta styling */
.comment-head {
    font-size: 11px;
    color: #828282;
    margin-bottom: 4px;
}

.comment-head a {
    color: #828282;
    text-decoration: none;
}

.comment-head a:hover {
    text-decoration: underline;
}

.comment-author {
    /* Same as other meta links */
}

.comment-time {
    margin-left: 6px;
}

/* Comment actions - inline after timestamp */
.comment-actions {
    margin-left: 6px;
    display: inline;
}

.comment-actions a,
.comment-actions button {
    color: #828282;
    text-decoration: none;
    background: none;
    border: none;
    padding: 0;
    font-size: 11px;
    cursor: pointer;
    font-family: inherit;
}

.comment-actions a:hover,
.comment-actions button:hover {
    text-decoration: underline;
}

/* Separator - matches claim_detail.css */
.action-separator {
    color: #828282;
    margin: 0 5px;
}

/* Inline voting for comments - matches .vote-score-small sizing */
.vote-widget-comment-inline {
    display: inline;
}

.vote-widget-comment-inline .vote-link,
.vote-widget-comment-inline .vote-link-disabled {
    color: #828282;
    text-decoration: none;
    font-size: 11px;
}

.vote-widget-comment-inline .vote-link:hover {
    color: #ff6600;
    text-decoration: underline;
}

.vote-widget-comment-inline .vote-link.voted {
    color: #ff6600;
}

.vote-widget-comment-inline .vote-link-disabled {
    color: #ccc;
    cursor: default;
}

.vote-widget-comment-inline .vote-score-text {
    color: #828282;
    font-size: 11px;
    margin: 0 2px;
}

/* Reply button - matches .reply-btn in claim_detail.css */
.reply-btn {
    background: none;
    border: none;
    color: #828282;
    cursor: pointer;
    padding: 0;
    font-size: 11px;
    font-family: inherit;
}

.reply-btn:hover {
    color: #ff6600;
    text-decoration: underline;
}

/* Delete link */
.comment-actions .delete-link {
    color: #828282;
    text-decoration: none;
    font-size: 11px;
}

.comment-actions .delete-link:hover {
    text-decoration: underline;
}

/* Comment content - matches .claim-description sizing */
.comment-text {
    font-size: 13px;
    line-height: 1.5;
    color: #000;
    margin: 4px 0 0 4px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.comment-text p {
    margin: 0 0 8px 0;
}

.comment-text p:last-child {
    margin-bottom: 0;
}

.comment-text code {
    background: #f5f5f5;
    padding: 1px 4px;
    font-family: monospace;
    font-size: 12px;
}

.comment-text pre {
    background: #f5f5f5;
    padding: 8px;
    overflow-x: auto;
    font-size: 12px;
    margin: 8px 0;
}

.comment-text blockquote {
    margin: 8px 0;
    padding-left: 10px;
    border-left: 2px solid #ccc;
    color: #666;
}

/* Reply form - matches claim_detail.css .reply-form */
.reply-form {
    margin-top: 10px;
    padding: 10px;
    background: white;
    border: 1px solid #ddd;
}

.reply-form textarea {
    width: 100%;
    min-height: 60px;
    padding: 8px;
    border: 1px solid #ccc;
    font-family: Verdana, Geneva, sans-serif;
    font-size: 13px;
    margin-bottom: 8px;
    resize: vertical;
    box-sizing: border-box;
}

.reply-form textarea:focus {
    outline: none;
    border-color: #828282;
}

/* Reply form buttons - matches .btn-small styling */
.reply-form .btn,
.reply-form .btn-sm {
    padding: 2px 8px;
    font-size: 11px;
    background: #f6f6ef;
    border: 1px solid #ddd;
    cursor: pointer;
    font-family: inherit;
    margin-right: 4px;
}

.reply-form .btn:hover,
.reply-form .btn-sm:hover {
    background: #e6e6df;
}

.reply-form .btn-secondary {
    background: #f0f0f0;
    color: #666;
    border: 1px solid #ccc;
}

.reply-form .btn-secondary:hover {
    background: #e0e0e0;
}

/* No comments state */
.no-comments {
    color: #828282;
    font-style: italic;
    text-align: center;
    padding: 20px;
    font-size: 13px;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .comments-section {
        padding: 15px;
    }
    
    .comments-section-content {
        margin-top: 25px;
    }
    
    .comment-indent-1,
    .comment-indent-2,
    .comment-indent-3,
    .comment-indent-4,
    .comment-indent-5,
    .comment-indent-6,
    .comment-indent-7,
    .comment-indent-8,
    .comment-indent-9,
    .comment-indent-10,
    .comment-indent-deep {
        padding-left: 10px;
    }

    /* Increasing indentation for mobile with smaller steps */
    .comment-indent-1 { margin-left: 16px; }
    .comment-indent-2 { margin-left: 32px; }
    .comment-indent-3 { margin-left: 48px; }
    .comment-indent-4 { margin-left: 64px; }
    .comment-indent-5 { margin-left: 80px; }
    .comment-indent-6 { margin-left: 96px; }
    .comment-indent-7 { margin-left: 112px; }
    .comment-indent-8 { margin-left: 128px; }
    .comment-indent-9 { margin-left: 144px; }
    .comment-indent-10 { margin-left: 160px; }
    .comment-indent-deep { margin-left: 160px; border-left-style: dotted; }
    
    .comment-head {
        font-size: 10px;
    }
    
    .comment-actions,
    .comment-actions a,
    .comment-actions button,
    .vote-widget-comment-inline,
    .vote-widget-comment-inline .vote-link,
    .vote-widget-comment-inline .vote-score-text,
    .reply-btn {
        font-size: 10px;
    }
    
    .comment-text {
        font-size: 12px;
    }
}