/* =============================
   استایل‌های کلی و پایه
   ============================= */

#category-reviews-container {
    font-family: 'IRANSans', Tahoma, Arial, sans-serif;
    direction: rtl;
    color: #2d1d88;
	 border-radius: 12px;
    padding: 20px;
	background-color:#2d1d88;
    box-sizing: border-box;
}

/* =============================
   فرم ارسال نظر
   ============================= */
.category-reviews-list-title{
	color:#fff;
}
.category-review-form {
    background: #f1efff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    padding: 25px 30px;
    margin-bottom: 30px;
    transition: box-shadow 0.3s ease;
}

.category-review-form:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.category-review-form h3 {
    margin-top: 0;
    color: #333;
    font-size: 20px;
    margin-bottom: 25px;
}

/* فرم گروپ‌ها */

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2d1d88;
    user-select: none;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: none;
	border-radius: 12px;
    font-size: 15px;
    resize: vertical;
}

input[type=date], input[type=email], input[type=number], input[type=password], input[type=search], input[type=tel], input[type=text], input[type=url], select, textarea {
border:none !important;
}
.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2D1D88;
}

/* =============================
   استایل ستاره‌ها (امتیاز)
   ============================= */

.star-ratingg {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    margin: 12px 0;
    font-size: 2.2em;
    user-select: none;
}

.star-ratingg input[type="radio"] {
    display: none;
}

.star-ratingg label {
    color: #ccc;
    cursor: pointer;
    padding: 0 5px;
    transition: color 0.25s ease;
    user-select: none;
    font-weight: normal;
    position: relative;
    z-index: 10;
}

.star-ratingg label:hover,
.star-ratingg label:hover ~ label,
.star-ratingg input[type="radio"]:checked ~ label {
    color: #ffc107;
}

/* برای دسترسی با کیبورد */

.star-ratingg label:focus {
    outline: 2px solid #007cba;
    outline-offset: 3px;
    border-radius: 4px;
}

/* =============================
   دکمه ارسال
   ============================= */

.category-review-form button {
    background-color: #2D1D88;
    color: #fff;
    padding: 14px 28px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: background-color 0.3s ease;
    user-select: none;
	width:100%;
}

.category-review-form button:hover:not(:disabled) {
    background-color: #005a87;
}

.category-review-form button:disabled {
    background-color: #bbb;
    cursor: not-allowed;
}

/* =============================
   پیام‌های موفقیت و خطا
   ============================= */

.success-message,
.error-message {
    padding: 14px 18px;
    border-radius: 6px;
    margin-top: 20px;
    font-size: 14px;
    font-weight: 600;
    user-select: none;
}

.success-message {
    background-color: #d4edda;
    border: 1.5px solid #c3e6cb;
    color: #155724;
}

.error-message {
    background-color: #f8d7da;
    border: 1.5px solid #f5c6cb;
    color: #721c24;
}

/* =============================
   لیست نظرات
   ============================= */

.category-reviews-list {
    margin-top: 40px;
}

.category-reviews-list h3 {
    color: #333;
    font-size: 20px;
    margin-bottom: 25px;
    border-bottom: 3px solid #007cba;
    padding-bottom: 12px;
}


.review-header-start{
	display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
}
.review-header-end{
	    display: flex
;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
}
.image-box{
	    width: 38px;
    height: 38px;
    background-color: #f1efff;
    border-radius: 10px;
    display: flex;
    flex-direction: row;
    align-content: center;
    justify-content: center;
    color: #f1efff;
	margin-left: 8px;
}
.review-header-start-container{
	    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
}
/* کارت نظرات */

.review-item {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 18px 22px;
    margin-bottom: 20px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.04);
    transition: box-shadow 0.3s ease;
    position: relative;
}

.review-item:hover {
    box-shadow: 0 4px 18px rgba(0,0,0,0.12);
}


/* هدر نظر */

.review-header {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-bottom: 12px;
	justify-content: space-between;
}

.review-header .author {
    font-weight: 700;
    color: #222;
    flex-shrink: 0;
}

.review-header .rating {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.review-header .rating .star {
    font-size: 18px;
    color: #ccc;
    user-select: none;
}

.review-header .rating .star.filled {
    color: #ffc107;
}

.review-header .date {
    font-size: 13px;
    color: #666;
    flex-shrink: 0;
}

.review-header .product-name {
    background: #f1efff;
    color: #2d1d88;
    font-size: 13px;
    padding: 3px 10px;
    border-radius: 15px;
    user-select: none;
}

/* متن نظر */

.review-content {
    color: #555;
    font-size: 15px;
}

/* پاسخ‌ها */

.review-replies {
    margin-top: 18px;
    border-top: 1px dashed #ccc;
    padding-top: 15px;
}

.review-reply {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 12px 15px;
    margin-bottom: 10px;
    font-size: 14px;
    color: #444;
    user-select: none;
}

.review-reply strong {
    color: #222;
    font-weight: 700;
}

.review-reply .reply-date {
    font-size: 12px;
    color: #888;
    margin-left: 10px;
    user-select: none;
}

	.image-box img{
		width:24px;
	}

/* =============================
   ریسپانسیو (واکنشگرا)
   ============================= */

@media (max-width: 768px) {
    #category-reviews-container {
        padding: 15px;
    }
    
    .category-review-form {
        padding: 20px;
    }

    .star-ratingg label {
        font-size: 24px;
    }
    
    .category-review-form button {
        width: 100%;
        padding: 14px 0;
    }
	.review-header .product-name {
    display:none;
}

}

/* =============================
   انیمیشن ورود نظرات
   ============================= */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.review-item {
    animation: fadeIn 0.35s ease-out;
}

/* =============================
   بهبود دسترسی
   ============================= */

.form-group input:focus,
.form-group textarea:focus {
    outline: 2px solid #007cba;
    outline-offset: 3px;
}

.star-ratingg label:focus {
    outline: 2px solid #007cba;
    outline-offset: 3px;
}
