/* ==========================================================================
   Victor Trader — بخش دیدگاه‌ها در صفحه دوره
   دقیقاً بر اساس طرح بوم. کلاس‌ها با پیشوند vt- تا با قالب تداخل نکنند.
   ========================================================================== */

.vt-reviews {
    --vt-green: #00b894;
    --vt-green-dark: #027a62;
    --vt-mint: #eff9f1;
    --vt-mint-soft: #f7fbf9;
    --vt-ink: #162320;
    --vt-body: #4a5a56;
    --vt-muted: #5a6b66;
    --vt-faint: #6b7b77;
    --vt-line: #dceae3;
    --vt-line-soft: #edf3f0;
    --vt-gold: #e8b339;
    --vt-on-green: #ffffff;
    --vt-glow: rgba(0, 184, 148, 0.16);
    --vt-gold: #e8b339;
    --vt-gold-bg: #fff8e8;
    --vt-gold-line: #f2e0b5;
    --vt-gold-text: #8a6a1c;
    --vt-up: #16a34a;
    --vt-up-glow: rgba(22, 163, 74, 0.18);
    --vt-down: #e5484d;
    --vt-down-text: #a03a3d;
    --vt-down-bg: #fdf3f3;
    --vt-down-line: #f4d9d9;
    --vt-ink-soft: #23372f;
    --vt-ink-faint: #8fa79f;
    --vt-text: #212529;
    direction: rtl;
    color: var(--vt-text);
}

.vt-reviews *,
.vt-reviews *::before,
.vt-reviews *::after { box-sizing: border-box; }

/* ==========================================================================
   دیدگاه‌ها
   ========================================================================== */

.vt-reviews { margin: 32px 0 8px; }

.vt-reviews__title {
    margin: 0 0 24px;
    font-size: 30px;
    font-weight: 800;
    line-height: 1.5;
    color: var(--vt-ink);
}

.vt-reviews__layout {
    display: flex;
    gap: 32px;
    align-items: flex-start;
}

/* --- کارت خلاصه امتیاز (ستون راست) --- */
.vt-reviews__summary {
    width: 260px;
    flex: 0 0 260px;
    background: var(--vt-mint-soft);
    border-radius: 18px;
    padding: 26px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-items: center;
    position: sticky;
    top: 24px;
}

.vt-reviews__avg {
    font-size: 48px;
    font-weight: 800;
    line-height: 1;
    color: var(--vt-ink);
}

.vt-reviews__count {
    font-size: 13.5px;
    color: var(--vt-muted);
    text-align: center;
}

.vt-stars {
    display: flex;
    gap: 3px;
    color: var(--vt-gold);
    line-height: 0;
}
.vt-stars svg { fill: currentColor; display: block; }
.vt-stars .is-empty { color: var(--vt-line); }

.vt-bars {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 6px;
}
.vt-bars__row {
    display: flex;
    align-items: center;
    gap: 9px;
}
.vt-bars__label {
    font-size: 12px;
    color: var(--vt-faint);
    width: 26px;
    flex: 0 0 26px;
}
.vt-bars__track {
    flex: 1 1 auto;
    height: 7px;
    background: #e3ebe8;
    border-radius: 4px;
    overflow: hidden;
}
.vt-bars__fill {
    display: block;
    height: 7px;
    background: var(--vt-green);
    border-radius: 4px;
}
.vt-bars__pct {
    font-size: 12px;
    color: var(--vt-faint);
    width: 34px;
    flex: 0 0 34px;
    text-align: left;
}

/* --- ستون نظرات --- */
.vt-reviews__list {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.vt-review {
    margin: 0;
    background: var(--vt-surface, #fff);
    border: 1px solid var(--vt-line);
    border-radius: 16px;
    padding: 22px 24px;
    list-style: none;
}
.vt-review__head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}
.vt-review__avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    flex: 0 0 38px;
    background: #e2f5ee;
    color: var(--vt-green-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 800;
    overflow: hidden;
}
.vt-review__avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.vt-review__name {
    font-size: 14.5px;
    font-weight: 700;
    color: var(--vt-ink);
}
.vt-review__verified {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    background: var(--vt-mint);
    color: var(--vt-green-dark);
    border-radius: 7px;
    font-size: 11.5px;
    font-weight: 700;
}
.vt-review__spacer { flex: 1 1 auto; }
.vt-review__date {
    font-size: 12.5px;
    color: #97a5a1;
    white-space: nowrap;
}
.vt-review__stars { margin-bottom: 10px; }
.vt-review__text {
    font-size: 15px;
    line-height: 2.1;
    color: var(--vt-text);
}
.vt-review__text p { margin: 0 0 10px; }
.vt-review__text p:last-child { margin-bottom: 0; }

.vt-review__replies {
    margin: 16px 0 0;
    padding: 16px 20px 0 0;
    border-top: 1px solid var(--vt-line-soft);
    list-style: none;
}
.vt-review__replies .vt-review {
    border: 0;
    border-right: 3px solid var(--vt-mint);
    border-radius: 0;
    padding: 0 16px 0 0;
    margin-bottom: 14px;
}
.vt-review__replies .vt-review:last-child { margin-bottom: 0; }

.vt-reviews__empty {
    padding: 36px;
    text-align: center;
    color: var(--vt-faint);
    border: 1px dashed var(--vt-line);
    border-radius: 16px;
    font-size: 14.5px;
}

.vt-reviews__pagination { margin-top: 20px; }
.vt-reviews__pagination ul { display: flex; gap: 8px; list-style: none; margin: 0; padding: 0; }
.vt-reviews__pagination a,
.vt-reviews__pagination span {
    min-width: 42px;
    height: 42px;
    padding: 0 12px;
    border-radius: 11px;
    border: 1px solid var(--vt-line);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: var(--vt-ink);
    text-decoration: none;
}
.vt-reviews__pagination .current {
    background: var(--vt-green);
    border-color: var(--vt-green);
    color: var(--vt-on-green);
    font-weight: 700;
}

/* --- فرم ثبت دیدگاه --- */
.vt-review-form {
    margin-top: 22px;
    border: 1px solid var(--vt-line);
    border-radius: 18px;
    padding: 26px 28px;
    background: var(--vt-surface, #fff);
}
.vt-review-form .comment-reply-title {
    display: block;
    font-size: 19px;
    font-weight: 800;
    color: var(--vt-ink);
    margin-bottom: 18px;
}
.vt-review-form .comment-form { display: flex; flex-direction: column; gap: 16px; }
.vt-review-form p,
.vt-review-form .comment-form-comment,
.vt-review-form .comment-form-cookies-consent,
.vt-review-form .form-submit { margin: 0; float: none; width: auto; }
.vt-review-form label {
    display: block;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--vt-text);
    margin-bottom: 7px;
}
.vt-review-form .required { color: var(--vt-down, #e5484d); }
.vt-review-form input[type="text"],
.vt-review-form input[type="email"],
.vt-review-form select,
.vt-review-form textarea {
    width: 100%;
    max-width: 100%;
    padding: 0 16px;
    height: 52px;
    border: 1px solid var(--vt-line);
    border-radius: 12px;
    background: var(--vt-surface, #fff);
    font-family: inherit;
    font-size: 15px;
    color: var(--vt-ink);
}
.vt-review-form textarea {
    height: auto;
    min-height: 140px;
    padding: 14px 16px;
    line-height: 2;
    resize: vertical;
}
.vt-review-form input:focus,
.vt-review-form select:focus,
.vt-review-form textarea:focus {
    outline: 2px solid var(--vt-green);
    outline-offset: 1px;
    border-color: var(--vt-green);
}
/* پایه‌ی ۲۴۰ پیکسل فقط وقتی معنی دارد که ردیف افقی باشد؛ در حالت ستونی
   همین عدد تبدیل به «ارتفاع ۲۴۰ پیکسل» می‌شود و بین فیلدها فاصله می‌اندازد. */
.vt-review-form .comment-form-author,
.vt-review-form .comment-form-email {
    flex: 1 1 240px;
    width: auto;
    float: none;
    margin: 0;
}
.vt-review-form .vt-form-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}
.vt-review-form .form-submit { margin: 0; }
.vt-review-form .submit {
    width: auto;
    min-height: 52px;
    padding: 0 30px;
    background: var(--vt-green);
    color: var(--vt-on-green);
    border: 0;
    border-radius: 13px;
    font-family: inherit;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background .18s ease;
}
.vt-review-form .submit:hover { background: var(--vt-green-dark); }
.vt-review-form .must-log-in,
.vt-reviews__gate {
    margin: 0;
    padding: 18px 20px;
    background: var(--vt-mint-soft);
    border: 1px solid var(--vt-line);
    border-radius: 14px;
    font-size: 14.5px;
    line-height: 2;
    color: var(--vt-body);
}

/* ==========================================================================
   ریسپانسیو
   ========================================================================== */

@media (max-width: 991px) {
    .vt-reviews__layout { flex-direction: column; gap: 22px; }
    .vt-reviews__summary {
        width: 100%;
        flex: 1 1 auto;
        position: static;
        flex-direction: row;
        align-items: center;
        gap: 20px;
        padding: 20px;
    }
    .vt-reviews__avg { font-size: 36px; }
    .vt-bars { padding-top: 0; }
}

@media (max-width: 782px) {
    .vt-reviews__title { font-size: 22px; }
    .vt-reviews__summary { flex-direction: column; align-items: flex-start; gap: 14px; }
    .vt-bars { width: 100%; }
    .vt-review { padding: 18px; border-radius: 14px; }
    .vt-review__head { flex-wrap: wrap; gap: 9px; }
    .vt-review__date { width: 100%; }
    .vt-review-form { padding: 20px; border-radius: 14px; }
    .vt-review-form .vt-form-row { flex-direction: column; gap: 16px; }
    .vt-review-form .comment-form-author,
    .vt-review-form .comment-form-email { flex: 0 0 auto; }
    .vt-review-form .submit { width: 100%; }
}

/* ستون نظرات (کنار کارت خلاصه) */
.vt-reviews__col {
    flex: 1 1 auto;
    min-width: 0;
}
