/* --- استایل کلی فرم‌های دروپال: لاگین و تماس --- */
.user-login-form,
.contact-message-form {
    max-width: 380px;
    margin: 2rem auto;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 1.5rem 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    direction: rtl;
    text-align: right;
}

/* برچسب‌ها */
.user-login-form label,
.contact-message-form label {
    display: block;
    font-size: 0.9rem;
    margin-bottom: .4rem;
    font-weight: 600;
    color: #333;
}

/* فیلدهای ورودی و textarea */
.user-login-form input.form-text,
.user-login-form input.form-email,
.user-login-form input.form-password,
.contact-message-form input.form-text,
.contact-message-form input.form-email,
.contact-message-form textarea.form-textarea {
    width: 100%;
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: .65rem .75rem;
    font-size: 0.95rem;
    line-height: 1.5;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background-color: #fafafa;
    box-sizing: border-box;
}

.user-login-form input:focus,
.contact-message-form input:focus,
.contact-message-form textarea:focus {
    outline: none;
    border-color: #AD1519;
    box-shadow: 0 0 0 2px rgba(173, 21, 25, 0.25);
    background-color: #fff;
}

/* فاصله بین آیتم‌ها */
.user-login-form .form-item,
.contact-message-form .form-item {
    margin-bottom: 1.2rem;
}

/* دکمه‌ها */
.user-login-form .form-actions input[type="submit"],
.contact-message-form .form-actions input[type="submit"] {
    background-color: #AD1519;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: .75rem 1.25rem;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background-color .2s ease;
    width: 100%;
    display: block;
}

.user-login-form .form-actions input[type="submit"]:hover,
.contact-message-form .form-actions input[type="submit"]:hover {
    background-color: #8C1216;
}

/* دکمه پیش‌نمایش در فرم تماس */
.contact-message-form .form-actions input#edit-preview {
    background-color: #ccc;
    color: #333;
    margin-top: .5rem;
}

.contact-message-form .form-actions input#edit-preview:hover {
    background-color: #bbb;
}

/* حالت‌های واکنش‌گرا */
@media (max-width: 480px) {

    .user-login-form,
    .contact-message-form {
        padding: 1.2rem;
        border-radius: 8px;
    }
}

/* --- استایل کلی بخش دیدگاه‌ها --- */
.field--name-comment {
    margin-top: 2rem;
    direction: rtl;
    text-align: right;
    font-size: 0.95rem;
}

/* عنوان بخش دیدگاه‌ها (مثلاً "دیدگاه‌ها") */
.field--name-comment .field__label {
    font-weight: 700;
    margin-bottom: 1rem;
    color: #333;
}

/* هر دیدگاه به صورت کارت تمیز */
.comment {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

/* دیدگاه‌های تو در تو کمی تو رفته (در RTL از راست) */
html[dir="rtl"] .comment.indented {
    margin-right: 1.25rem;
    margin-left: 0;
}

/* هدر دیدگاه (نام نویسنده، تاریخ) */
.comment__meta,
.comment .submitted {
    font-size: 0.8rem;
    color: #777;
    margin-bottom: .4rem;
}

/* متن دیدگاه */
.comment__content,
.comment__content p {
    color: #333;
    line-height: 1.7;
}

/* لینک‌های عملیات دیدگاه (پاسخ، ویرایش، حذف) */
.comment .links,
.comment .links.inline {
    margin-top: .75rem;
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    padding: 0;
    list-style: none;
}
.comment .links a {
    display: inline-block;
    font-size: 0.8rem;
    padding: .35rem .7rem;
    border-radius: 999px;
    border: 1px solid #e0e0e0;
    text-decoration: none;
    color: #AD1519;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.comment .links a:hover {
    background-color: #AD1519;
    color: #fff;
    border-color: #AD1519;
}

/* --- فرم ارسال دیدگاه (هم‌استایل با لاگین و تماس) --- */
.comment-form,
.comment-comment-form {
    max-width: 600px;
    margin: 2rem auto;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 1.5rem 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    direction: rtl;
    text-align: right;
}

/* برچسب‌های فرم دیدگاه */
.comment-form label,
.comment-comment-form label {
    display: block;
    font-size: 0.9rem;
    margin-bottom: .4rem;
    font-weight: 600;
    color: #333;
}

/* فیلدهای ورودی و textarea در فرم دیدگاه */
.comment-form input.form-text,
.comment-form input.form-email,
.comment-form textarea.form-textarea,
.comment-comment-form input.form-text,
.comment-comment-form input.form-email,
.comment-comment-form textarea.form-textarea {
    width: 100%;
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: .65rem .75rem;
    font-size: 0.95rem;
    line-height: 1.5;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background-color: #fafafa;
    box-sizing: border-box;
}

.comment-form input:focus,
.comment-form textarea:focus,
.comment-comment-form input:focus,
.comment-comment-form textarea:focus {
    outline: none;
    border-color: #AD1519;
    box-shadow: 0 0 0 2px rgba(173, 21, 25, 0.25);
    background-color: #fff;
}

/* فاصله بین آیتم‌های فرم دیدگاه */
.comment-form .form-item,
.comment-comment-form .form-item {
    margin-bottom: 1.2rem;
}

/* دکمهٔ ارسال دیدگاه */
.comment-form .form-actions input[type="submit"],
.comment-comment-form .form-actions input[type="submit"] {
    background-color: #AD1519;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: .75rem 1.25rem;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background-color .2s ease;
    min-width: 140px;
}

.comment-form .form-actions input[type="submit"]:hover,
.comment-comment-form .form-actions input[type="submit"]:hover {
    background-color: #8C1216;
}

/* واکنش‌گرا برای فرم و کارت دیدگاه‌ها در موبایل */
@media (max-width: 480px) {
    .comment {
        padding: .9rem 1rem;
        border-radius: 8px;
    }

    .comment-form,
    .comment-comment-form {
        padding: 1.2rem;
        border-radius: 8px;
        margin: 1.5rem auto;
    }
}
