/* Article Comments Module Styles */

#article-comments-container {
    max-width: 800px;
    /* same as markdown-body roughly or 100% */
    width: 100%;
    margin: 40px auto 20px auto;
    padding: 0 20px;
    box-sizing: border-box;
    font-family: inherit;
    color: #333;
}

.ac-header {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Authentication Area */
.ac-auth-section {
    background: #fafafa;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    margin-bottom: 30px;
    border: 1px solid #eee;
    color: #666;
}

.ac-auth-section p {
    margin: 0 0 15px 0;
    font-size: 1rem;
}

.ac-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    background-color: #333;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    text-decoration: none;
}

.ac-btn:hover {
    background-color: #555;
}

.ac-btn:active {
    transform: scale(0.98);
}

.ac-btn-outline {
    background-color: transparent;
    color: #666;
    border: 1px solid #ccc;
}

.ac-btn-outline:hover {
    background-color: #f0f0f0;
    color: #333;
}

/* Input Area (Logged In) */
.ac-input-area {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
    background: #fff;
}

.ac-user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ac-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    background-color: #eee;
}

.ac-user-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: #333;
}

.ac-textarea {
    width: 100%;
    min-height: 80px;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.95rem;
    resize: vertical;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.ac-textarea:focus {
    outline: none;
    border-color: #666;
}

.ac-input-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Comments List */
.ac-comments-list {
    display: flex;
    flex-direction: column;
}

.ac-comment-item {
    display: flex;
    gap: 15px;
    padding: 20px 0;
    border-bottom: 1px solid #eee;
}

.ac-comment-item:last-child {
    border-bottom: none;
}

.ac-comment-content {
    flex: 1;
}

.ac-comment-header {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 6px;
}

.ac-comment-author {
    font-weight: 600;
    font-size: 0.95rem;
    color: #333;
}

.ac-comment-time {
    font-size: 0.8rem;
    color: #999;
}

.ac-comment-text {
    font-size: 0.95rem;
    line-height: 1.5;
    color: #444;
    white-space: pre-wrap;
    word-break: break-word;
    margin: 0;
}

/* Empty State / Loading */
.ac-loading,
.ac-empty-state {
    text-align: center;
    padding: 30px;
    color: #999;
    font-size: 0.95rem;
}

/* Admin Delete Button */
.ac-delete-btn {
    background: transparent;
    border: none;
    color: #cc0000;
    font-size: 0.8rem;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: auto;
    opacity: 0.7;
    transition: opacity 0.2s, background-color 0.2s;
}

.ac-delete-btn:hover {
    opacity: 1;
    background-color: #ffeeee;
}

@media (max-width: 600px) {
    #article-comments-container {
        padding: 0 15px;
    }

    .ac-comment-item {
        gap: 10px;
    }

    .ac-avatar {
        width: 30px;
        height: 30px;
    }
}