/* ========== امتیاز ستاره‌ای ========== */
.tarlanweb-rating-widget {
    direction: rtl;
    text-align: right;
    padding: 8px 0;
    font-family: inherit;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}
/* ردیف ستاره‌ها + متن */
.tarlanweb-stars {
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    user-select: none;
}
/* فقط آیکون‌های ستاره — همیشه LTR تا نیم‌ستاره درست پر شود */
.tarlanweb-stars-icons {
    direction: ltr;
    unicode-bidi: isolate;
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 4px;
    line-height: 0;
}
.tarlanweb-star-wrapper {
    display: block;
    width: 28px;
    height: 28px;
    position: relative;
    cursor: pointer;
    line-height: 0;
    flex: 0 0 28px;
}
.tarlanweb-star {
    position: relative;
    width: 28px;
    height: 28px;
    display: block;
    overflow: hidden;
}
/* پس‌زمینه خاکستری */
.tarlanweb-star-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 28px;
    height: 28px;
    fill: none;
    stroke: #c4c4c4;
    stroke-width: 1.2;
    display: block;
}
/* لایه رنگی — از چپ SVG بریده می‌شود (نیم‌ستاره) */
.tarlanweb-star-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 28px;
    max-width: 28px;
    overflow: hidden;
    pointer-events: none;
    display: block;
}
.tarlanweb-star-fill svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 28px;
    height: 28px;
    display: block;
    fill: #ffc107;
    stroke: #ffc107;
    stroke-width: 0.5;
}

/* هاور: نارنجی */
.tarlanweb-stars.is-hovering .tarlanweb-star-fill svg {
    fill: #ff9800;
    stroke: #ff9800;
}
.tarlanweb-stars.is-hovering .tarlanweb-star-wrapper.is-preview {
    transform: scale(1.08);
    transition: transform 0.12s ease;
}

/* بعد از ثبت: نارنجی */
.tarlanweb-stars.is-rated .tarlanweb-star-fill svg {
    fill: #ff9800;
    stroke: #ff9800;
}

.tarlanweb-rating-text {
    direction: rtl;
    unicode-bidi: isolate;
    font-size: 0.95em;
    color: #333;
    display: inline-block;
    white-space: nowrap;
    line-height: 28px;
}
.tarlanweb-rating-message {
    margin-top: 4px;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.9em;
    display: none;
    width: 100%;
    box-sizing: border-box;
}
.tarlanweb-rating-message.success {
    color: #155724;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    display: block;
}
.tarlanweb-rating-message.error {
    color: #721c24;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    display: block;
}

.comments-area {}
.comments-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: #1e293b;
    padding-bottom: 1rem;
    border-bottom: 2px solid #eef2f6;
    margin-bottom: 2rem;
    letter-spacing: -0.5px;
}
.comment-list {
    list-style: none;
    padding: 0;
    margin: 0 0 2.5rem 0;
}
.comment-list > .comment {
    margin-bottom: 1.8rem;
}
.comment-body {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 1rem 0.8rem;
    padding: 1.2rem 1.5rem 1.2rem 1.5rem;
    background: #f9fafc;
    border-radius: 14px;
    transition: background 0.2s ease, box-shadow 0.2s ease;
}

.comment-body:hover {
    background: #f1f5f9;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}
.comment-author .avatar {
    border-radius: 50%;
    border: 2px solid #e2e8f0;
    width: 50px !important;
    height: 50px !important;
    object-fit: cover;
    transition: border-color 0.2s;
}

.comment-author .avatar:hover {
    border-color: #3b82f6;
}
.comment-author {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.comment-author .fn {
    font-style: normal;
    font-weight: 700;
    font-size: 1.05rem;
    color: #0f172a;
}

.comment-author .fn a {
    color: #0f172a;
    text-decoration: none;
    transition: color 0.2s;
}

.comment-author .fn a:hover {
    color: #3b82f6;
}

.comment-author .says {
    font-size: 0.85rem;
    color: #94a3b8;
    margin-right: 0.2rem;
}
.comment-meta {
    font-size: 0.85rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin: 0.7rem auto 0 0;
}

.comment-meta a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s;
}

.comment-meta a:hover {
    color: #3b82f6;
}

.comment-edit-link {
    font-size: 0.75rem;
    background: #eef2f6;
    padding: 0.1rem 0.6rem;
    border-radius: 20px;
    color: #64748b;
    text-decoration: none;
}

.comment-edit-link:hover {
    background: #dce2ea;
    color: #1e293b;
}
.comment-body p {
    margin: 0.4rem 0 0 0;
    width: 100%;
    font-size: 1rem;
    line-height: 1.8;
    color: #1e293b;
    word-break: break-word;
    padding-left: 0.5rem;
}
.reply {
    width: 100%;
    text-align: left;
    margin-top: 0.3rem;
}

.comment-reply-link {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 500;
    color: #3b82f6;
    background: transparent;
    padding: 0.2rem 0.8rem;
    border: 1px solid #3b82f6;
    border-radius: 30px;
    text-decoration: none;
    transition: all 0.25s ease;
    line-height: 1.6;
}

.comment-reply-link:hover {
    background: #3b82f6;
    color: #fff;
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
    transform: translateY(-1px);
}

.comment-reply-link:active {
    transform: scale(0.96);
}
.children {
    list-style: none;
    padding-right: 2.5rem;
    margin: 0.8rem 0 0 0;
    border-right: 2px dashed #e2e8f0;
}

.children .comment-body {
    background: #f8fafc;
    border-radius: 12px;
}

.children .comment-body:hover {
    background: #f1f4f9;
}
.children .children {
    padding-right: 2rem;
}
#respond {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 2px solid #eef2f6;
}

.comment-reply-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 1.2rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

#cancel-comment-reply-link {
    font-size: 0.85rem;
    font-weight: 400;
    color: #ef4444;
    background: #fee2e2;
    padding: 0.1rem 0.8rem;
    border-radius: 30px;
    text-decoration: none;
    transition: background 0.2s;
}

#cancel-comment-reply-link:hover {
    background: #fecaca;
}
.logged-in-as {
    font-size: 0.95rem;
    color: #475569;
    margin-bottom: 1.2rem;
}

.logged-in-as a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
}

.logged-in-as a:hover {
    text-decoration: underline;
}

.required-field-message {
    display: block;
    font-size: 0.85rem;
    color: #94a3b8;
    margin-top: 0.3rem;
}

.required {
    color: #ef4444;
}
.comment-form-comment {
    margin-bottom: 1.5rem;
}

.comment-form-comment label {
    display: block;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.4rem;
    font-size: 0.95rem;
}

.comment-form-comment textarea,.comment-form-author input,.comment-form-email input{
    width: 100%;
    padding: 0.9rem 1rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    background: #fafcfc;
    transition: border-color 0.25s, box-shadow 0.25s;
    resize: vertical;
    min-height: 120px;
    color: #0f172a;
}

.comment-form-comment textarea:focus,.comment-form-author input:focus,.comment-form-email input:focus{
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
    background: #fff;
}
.comment-form-author input,.comment-form-email input{height:40px !important;min-height: 40px;padding: 0 1rem;}
.form-submit {
    margin-top: 0.5rem;
}

.submit {height: 50px;
    background: #3b82f6;
    color: #fff;
    font-size: 1.05rem;
    font-weight: 600;
    padding: 0 2.2rem;
    border: none;
    border-radius: 40px;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
    letter-spacing: 0.3px;
}

.submit:hover {
    background: #2563eb;
    color: #fff;
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.35);
    transform: translateY(-2px);
}

.submit:active {
    transform: scale(0.96);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

.comment-form-author{width: 49%;float: right;margin-bottom: 1.5rem;}
.comment-form-email{width: 49%;float: left;margin-bottom: 1.5rem;}
.comment-form-url{display: none;}

.comment-form-cookies-consent{width: 100%;display: flex;align-items: center;grid-gap: 0.3rem;margin-bottom: 1.5rem;}
#wp-comment-cookies-consent{width: 14px;height: 14px;}


@media (max-width: 640px) {
    .comments-area {
        padding: 1.2rem 0.8rem;
    }

    .comment-body {
        padding: 1rem;
        gap: 0.5rem;
    }

    .comment-author .avatar {
        width: 44px !important;
        height: 44px !important;
    }

    .comment-author .fn {
        font-size: 0.95rem;
    }

    .comment-meta {
        font-size: 0.75rem;
        margin-right: 0;
        width: 100%;
    }

    .children {
        padding-right: 1rem;
    }

    .comments-title {
        font-size: 1.3rem;
    }

    .comment-reply-title {
        font-size: 1.2rem;
    }

    .submit {
        width: 100%;
        justify-content: center;
        padding: 0.8rem;
    }

    .comment-form-comment textarea {
        min-height: 100px;
        font-size: 0.95rem;
    }
	.comment-form-comment {
  margin-bottom: 0;
}
	.comment-form-author,.comment-form-email{width: 100%;margin-bottom: 0;}
}

.comment-body a:focus-visible,
.submit:focus-visible,
.comment-reply-link:focus-visible,
textarea:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}
.comments-area .no-comments {
    color: #64748b;
    font-size: 1rem;
    padding: 1rem 0;
    text-align: center;
}
/*
@media (prefers-color-scheme: dark) {
    .comments-area {
        background: #1e293b;
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    }
    .comments-title,
    .comment-reply-title,
    .comment-author .fn,
    .comment-body p {
        color: #e2e8f0;
    }
    .comment-body {
        background: #334155;
    }
    .comment-body:hover {
        background: #3b4a5c;
    }
    .comment-meta,
    .comment-meta a,
    .says,
    .logged-in-as {
        color: #94a3b8;
    }
    .comment-form-comment textarea {
        background: #1e293b;
        border-color: #475569;
        color: #f1f5f9;
    }
    .comment-form-comment textarea:focus {
        border-color: #60a5fa;
        background: #1e293b;
    }
    .comment-edit-link {
        background: #475569;
        color: #cbd5e1;
    }
    .comment-edit-link:hover {
        background: #64748b;
    }
    .children {
        border-right-color: #475569;
    }
}
*/