/*
 * File: comments.css
 * Version: 1.0.0
 * Last Modified: 2026-02-20
 *
 * Comments section styling for TROQC theme.
 */

/* ============================================
   Comments Poster Mat Wrapper
   ============================================ */

.comments,
.comments-area {
    background: #f4efe6;
    max-width: 1300px !important;
    margin: 20px auto !important;
    border: 24px solid #fff;
    padding: 36px;
    position: relative;
}

/* Suppress global sliding underline */
.comments a::after,
.comments-area a::after {
    display: none;
}

/* Paper grain overlay */
.comments::before,
.comments-area::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        repeating-linear-gradient(90deg, rgb(0 0 0 / 2%), rgb(0 0 0 / 2%) 1px, transparent 1px, transparent 6px),
        repeating-linear-gradient(0deg, rgb(0 0 0 / 2%), rgb(0 0 0 / 2%) 1px, transparent 1px, transparent 6px);
    opacity: 0.18;
    pointer-events: none;
}

/* Ensure comment content sits above grain overlay */
.comments > *,
.comments-area > * {
    position: relative;
    z-index: 1;
}

/* ============================================
   Comments Section Wrapper
   ============================================ */

.troqc-comments-area {
    background: #fff;
    padding: 40px 50px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    position: relative;
}

/* ============================================
   Comments Title
   ============================================ */

.troqc-comments-title {
    font-family: 'Caveat', cursive;
    font-size: 32px;
    font-weight: 400;
    color: #2d2d2d;
    margin: 0 0 30px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e8e0d8;
}

/* ============================================
   Comment List
   ============================================ */

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

/* ============================================
   Individual Comment Card
   ============================================ */

.troqc-comment-card {
    display: flex;
    gap: 16px;
    padding: 20px 0;
    border-bottom: 1px solid #f0ebe4;
}

.troqc-comment:last-child > .troqc-comment-card {
    border-bottom: none;
}

/* Avatar */
.troqc-comment-avatar {
    flex-shrink: 0;
}

.troqc-comment-avatar img {
    border-radius: 50%;
    border: 2px solid #f0e6d2;
}

/* Meta */
.troqc-comment-meta {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.troqc-comment-author {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: 15px;
    font-weight: 700;
    color: #2d2d2d;
}

.troqc-comment-author a {
    color: #2d2d2d;
    text-decoration: none;
}

.troqc-comment-author a:hover {
    color: #a08060;
}

.troqc-comment-date {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    color: #999;
    letter-spacing: 0.5px;
}

/* Awaiting moderation */
.troqc-comment-awaiting {
    font-family: 'Caveat', cursive;
    font-size: 16px;
    color: #a08060;
    font-style: italic;
    margin: 0 0 8px;
}

/* Comment body text */
.troqc-comment-content {
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    line-height: 1.7;
    color: #444;
}

.troqc-comment-content p {
    margin: 0 0 12px;
}

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

/* Reply link */
.troqc-comment-actions {
    margin-top: 8px;
}

.troqc-comment-actions .comment-reply-link {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #a08060;
    text-decoration: none;
    transition: color 0.2s ease;
}

.troqc-comment-actions .comment-reply-link:hover {
    color: #8a6a48;
}

/* Nested replies */
.troqc-comment-list .children {
    list-style: none;
    margin: 0;
    padding-left: 40px;
    border-left: 2px solid #f0e6d2;
}

/* ============================================
   No Comments Notice
   ============================================ */

.troqc-no-comments {
    font-family: 'Caveat', cursive;
    font-size: 18px;
    color: #999;
    text-align: center;
    padding: 20px 0;
}

/* ============================================
   Auth Prompt (logged-out visitors)
   ============================================ */

.troqc-comment-auth {
    text-align: center;
    padding: 30px 20px;
    margin-top: 20px;
    border-top: 1px solid #e8e0d8;
}

.troqc-comment-auth-prompt {
    font-family: 'Caveat', cursive;
    font-size: 28px;
    color: #2d2d2d;
    margin: 0 0 10px;
}

.troqc-comment-auth-text {
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    color: #666;
    margin: 0;
    line-height: 1.6;
}

.troqc-comment-auth-text a {
    color: #3F6D7D;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}

.troqc-comment-auth-text a:hover {
    border-bottom-color: #3F6D7D;
}

/* ============================================
   Comment Form
   ============================================ */

.troqc-comment-form {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #e8e0d8;
}

.troqc-comments-area .comment-reply-title {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: 22px;
    font-weight: 700;
    color: #2d2d2d;
    margin: 0 0 20px;
}

.troqc-comments-area .comment-reply-title small {
    font-size: 14px;
    font-weight: 400;
    margin-left: 10px;
}

.troqc-comments-area .comment-reply-title small a {
    color: #a08060;
    text-decoration: none;
}

/* Form fields */
.troqc-comment-form label {
    display: block;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #888;
    margin-bottom: 6px;
}

.troqc-comment-form input[type="text"],
.troqc-comment-form input[type="email"],
.troqc-comment-form input[type="url"],
.troqc-comment-form textarea {
    width: 100%;
    padding: 12px 16px;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    color: #444;
    background: #faf8f5;
    border: 1px solid #e8e0d8;
    border-radius: 6px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.troqc-comment-form input:focus,
.troqc-comment-form textarea:focus {
    outline: none;
    border-color: #a08060;
    box-shadow: 0 0 0 3px rgba(160, 128, 96, 0.1);
}

.troqc-comment-form textarea {
    resize: vertical;
    min-height: 120px;
}

/* Field spacing */
.troqc-comment-form p {
    margin-bottom: 18px;
}

/* Submit button */
.troqc-comment-form .form-submit input[type="submit"] {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #fff;
    background: #3F6D7D;
    border: none;
    padding: 14px 32px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease;
}

.troqc-comment-form .form-submit input[type="submit"]:hover {
    background: #345b68;
    transform: translateY(-1px);
}

/* Logged-in notice */
.troqc-comment-form .logged-in-as {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #888;
}

.troqc-comment-form .logged-in-as a {
    color: #a08060;
    text-decoration: none;
}

/* ============================================
   Comments Navigation
   ============================================ */

.troqc-comments-area .comment-navigation {
    display: flex;
    justify-content: space-between;
    padding: 16px 0;
    margin-bottom: 16px;
    border-top: 1px solid #f0ebe4;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
}

.troqc-comments-area .comment-navigation a {
    color: #a08060;
    text-decoration: none;
}

.troqc-comments-area .comment-navigation a:hover {
    color: #8a6a48;
}

/* ============================================
   Template-Specific Overrides
   ============================================ */

/* Meanwhile template — match article width and padding */
.meanwhile-wrapper .troqc-comments-area {
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
    padding: 40px 100px;
}

/* QC single template */
.qc-single-wrapper .troqc-comments-area {
    margin-top: 40px;
}

/* ============================================
   Nextend Social Login Integration
   ============================================ */

.troqc-comments-area .nsl-container {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0ebe4;
}

/* ============================================
   Responsive — Mobile
   ============================================ */

@media (max-width: 900px) {
    .comments,
.comments-area {
        padding: 22px;
        border-width: 16px;
    }
}

@media (max-width: 768px) {
    .comments,
.comments-area {
        padding: 12px;
        border-width: 12px;
        margin: 10px;
    }

    .troqc-comments-area {
        padding: 30px 20px;
    }

    .troqc-comments-title {
        font-size: 26px;
    }

    .troqc-comment-card {
        flex-direction: column;
        gap: 10px;
    }

    .troqc-comment-list .children {
        padding-left: 20px;
    }

    .meanwhile-wrapper .troqc-comments-area {
        padding: 24px 20px;
    }

    .troqc-comments-area .comment-reply-title {
        font-size: 18px;
    }
}
