/**
 * Comments Component Styling (Compact & Optimized)
 */

/* ── Comment form (#respond) ─────────────────────────────────────────────── */
#respond {
    background: #fff;
    border-radius: 2rem;
    padding: 2rem 2rem 1.75rem;
    border: 1px solid #f0f0f0;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.05);
    margin: 2.5rem 0 0;
    box-sizing: border-box;
    direction: rtl;
    font-family: inherit;
}
#respond .comment-reply-title {
    font-size: 1.0625rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 1.75rem;
    padding: 0;
    line-height: 1.3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: none;
}
#respond .comment-reply-title small { font-size: 0.875rem; }
#respond .comment-reply-title small a { font-weight: 500; color: #6b7280; text-decoration: none; transition: color 0.15s; }
#respond .comment-reply-title small a:hover { color: #0A1128; }
#respond .scf__form { display: flex; flex-direction: column; gap: 1.125rem; }
#respond .scf__field { display: flex; flex-direction: column; gap: 0.375rem; }
#respond .scf__label { font-size: 0.8125rem; font-weight: 600; color: #374151; cursor: pointer; }
#respond .scf__req { color: #ef4444; }
#respond .scf__input,
#respond .scf__textarea {
    width: 100%;
    box-sizing: border-box;
    font-family: inherit;
    font-size: 0.875rem;
    color: #111827;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    padding: 0.75rem 1rem;
    outline: none;
    transition: all 0.18s;
}
#respond .scf__input:focus,
#respond .scf__textarea:focus {
    background: #fff;
    border-color: #0A1128;
    box-shadow: 0 0 0 3px rgba(10, 17, 40, 0.08);
}
#respond .scf__textarea { resize: vertical; min-height: 7rem; }
#respond .scf__meta-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
#respond .scf__submit-row { display: flex; justify-content: flex-end; margin-top: 0.25rem; }
#respond .scf__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 2rem;
    font-size: 0.9375rem;
    font-weight: 700;
    font-family: inherit;
    background: #0A1128;
    color: #fff;
    border: none;
    border-radius: 1rem;
    cursor: pointer;
    line-height: 1;
    text-decoration: none;
    transition: all 0.18s;
    box-shadow: 0 2px 10px rgba(10, 17, 40, 0.22);
}
#respond .scf__btn:hover { background: #1a2a50; box-shadow: 0 4px 16px rgba(10, 17, 40, 0.3); color: #fff; }
#respond .scf__btn:active { background: #060c1a; }
#respond .scf__btn:disabled { opacity: 0.5; cursor: default; }

#respond .comment-form > p:not([class*="scf"]),
#respond .logged-in-as,
#respond .comment-notes,
#respond .comment-form-cookies-consent { display: none !important; }

/* ── Existing comments list ──────────────────────────────────────────────── */
.comments-area { direction: rtl; margin-top: 3rem; }
.comments-title { font-size: 1.25rem; font-weight: 700; color: #111827; margin-bottom: 2rem; padding: 0.75rem !important; border-bottom: 2px solid #f3f4f6; }
.comment-navigation { display: none !important; }
.ast-comment-list {
    list-style: none !important;
    margin: 0 0 2rem 0 !important;
    padding: 0 !important;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.ast-comment-list li { list-style: none !important; margin: 0 !important; padding: 0 !important; }
.ast-comment {
    background: #ffffff;
    border: 1px solid #f0f0f0;
    border-radius: 1.25rem;
    padding: 1.5rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.02);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: all 0.2s;
}
.ast-comment:hover { border-color: #e5e7eb; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05); }
.ast-comment-info { display: flex; align-items: center; gap: 1rem; }
.ast-comment-avatar-wrap { flex-shrink: 0; }
.ast-comment-avatar-wrap img { border-radius: 50% !important; border: 2px solid #f3f4f6; display: block; width: 48px; height: 48px; object-fit: cover; }
.ast-comment-data-wrap { flex-grow: 1; display: flex; flex-direction: column; gap: 0.25rem; }
.ast-comment-meta { display: flex !important; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; margin: 0; padding: 0; border: none !important; }
.ast-comment-cite-wrap cite, .ast-comment-cite-wrap cite b.fn { font-style: normal; font-size: 0.95rem; font-weight: 700; color: #111827; }
.ast-comment-time { font-size: 0.8125rem; color: #9ca3af; display: inline-flex; align-items: center; }
.ast-comment-time a { color: #9ca3af !important; text-decoration: none !important; }
.ast-comment-content { font-size: 0.9375rem; line-height: 1.7; color: #374151; }
.ast-comment-content p { margin: 0 0 1rem; }
.ast-comment-content p:last-child { margin: 0; }
.ast-comment-edit-reply-wrap { display: flex; justify-content: flex-end !important; gap: 0.75rem; margin-top: 0.25rem; padding: 0 0.5rem; }

.comment-reply-link,
.comment-edit-link {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 1.15rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #4b5563 !important;
    background: #f3f4f6;
    border-radius: 0.75rem;
    text-decoration: none !important;
    transition: all 0.18s;
}
.comment-reply-link:hover, .comment-edit-link:hover { background: #0A1128; color: #ffffff !important; }
.comment-reply-link:active, .comment-edit-link:active { transform: scale(0.97); }
.ast-comment-list .children {
    list-style: none !important;
    margin: 1.5rem 2.5rem 0 0 !important;
    padding: 0 !important;
    border-right: 2px solid #e5e7eb;
    padding-right: 1.5rem !important;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* ── Load More & Spinner ─────────────────────────────────────────────────── */
.scf-load-more-wrapper { text-align: center; margin: 2.5rem 0 1rem; }
.scf-load-more-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.85rem 2.5rem;
    font-size: 0.9375rem;
    font-weight: 700;
    font-family: inherit;
    background: #0A1128;
    color: #ffffff;
    border: none;
    border-radius: 1rem;
    cursor: pointer;
    line-height: 1;
    transition: all 0.18s;
    box-shadow: 0 4px 12px rgba(10, 17, 40, 0.15);
}
.scf-load-more-btn:hover { background: #1a2a50; box-shadow: 0 6px 18px rgba(10, 17, 40, 0.25); }
.scf-load-more-btn:disabled { opacity: 0.8; cursor: not-allowed; }
.scf-no-more-comments { font-size: 0.875rem; color: #6b7280; margin: 0; }
.btn-spinner { width: 18px; height: 18px; }
.spinner { animation: scf-rotate 2s linear infinite; width: 100%; height: 100%; }
.spinner .path { stroke: #ffffff; stroke-linecap: round; animation: scf-dash 1.5s ease-in-out infinite; }

/* ── Legal notice & Report button ────────────────────────────────────────── */
.scf-comments-legal-notice {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-right: 4px solid #f59e0b;
    border-radius: 0.875rem;
    padding: 0.875rem 1.125rem;
    margin: 1.25rem 0 1.75rem;
    font-size: 0.84rem;
    color: #475569;
    line-height: 1.6;
}
.scf-notice-icon { color: #f59e0b; flex-shrink: 0; margin-top: 3px; }
.scf-notice-text { flex: 1; }
.scf-report-comment-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.85rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: #94a3b8 !important;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    text-decoration: none !important;
    transition: all 0.18s ease;
}
.scf-report-comment-link:hover { color: #dc2626 !important; background: #fef2f2; border-color: #fecaca; }
.scf-report-comment-link svg { flex-shrink: 0; }

@media (max-width: 600px) {
    #respond { padding: 1.5rem 1.25rem 1.25rem; border-radius: 1.5rem; }
    #respond .scf__meta-row { grid-template-columns: 1fr; }
    .ast-comment { padding: 1.25rem; }
    .ast-comment-list .children { margin-right: 1.25rem !important; padding-right: 0.75rem !important; }
}
