/* ==========================================================================
   COMMENTS
   Used by comments.php (blog posts and pages).
   File: assets/css/comments.css
   ========================================================================== */

.comments-area {
    min-width: 0;
}

.comments-title,
.comment-reply-title {
    margin: 0 0 1.25rem;
    font-size: 1.35rem;
    font-weight: var(--font-weight-bold);
    line-height: 1.35;
}


/* --------------------------------------------------------------------------
   1. COMMENT LIST
   -------------------------------------------------------------------------- */

.comment-list {
    margin: 0 0 2rem;
    padding: 0;
    list-style: none;
}

.comment-list .children {
    margin: 1rem 0 0 1rem;
    padding: 0 0 0 1rem;
    list-style: none;
    border-left: 2px solid var(--color-border);
}

.comment-item {
    margin-bottom: 1rem;
}

.comment-card {
    display: flex;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.comment-avatar-image {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
}

.comment-body {
    flex: 1;
    min-width: 0;
}

.comment-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.25rem 0.75rem;
    margin-bottom: 0.5rem;
}

.comment-author {
    color: var(--color-text);
    font-weight: var(--font-weight-bold);
}

.comment-author a {
    color: inherit;
}

.comment-date {
    color: var(--color-text-muted);
    font-size: var(--font-size-xs);
}

.comment-awaiting {
    margin: 0 0 0.75rem;
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
    font-style: italic;
}

.comment-text {
    font-size: var(--font-size-sm);
    line-height: 1.7;
    overflow-wrap: break-word;
}

.comment-text p {
    margin: 0 0 0.75rem;
}

.comment-text > :last-child {
    margin-bottom: 0;
}

.comment-reply {
    margin-top: 0.75rem;
}

.comment-reply-link {
    color: var(--color-primary);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
}

.comment-reply-link:hover {
    color: var(--color-secondary);
    text-decoration: underline;
}

.comments-closed {
    margin: 0 0 1.5rem;
    color: var(--color-text-muted);
}


/* --------------------------------------------------------------------------
   2. COMMENT NAVIGATION
   -------------------------------------------------------------------------- */

.comments-area .comment-navigation .nav-links,
.comments-area .comments-pagination .nav-links {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 2rem;
    font-size: var(--font-size-sm);
}

.comments-area .comment-navigation a {
    color: var(--color-primary);
    font-weight: var(--font-weight-semibold);
}


/* --------------------------------------------------------------------------
   3. COMMENT FORM
   -------------------------------------------------------------------------- */

.comment-form {
    display: grid;
    gap: 1rem;
}

.comment-form p {
    margin: 0;
}

.comment-notes,
.logged-in-as {
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
}

.comment-form-field label {
    display: inline-block;
    margin-bottom: 0.4rem;
    color: var(--color-text);
    font-weight: var(--font-weight-semibold);
}

.comment-input {
    width: 100%;
    max-width: 100%;
    padding: 0.75rem 0.85rem;
    color: var(--color-text);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font: inherit;
}

.comment-input:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

textarea.comment-input {
    min-height: 140px;
    resize: vertical;
}

.comment-form .submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.75rem;
    padding: 0.65rem 1.25rem;
    color: var(--color-white);
    background: var(--color-primary);
    border: 1px solid var(--color-primary);
    border-radius: var(--radius-md);
    font: inherit;
    font-weight: var(--font-weight-bold);
    cursor: pointer;
    transition:
        background-color var(--transition-fast),
        border-color var(--transition-fast);
}

.comment-form .submit:hover {
    background: var(--color-secondary);
    border-color: var(--color-secondary);
}


/* --------------------------------------------------------------------------
   4. MOBILE / MOTION
   -------------------------------------------------------------------------- */

@media (max-width: 640px) {

    .comment-card {
        padding: 0.9rem;
        gap: 0.75rem;
    }

    .comment-avatar-image {
        width: 44px;
        height: 44px;
    }

    .comment-list .children {
        margin-left: 0.25rem;
        padding-left: 0.75rem;
    }
}

@media (prefers-reduced-motion: reduce) {

    .comment-form .submit {
        transition: none;
    }
}