/* Modern Professional Comments System */

.comments_block {
    background: #1a1a1a;
    border-radius: 12px;
    padding: 24px;
    margin-top: 32px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    border: 1px solid #2a2a2a;
}

/* Header Section */
.c_headbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #ff6b35;
}

.c_title {
    font-size: 24px;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.c_title::before {
    content: "💬";
    font-size: 20px;
}

.c_sort {
    background: #2a2a2a;
    border: 1px solid #3a3a3a;
    border-radius: 8px;
    color: #ffffff;
    padding: 8px 12px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.c_sort:hover {
    border-color: #ff6b35;
    background: #333333;
}

.c_sort:focus {
    outline: none;
    border-color: #ff6b35;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.2);
}

/* Comment List */
.c_list {
    margin-bottom: 24px;
}

/* Individual Comment Items */
.c_item {
    background: #202020;
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    margin-bottom: 16px;
    padding: 20px;
    transition: all 0.3s ease;
    position: relative;
}

.c_item:hover {
    border-color: #3a3a3a;
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.4);
}

/* Threading Depth Styling */
.c_item.depth-2 {
    margin-left: 40px;
    border-left: 3px solid #ff6b35;
    background: #1e1e1e;
}

.c_item.depth-3 {
    margin-left: 60px;
    border-left: 3px solid #ff9f08;
    background: #1c1c1c;
}

.c_item.depth-4 {
    margin-left: 80px;
    border-left: 3px solid #4CAF50;
    background: #1a1a1a;
}

/* Comment Header */
.c_head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.c_avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff6b35, #ff9f08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 600;
    font-size: 16px;
    text-transform: uppercase;
    flex-shrink: 0;
}

.c_user {
    font-weight: 600;
    color: #ff6b35;
    font-size: 16px;
    text-decoration: none;
    transition: color 0.3s ease;
}

.c_user:hover {
    color: #ff9f08;
}

.c_time {
    color: #888888;
    font-size: 14px;
    margin-left: auto;
}

.c_badge {
    background: #ff6b35;
    color: #ffffff;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

/* Comment Body */
.c_body {
    color: #e0e0e0;
    line-height: 1.6;
    margin-bottom: 16px;
    font-size: 15px;
}

.c_body p {
    margin: 0 0 12px 0;
}

.c_body a {
    color: #ff6b35;
    text-decoration: none;
    transition: color 0.3s ease;
}

.c_body a:hover {
    color: #ff9f08;
    text-decoration: underline;
}

/* Comment Actions */
.c_actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #2a2a2a;
}

.c_reply_btn, .c_view_replies {
    background: transparent;
    border: 1px solid #3a3a3a;
    color: #cccccc;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.c_reply_btn:hover, .c_view_replies:hover {
    border-color: #ff6b35;
    color: #ff6b35;
    background: rgba(255, 107, 53, 0.1);
}

.c_reply_btn::before {
    content: "↩️";
}

.c_view_replies::before {
    content: "💬";
}

/* Owner delete button */
.c_delete_btn {
    background: transparent;
    border: 1px solid #3a3a3a;
    color: #f0b3b3;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
}
.c_delete_btn:hover {
    border-color: #f04747;
    color: #fff;
    background: rgba(240, 71, 71, 0.15);
}

/* Vote/Like System (Ready for implementation) */
.c_votes {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.c_vote_btn {
    background: transparent;
    border: none;
    color: #666666;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-size: 16px;
}

.c_vote_btn:hover {
    color: #ff6b35;
    background: rgba(255, 107, 53, 0.1);
}

.c_vote_btn.active {
    color: #ff6b35;
}

/* Pressed state via aria-pressed for accessibility */
.c_vote_btn[aria-pressed="true"][data-type="up"] {
    color: #24d05a;
    background: rgba(36, 208, 90, 0.12);
}
.c_vote_btn[aria-pressed="true"][data-type="down"] {
    color: #f04747;
    background: rgba(240, 71, 71, 0.12);
}

.c_vote_count {
    color: #cccccc;
    font-weight: 500;
    font-size: 14px;
}

/* Reply Box */
.c_reply_box {
    margin-top: 16px;
    padding: 16px;
    background: #1a1a1a;
    border-radius: 8px;
    border: 1px solid #2a2a2a;
}

.c_form_reply {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.c_form_reply textarea {
    background: #252525;
    border: 1px solid #3a3a3a;
    border-radius: 8px;
    color: #ffffff;
    padding: 12px;
    font-size: 14px;
    resize: vertical;
    min-height: 80px;
    transition: border-color 0.3s ease;
}

.c_form_reply textarea:focus {
    outline: none;
    border-color: #ff6b35;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.2);
}

.c_form_reply textarea::placeholder {
    color: #888888;
}

.c_form_reply button {
    align-self: flex-end;
    background: linear-gradient(135deg, #ff6b35, #ff9f08);
    border: none;
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.c_form_reply button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4);
}

/* Main Comment Form */
.c_form {
    background: #202020;
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    padding: 20px;
    margin-top: 24px;
}

.c_form textarea {
    width: 100%;
    background: #2a2a2a;
    border: 1px solid #3a3a3a;
    border-radius: 8px;
    color: #ffffff;
    padding: 16px;
    font-size: 15px;
    resize: vertical;
    min-height: 120px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.c_form textarea:focus {
    outline: none;
    border-color: #ff6b35;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.2);
    background: #252525;
}

.c_form textarea::placeholder {
    color: #888888;
}

.c_form_actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
}

.c_form button[type="submit"] {
    background: linear-gradient(135deg, #ff6b35, #ff9f08);
    border: none;
    color: #ffffff;
    padding: 12px 32px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: auto;
}

.c_form button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
}

.c_form button[type="submit"]:active {
    transform: translateY(0);
}

/* Load More Button */
.c_more {
    display: block;
    width: 100%;
    background: #2a2a2a;
    border: 1px solid #3a3a3a;
    color: #cccccc;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 16px;
}

.c_more:hover {
    background: #333333;
    border-color: #ff6b35;
    color: #ff6b35;
}

/* Login Hint */
.c_login_hint {
    text-align: center;
    padding: 24px;
    color: #888888;
    font-size: 16px;
    border: 2px dashed #3a3a3a;
    border-radius: 8px;
    margin-top: 24px;
}

/* Replies Container */
.c_replies {
    margin-top: 12px;
}

.c_replies.hidden {
    display: none;
}

/* Loading States */
.c_loading {
    text-align: center;
    padding: 20px;
    color: #888888;
}

.c_loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #333;
    border-radius: 50%;
    border-top-color: #ff6b35;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .comments_block {
        margin: 16px;
        padding: 16px;
        border-radius: 8px;
    }
    
    .c_headbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .c_item.depth-2 {
        margin-left: 20px;
    }
    
    .c_item.depth-3 {
        margin-left: 30px;
    }
    
    .c_item.depth-4 {
        margin-left: 40px;
    }
    
    .c_head {
        flex-wrap: wrap;
    }
    
    .c_actions {
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .c_votes {
        margin-left: 0;
    }
}

/* Dark theme enhancements */
@media (prefers-color-scheme: dark) {
    .comments_block {
        background: #0d0d0d;
    }
    
    .c_item {
        background: #121212;
    }
    
    .c_item:hover {
        background: #1a1a1a;
    }
}

/* Animation for new comments */
.c_item.new-comment {
    animation: slideInComment 0.5s ease-out;
}

@keyframes slideInComment {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Status indicators */
.c_status_queued {
    opacity: 0.6;
    position: relative;
}

.c_status_queued::after {
    content: "⏳ Pending approval";
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ff9f08;
    color: #000;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}
