/* ======================================
   بخش کامنت‌ها - طراحی مدرن و شیک
   ====================================== */

/* استایل کلی بخش کامنت‌ها */
.comments-area {
    position: relative;
}

.comments-container {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid #e9ecef;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.comments-container:hover {
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.12);
}

.comments-container::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.05) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.comments-container::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(118, 75, 162, 0.03) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* عنوان کامنت‌ها */
.comments-title {
    position: relative;
    z-index: 1;
    color: #1f2937;
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.comments-title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 24px;
    background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

/* لیست کامنت‌ها */
.comment-list {
    list-style: none;
    padding: 0;
    position: relative;
    z-index: 1;
}

.comment-list > li {
    margin-bottom: 0;
}

/* استایل کارت کامنت */
.comment-list .card {
    background: #ffffff;
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    margin-bottom: 1.25rem;
    position: relative;
    overflow: hidden;
}

.comment-list .card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 0.3s ease;
}

.comment-list .card:hover {
    border-color: #e9ecef;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

.comment-list .card:hover::before {
    transform: scaleY(1);
}

.comment-list .card-body {
    padding: 1.5rem;
}

/* استایل آواتار */
.symbol {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 50%;
    background-color: #f3f4f6;
    overflow: hidden;
}

.symbol.symbol-circle {
    border-radius: 50%;
}

.symbol.symbol-50px {
    width: 50px;
    height: 50px;
}

.symbol-label {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 1.25rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    border-radius: 50%;
}

.symbol-label i {
    font-size: 1.5rem;
    font-weight: 400;
}

.symbol img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* معلومات کامنت */
.comment-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.comment-author-name {
    font-weight: 700;
    color: #1f2937;
    font-size: 1rem;
    transition: color 0.3s ease;
}

.comment-author-name:hover {
    color: #667eea;
}

.comment-time {
    color: #9ca3af;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.comment-time::before {
    content: '•';
    margin-right: 0.25rem;
}

/* تصویب منتظر */
.comment-awaiting-moderation {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    background-color: #fef3c7;
    border: 1px solid #fcd34d;
    border-radius: 8px;
    color: #92400e;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
}

/* محتوای کامنت */
.comment-content {
    color: #4b5563;
    line-height: 1.6;
    word-break: break-word;
    margin: 1rem 0;
    font-size: 0.95rem;
}

.comment-content p {
    margin-bottom: 0.75rem;
}

.comment-content p:last-child {
    margin-bottom: 0;
}

/* دکمه‌های عملیات */
.comment-reply {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.comment-reply .btn {
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.comment-reply .btn-light-primary {
    background-color: #ede9fe;
    color: #667eea;
    border-color: #e9d5ff;
}

.comment-reply .btn-light-primary:hover {
    background-color: #ddd6fe;
    color: #5568d3;
    border-color: #c4b5fd;
}

.comment-reply .btn-light {
    background-color: #f3f4f6;
    color: #374151;
    border-color: #e5e7eb;
}

.comment-reply .btn-light:hover {
    background-color: #e5e7eb;
    color: #111827;
    border-color: #d1d5db;
}

/* کامنت‌های تو در تو */
.comment-list .children {
    list-style: none;
    padding: 1.5rem 0 0 0;
    margin: 0;
    border-right: 2px solid #e9ecef;
    padding-right: 1.5rem;
    margin-right: 1.5rem;
}

.comment-list .children .card {
    margin-bottom: 1.25rem;
}

/* صفحه‌بندی کامنت‌ها */
.comments-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    margin-top: 2rem;
    position: relative;
    z-index: 1;
}

.page-numbers {
    display: inline-flex;
    list-style: none;
    padding: 0;
    gap: 0.5rem;
    margin: 0;
}

.page-numbers li {
    margin: 0;
}

.page-numbers a,
.page-numbers span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 0.5rem;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
    background-color: #ffffff;
    color: #374151;
}

.page-numbers a:hover {
    border-color: #667eea;
    background-color: #f3f4f6;
    color: #667eea;
}

.page-numbers .current {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    border-color: #667eea;
}

.page-numbers .prev,
.page-numbers .next {
    min-width: auto;
    padding: 0 0.75rem;
}

/* فرم نوشتن کامنت */
.comment-form {
    position: relative;
    z-index: 1;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e9ecef;
}

.comment-form-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.comment-form-title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 20px;
    background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: #1f2937;
    font-weight: 600;
    font-size: 0.95rem;
}

.form-label .text-danger {
    color: #ef4444;
    margin-right: 0.25rem;
}

.form-control {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #374151;
    background-color: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-family: 'Vazirmatn', 'Tahoma', 'Arial', sans-serif;
}

.form-control:focus {
    border-color: #667eea;
    background-color: #f8f9ff;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    outline: none;
}

.form-control-solid {
    background-color: #f3f4f6;
    border-color: #e5e7eb;
}

.form-control-solid:focus {
    background-color: #ffffff;
    border-color: #667eea;
}

textarea.form-control {
    resize: vertical;
    min-height: 150px;
}

/* کپچا */
.captcha-question {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    border: 2px solid #d1d5db;
    font-size: 2.25rem;
    font-weight: 700;
    color: #1f2937;
    text-align: center;
    min-width: 180px;
    padding: 1rem;
    border-radius: 8px;
    letter-spacing: 0.05em;
}

.captcha-answer-input {
    max-width: 120px;
}

.form-text {
    display: block;
    margin-top: 0.375rem;
    font-size: 0.875rem;
    color: #6b7280;
}

/* دکمه ارسال */
.comment-form-submit {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.comment-form-submit .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: #ffffff;
    font-weight: 600;
    padding: 0.75rem 1.75rem;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.comment-form-submit .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.comment-form-submit .btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* پیام عدم کامنت */
.no-comments {
    text-align: center;
    padding: 2rem 1rem;
    color: #6b7280;
    font-size: 1rem;
}

/* استایل والدین کامنت */
li.parent {
    margin-bottom: 1.5rem;
}

/* پاسخ‌های کامنت */
.comment-list .children li:last-child {
    margin-bottom: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .comments-container {
        padding: 1.25rem;
    }

    .comments-title {
        font-size: 1.5rem;
    }

    .comment-list .card-body {
        padding: 1rem;
    }

    .d-flex {
        flex-direction: column;
    }

    .me-4 {
        margin-right: 0;
        margin-bottom: 1rem;
    }

    .row {
        flex-direction: column;
    }

    .col-md-6 {
        width: 100%;
        margin-bottom: 1rem;
    }

    .comment-list .children {
        padding-right: 0;
        margin-right: 0;
        border-right: none;
        border-top: 2px solid #e9ecef;
        padding-top: 1.5rem;
        margin-top: 1.5rem;
    }

    .captcha-question {
        font-size: 1.75rem;
        min-width: 150px;
        padding: 0.75rem;
    }

    .comment-author-name {
        font-size: 2rem !important;
        font-weight: 700 !important;
    }

    .comment-time {
        font-size: 1.2rem !important;
    }

    .comment-meta {
        gap: 1rem !important;
    }
}

/* Dark Mode Support (اختیاری) */
@media (prefers-color-scheme: dark) {
    .comments-container {
        background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
        border-color: #374151;
    }

    .comment-list .card {
        background: #2d3748;
        border-color: #4b5563;
    }

    .comment-list .card:hover {
        border-color: #667eea;
        box-shadow: 0 8px 24px rgba(102, 126, 234, 0.2);
    }

    .comments-title,
    .comment-author-name,
    .form-label {
        color: #f3f4f6;
    }

    .comment-content {
        color: #d1d5db;
    }

    .form-control {
        background-color: #1f2937;
        border-color: #4b5563;
        color: #f3f4f6;
    }

    .form-control:focus {
        background-color: #111827;
        border-color: #667eea;
    }

    .form-control-solid {
        background-color: #1f2937;
        border-color: #374151;
    }

    .form-control-solid:focus {
        background-color: #2d3748;
        border-color: #667eea;
    }
}
