/* ============================================================
   فونت (Vazir برای فارسی + Inter برای اعداد)
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

@font-face {
    font-family: 'Vazir';
    src: url('https://cdn.jsdelivr.net/gh/rastikerdar/vazir-font@v30.0.0/dist/Vazir-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
}
@font-face {
    font-family: 'Vazir';
    src: url('https://cdn.jsdelivr.net/gh/rastikerdar/vazir-font@v30.0.0/dist/Vazir-Medium.woff2') format('woff2');
    font-weight: 500;
}
@font-face {
    font-family: 'Vazir';
    src: url('https://cdn.jsdelivr.net/gh/rastikerdar/vazir-font@v30.0.0/dist/Vazir-Bold.woff2') format('woff2');
    font-weight: 700;
}

/* ============================================================
   ریشه و متغیرها
   ============================================================ */
:root {
    --vcp-primary: #3B82F6;
    --vcp-primary-hover: #2563EB;
    --vcp-secondary: #1E293B;
    --vcp-bg: #F8FAFC;
    --vcp-card: #FFFFFF;
    --vcp-text: #0F172A;
    --vcp-text-light: #64748B;
    --vcp-border: #E2E8F0;
    --vcp-radius: 12px;
    --vcp-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 2px 8px rgba(0, 0, 0, 0.02);
    --vcp-shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.02);
}

/* ============================================================
   کانتینر اصلی
   ============================================================ */
.vcp-comments-wrapper {
    max-width: 780px;
    margin: 2rem auto;
    padding: 0;
    font-family: 'Vazir', 'Inter', -apple-system, sans-serif;
    color: var(--vcp-text);
    background: transparent;
}

/* ============================================================
   عنوان بخش
   ============================================================ */
.vcp-section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--vcp-secondary);
    margin: 0 0 1.5rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--vcp-border);
}

/* ============================================================
   لیست کامنت‌ها
   ============================================================ */
.vcp-comment-list .comment-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

/* ============================================================
   هر آیتم کامنت
   ============================================================ */
.vcp-comment-item {
    list-style: none;
    margin: 0 0 1.2rem 0;
}

.vcp-comment-card {
    background: var(--vcp-card);
    border-radius: var(--vcp-radius);
    padding: 0.8rem 1rem;
    box-shadow: var(--vcp-shadow);
    border: 1px solid var(--vcp-border);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.vcp-comment-card:hover {
    box-shadow: var(--vcp-shadow-hover);
    transform: translateY(-1px);
}

/* ============================================================
   هدر کامنت (نام + تاریخ + آواتار)
   ============================================================ */
.vcp-comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.6rem;
}

.vcp-comment-author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.vcp-comment-author img {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--vcp-border);
}

.vcp-author-meta {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.vcp-author-name,
.vcp-author-name a {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--vcp-secondary);
    text-decoration: none;
}

.vcp-author-name a:hover {
    color: var(--vcp-primary);
}

.vcp-comment-date {
    font-size: 0.75rem;
    color: var(--vcp-text-light);
}

/* ============================================================
   دکمه‌ی پاسخ
   ============================================================ */
.vcp-comment-actions .reply {
    display: inline-flex;
}

.vcp-comment-actions .comment-reply-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: transparent;
    color: var(--vcp-text-light);
    padding: 0.2rem 0.8rem;
    border-radius: 999px;
    font-weight: 500;
    font-size: 0.75rem;
    border: 1px solid var(--vcp-border);
    transition: all 0.2s ease;
    text-decoration: none !important;
}

.vcp-comment-actions .comment-reply-link:hover {
    background: var(--vcp-primary);
    color: #fff;
    border-color: var(--vcp-primary);
}

/* ============================================================
   محتوای کامنت
   ============================================================ */
.vcp-comment-content {
    line-height: 1.8;
    font-size: 0.95rem;
    color: var(--vcp-text);
    margin: 0.4rem 0 0.6rem;
}

.vcp-comment-content p {
    margin: 0 0 0.5rem;
}
.vcp-comment-content p:last-child {
    margin-bottom: 0;
}

.vcp-comment-content a {
    color: var(--vcp-primary);
    text-decoration: none;
}

.vcp-comment-content a:hover {
    text-decoration: underline;
}

.vcp-comment-content em {
    display: inline-block;
    background: #F1F5F9;
    color: var(--vcp-text-light);
    padding: 0.1rem 0.7rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 500;
    font-style: normal;
    margin-bottom: 0.3rem;
}

/* ============================================================
   فوتر کامنت (لایک)
   ============================================================ */
.vcp-comment-footer {
    margin-top: 0.6rem;
    padding-top: 0.6rem;
    border-top: 1px solid var(--vcp-border);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.vcp-like-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: transparent;
    color: var(--vcp-text-light);
    border: none;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.8rem;
    transition: all 0.2s ease;
}

.vcp-like-btn:hover {
    background: #F1F5F9;
    color: var(--vcp-primary);
}

.vcp-like-btn .count {
    min-width: 16px;
    text-align: center;
}

.vcp-like-btn .vcp-like-icon {
    font-size: 0.9rem;
    line-height: 1;
}

.vcp-liked {
    color: var(--vcp-primary) !important;
}

/* ============================================================
   پاسخ‌ها (فرزندان)
   ============================================================ */
.vcp-comments-wrapper .children {
    margin-top: 0.8rem;
    padding-inline-start: 1.8rem;
    border-right: 2px solid var(--vcp-border);
}

.vcp-comments-wrapper .children .vcp-comment-card {
    background: #FAFBFC;
}

/* ============================================================
   فرم ارسال کامنت
   ============================================================ */
.vcp-comments-wrapper .comment-respond,
.vcp-comments-wrapper #respond {
    margin-top: 2rem;
    padding: 1rem 1.2rem 1.2rem;
    background: var(--vcp-card);
    border-radius: var(--vcp-radius);
    border: 1px solid var(--vcp-border);
    box-shadow: var(--vcp-shadow);
}

.comment-reply-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--vcp-secondary);
    margin: 0 0 0.4rem 0;
}

.comment-reply-title small {
    font-size: 0.75rem;
    font-weight: 400;
}

.comment-reply-title small a {
    color: var(--vcp-text-light);
    text-decoration: none;
}

.comment-reply-title small a:hover {
    color: var(--vcp-primary);
}

.comment-notes,
.logged-in-as {
    font-size: 0.85rem;
    color: var(--vcp-text-light);
    margin-bottom: 1rem;
}

/* فیلدهای فرم */
.comment-form {
    display: grid;
    gap: 0.8rem;
}

.comment-form p {
    margin: 0;
}

.comment-form label {
    display: block;
    margin-bottom: 0.2rem;
    font-weight: 500;
    font-size: 0.85rem;
    color: var(--vcp-secondary);
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1.5px solid var(--vcp-border);
    border-radius: var(--vcp-radius);
    background: #FAFBFC;
    color: var(--vcp-text);
    padding: 0.6rem 0.9rem;
    font-family: inherit;
    font-size: 0.9rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.comment-form input[type="text"]:focus,
.comment-form input[type="email"]:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--vcp-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.08);
    background: #FFFFFF;
}

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

.comment-form .comment-form-cookies-consent {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.comment-form .comment-form-cookies-consent input {
    width: auto;
    accent-color: var(--vcp-primary);
}

.comment-form .form-submit {
    margin-top: 0.3rem;
}

.comment-form .submit,
#respond input[type="submit"],
#respond button[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    background: var(--vcp-primary);
    color: #fff !important;
    border: none !important;
    border-radius: 999px;
    padding: 0.6rem 1.8rem;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
    text-decoration: none !important;
}

.comment-form .submit:hover,
#respond input[type="submit"]:hover,
#respond button[type="submit"]:hover {
    background: var(--vcp-primary-hover);
    transform: translateY(-1px);
}

.comment-form .submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* ============================================================
   پیام‌های سیستم
   ============================================================ */
.vcp-message {
    padding: 0.6rem 1rem;
    border-radius: var(--vcp-radius);
    margin-bottom: 0.8rem;
    font-weight: 500;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: vcp-fade-in 0.25s ease;
}

.vcp-message-success {
    background: #F0FDF4;
    color: #15803D;
    border-right: 3px solid #22C55E;
}

.vcp-message-error {
    background: #FEF2F2;
    color: #B91C1C;
    border-right: 3px solid #EF4444;
}

.vcp-message-info {
    background: #EFF6FF;
    color: #1D4ED8;
    border-right: 3px solid #3B82F6;
}

/* اسپینر */
.vcp-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2.5px solid rgba(59, 130, 246, 0.15);
    border-top: 2.5px solid var(--vcp-primary);
    border-radius: 50%;
    animation: vcp-spin 0.6s linear infinite;
    margin: 0.2rem 0;
}

@keyframes vcp-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* انیمیشن ورود کامنت جدید */
.vcp-comment-new {
    animation: vcp-slide-in 0.4s ease;
}

@keyframes vcp-slide-in {
    0% { opacity: 0; transform: translateY(12px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes vcp-fade-in {
    0% { opacity: 0; transform: translateY(-6px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   واکنش‌گرایی
   ============================================================ */
@media (max-width: 768px) {
    .vcp-comments-wrapper {
        margin: 1.2rem 0.8rem;
    }

    .vcp-comment-card {
        padding: 0.6rem 0.8rem;
    }

    .vcp-comment-header {
        flex-wrap: wrap;
        align-items: flex-start;
    }

    .vcp-comment-author img {
        width: 36px;
        height: 36px;
    }

    .vcp-comments-wrapper .children {
        padding-inline-start: 1rem;
    }

    .vcp-comments-wrapper .comment-respond,
    .vcp-comments-wrapper #respond {
        padding: 1.2rem;
    }

    .comment-form .submit,
    #respond input[type="submit"] {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .vcp-comment-card {
        padding: 0.5rem 0.6rem;
    }

    .vcp-comment-author img {
        width: 30px;
        height: 30px;
    }

    .vcp-author-name {
        font-size: 0.85rem;
    }

    .vcp-comment-content {
        font-size: 0.88rem;
    }
}






/* اضافه کردن به انتهای فایل CSS */

/* ============================================================
   پیام لاگین برای لایک
   ============================================================ */
.vcp-login-notice {
    padding: 0.6rem 1rem;
    border-radius: var(--vcp-radius);
    margin: 0.6rem 0 0.3rem;
    background: #FEF3C7;
    color: #92400E;
    border-right: 3px solid #F59E0B;
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: vcp-fade-in 0.3s ease;
}

.vcp-login-notice a {
    color: var(--vcp-primary);
    font-weight: 600;
    text-decoration: none;
}

.vcp-login-notice a:hover {
    text-decoration: underline;
}

/* ============================================================
   کامنت‌های تو در تو (تورفتگی)
   ============================================================ */

/* تورفتگی اصلی برای فرزندان سطح اول */
.vcp-comments-wrapper .children,
.vcp-comments-wrapper ol.children,
.vcp-comments-wrapper .vcp-children {
    margin-top: 0.8rem !important;
    padding-inline-start: 2rem !important;
    border-right: 2px solid var(--vcp-border) !important;
    list-style: none !important;
}

/* فرزندان سطح دوم و عمیق‌تر – تورفتگی بیشتر */
.vcp-comments-wrapper .children .children,
.vcp-comments-wrapper .vcp-children .vcp-children {
    padding-inline-start: 2.5rem !important;
    border-right-color: rgba(59, 130, 246, 0.15) !important;
}

.vcp-comments-wrapper .children .children .children {
    padding-inline-start: 3rem !important;
    border-right-color: rgba(59, 130, 246, 0.08) !important;
}

/* کارت‌های داخل فرزندان با پس‌زمینه‌ی متفاوت */
.vcp-comments-wrapper .children .vcp-comment-card {
    background: #FAFBFC !important;
    border-color: #E8ECF0 !important;
}

.vcp-comments-wrapper .children .children .vcp-comment-card {
    background: #F6F8FA !important;
}

.vcp-comments-wrapper .children .children .children .vcp-comment-card {
    background: #F1F4F8 !important;
}

/* ============================================================
   تاریخ زیر عکس (در هدر)
   ============================================================ */
.vcp-comment-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.8rem;
}

.vcp-comment-author {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.vcp-comment-author img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--vcp-border);
    flex-shrink: 0;
}

.vcp-author-meta {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.vcp-author-name,
.vcp-author-name a {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--vcp-secondary);
    text-decoration: none;
}

.vcp-author-name a:hover {
    color: var(--vcp-primary);
}

.vcp-comment-date {
    font-size: 0.75rem;
    color: var(--vcp-text-light);
}

/* ============================================================
   متن در سمت چپ (در RTL)
   ============================================================ */
.vcp-comment-body {
    background: #F1F5F9;
    border-radius: var(--vcp-radius);
    padding: 0.4rem 0.6rem;
    margin: 0.4rem 0 0.6rem;
}

.vcp-comment-content {
    line-height: 1.8;
    font-size: 0.95rem;
    color: var(--vcp-text);
}