/**
 * FEATURE: Comments Section Styles
 * File: viralgrid/assets/css/feature-comments.css
 */

/* Spacing from previous content */
.comments-area {
    margin-top: 60px;
    padding-top: 30px;
    border-top: 1px solid #e2e8f0;
}

/* --- 1. Comment Form --- */
.comment-form-title {
    text-align: center;
    font-size: 1.8rem;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 30px;
}

.comment-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 800px;
    margin: 0 auto;
}

/* Inputs & Textarea */
.form-textarea textarea,
.form-input input {
    width: 100%;
    background: #f1f5f9; /* Light gray background */
    border: 1px solid transparent;
    border-radius: 12px; /* Rounded corners */
    padding: 16px 20px;
    font-size: 1rem;
    color: #334155;
    outline: none;
    box-sizing: border-box;
    transition: all 0.2s ease;
    font-family: inherit;
}

.form-textarea textarea:focus,
.form-input input:focus {
    background: #fff;
    border-color: #cbd5e1;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1); /* Focus ring */
}

/* Checkbox (Save my name...) */
.comment-form-cookies-consent {
    font-size: 0.9rem;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: -10px;
}

/* Submit Button */
.submit-btn {
    background: #1e293b; /* Dark button */
    color: #fff;
    border: none;
    padding: 14px 35px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    align-self: flex-end; /* Right aligned */
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.submit-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* --- 2. Comments List --- */
.comments-list-wrapper {
    margin-top: 60px;
}

.comments-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 30px;
    color: #1e293b;
}

.comment-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.viralgrid-comment-item {
    margin-bottom: 30px;
}

.comment-body {
    display: flex;
    gap: 15px;
}

/* Avatar */
.comment-avatar img {
    border-radius: 50%;
    width: 50px;
    height: 50px;
    background: #e2e8f0;
    flex-shrink: 0;
}

/* Bubble Style Content */
.comment-bubble {
    background: #f1f5f9; /* Light gray bubble */
    border-radius: 16px;
    padding: 20px;
    flex-grow: 1;
    position: relative;
}

.comment-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.comment-author b {
    font-size: 1rem;
    color: #1e293b;
    font-weight: 700;
}

.comment-metadata time {
    font-size: 0.85rem;
    color: #94a3b8;
}

.comment-content p {
    margin: 0 0 15px 0;
    font-size: 1rem;
    color: #475569;
    line-height: 1.6;
}

/* Reply Link */
.reply a {
    font-size: 0.9rem;
    font-weight: 600;
    color: #6366f1;
    text-decoration: none;
    display: inline-block;
}
.reply a:hover {
    text-decoration: underline;
}

/* --- Dark Mode Support --- */
body.dark-mode .comments-area { border-color: #334155; }
body.dark-mode .comment-form-title, 
body.dark-mode .comments-title,
body.dark-mode .comment-author b { color: #f8fafc; }

body.dark-mode .form-textarea textarea,
body.dark-mode .form-input input {
    background: #1e293b; /* Dark input bg */
    color: #f8fafc;
    border-color: #334155;
}
body.dark-mode .form-textarea textarea:focus,
body.dark-mode .form-input input:focus {
    border-color: #6366f1;
}

body.dark-mode .comment-bubble {
    background: #1e293b;
    border: 1px solid #334155;
}

body.dark-mode .comment-content p { color: #cbd5e1; }

body.dark-mode .submit-btn {
    background: #4f46e5; /* Brighter purple for visibility */
    color: #fff;
}

/* =========================================
   MOBILE RESPONSIVENESS
   ========================================= */
@media (max-width: 600px) {
    .comments-area {
        /* ADDED: Side margins to prevent edge touching */
        margin-left: 20px;
        margin-right: 20px;
    }

    .comment-form-title {
        font-size: 1.5rem; /* Slightly smaller title on mobile */
    }

    /* Adjust avatar size slightly if needed, but 50px is usually fine */
    .comment-avatar img {
        width: 40px;
        height: 40px;
    }
    
    .comment-bubble {
        padding: 15px;
    }
}