استایل فرم نظرات المنتور
با استفاده از این کد سی اس اس شما فرم نظرات قبلی و ساده المنتور رو تبدیل به ی فرم نظرات خیلی خوب و خوشگل می کنید
کد استایل فرم نظرات
زبان: CSS
/* استایل کلی بخش نظرات */
.elementor-widget-post-comments .elementor-widget-container {
padding: 30px;
background: #f9fafc;
border-radius: 12px;
box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
margin: 20px 0;
font-family: 'Vazir', 'Segoe UI', Tahoma, sans-serif;
}
/* عنوان بخش نظرات */
.comments-title {
font-size: 24px;
color: #2d3748;
margin-bottom: 25px;
padding-bottom: 15px;
border-bottom: 2px solid #4f46e5;
position: relative;
font-weight: 700;
}
.comments-title:after {
content: '';
position: absolute;
bottom: -2px;
right: 0;
width: 70px;
height: 2px;
background: #ec4899;
}
/* لیست نظرات */
.comment-list {
list-style: none;
padding: 0;
margin: 0;
}
.comment-list .comment {
background: #fff;
border-radius: 20px;
padding: 25px;
margin-bottom: 25px;
box-shadow: 0 3px 10px rgba(0, 0, 0, 0.03);
border: 1px solid #e2e8f0;
transition: all 0.3s ease;
}
.comment-list .comment:hover {
transform: translateY(-3px);
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}
/* هدر هر نظر */
.comment-meta {
display: flex;
align-items: center;
margin-bottom: 15px;
}
#comments .comment-meta {
display: flex;
justify-content: space-between;
margin-block-end: .9rem;
flex-direction: row;
flex-wrap: wrap;
}
.comment-author .avatar {
border-radius: 50%;
width: 60px;
height: 60px;
margin-left: 15px;
margin-right: 10px;
}
.comment-author .fn {
font-weight: 700;
color: #2d3748;
font-size: 18px;
}
.comment-metadata {
margin-top: 5px;
font-size: 13px;
color: #718096;
}
/* بدنه نظر */
.comment-content {
color: #4a5568;
line-height: 1.8;
margin-bottom: 15px;
font-size: 16px;
}
/* دکمه پاسخ */
.comment-reply-link {
background: #4f46e5;
color: white !important;
padding: 10px 20px;
border-radius: 20px;
font-size: 14px;
text-decoration: none;
transition: all 0.3s ease;
display: inline-block;
cursor: pointer;
}
.comment-reply-link:hover {
background: #4338ca;
transform: translateY(-2px);
}
/* فرم ارسال نظر */
.comment-respond {
background: #fff;
padding: 30px;
border-radius: 12px;
box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
margin-top: 40px;
}
.comment-reply-title {
font-size: 22px;
color: #2d3748;
margin-bottom: 25px;
padding-bottom: 15px;
border-bottom: 2px solid #4f46e5;
position: relative;
font-weight: 700;
}
.comment-reply-title::after {
content: '';
position: absolute;
right: 0;
width: 10px;
height: 10px;
background: #4f46e6;
bottom: -5px;
border-radius: 50%;
}
#cancel-comment-reply-link {
padding: 10px;
font-size: 14px;
font-weight: 400;
color: #4f46e5;
background: #4f46e52e;
border-radius: 50px;
margin-right: 10px;
}
/* فیلدهای فرم */
.comment-form textarea,
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"] {
width: 100%;
padding: 12px 15px;
border: 1px solid #e2e8f0;
border-radius: 8px;
margin-bottom: 20px;
font-family: inherit;
font-size: 15px;
transition: all 0.3s ease;
}
.comment-form textarea:focus,
.comment-form input[type="text"]:focus,
.comment-form input[type="email"]:focus,
.comment-form input[type="url"]:focus {
border-color: #4f46e5;
box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
outline: none;
}
#comments .comment .comment-body, #comments .pingback .comment-body {
border: none;
display: flex;
flex-direction: column;
padding-block-end: 0px;
padding-block-start: 0px;
padding-inline-end: 0;
padding-inline-start: 60px;
}
/* دکمه ارسال نظر */
.form-submit .submit {
background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
color: white;
border: none;
padding: 12px 30px;
border-radius: 8px;
font-size: 16px;
font-weight: 600;
cursor: pointer;
transition: all 0.3s ease;
}
.form-submit .submit:hover {
background: linear-gradient(135deg, #4338ca 0%, #6d28d9 100%);
transform: translateY(-2px);
box-shadow: 0 5px 15px rgba(79, 70, 229, 0.3);
}
/* پاپآپ فرم پاسخدهی به نظرات */
.comment-respond.popup-mode {
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%) scale(0.9);
width: 90%;
max-width: 600px;
max-height: 80vh;
overflow-y: auto;
z-index: 10000;
opacity: 0;
visibility: hidden;
transition: all 0.3s ease;
box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
border-radius: 15px;
padding: 25px;
}
.comment-respond.popup-mode.active {
opacity: 1;
visibility: visible;
transform: translate(-50%, -50%) scale(1);
}
/* پسزمینه تاری هنگام نمایش پاپآپ */
.popup-overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.7);
z-index: 9999;
opacity: 0;
visibility: hidden;
transition: all 0.3s ease;
}
.popup-overlay.active {
opacity: 1;
visibility: visible;
}
/* دکمه بستن پاپآپ */
.close-popup {
position: absolute;
top: 15px;
left: 15px;
width: 30px;
height: 30px;
background: #f56565;
color: white;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
font-weight: bold;
font-size: 18px;
z-index: 10;
}
/* واکنشگرایی برای موبایل */
@media (max-width: 768px) {
.elementor-widget-post-comments .elementor-widget-container {
padding: 20px 15px;
}
.comment-meta {
flex-direction: column;
align-items: flex-start;
}
.comment-author .avatar {
margin-left: 0;
margin-bottom: 10px;
}
.comment-respond {
padding: 20px 15px;
}
.comments-title,
.comment-reply-title {
font-size: 20px;
}
#comments .comment .comment-body, #comments .pingback .comment-body {
padding-inline-start: 0px;
}
.comment-author.vcard img {
width: 35px;
height: 35px;
}
.comment-respond.popup-mode {
width: 95%;
padding: 20px 15px;
}
}
/* انیمیشن برای ظاهر شدن نظرات */
@keyframes fadeInUp {
from {
opacity: 0;
transform: translateY(20px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.comment-list .comment {
animation: fadeInUp 0.5s ease forwards;
}
.comment-list .comment:nth-child(1) { animation-delay: 0.1s; }
.comment-list .comment:nth-child(2) { animation-delay: 0.2s; }
.comment-list .comment:nth-child(3) { animation-delay: 0.3s; }
.comment-list .comment:nth-child(4) { animation-delay: 0.4s; }
.comment-list .comment:nth-child(5) { animation-delay: 0.5s; }