/* تنظیمات کلی */
.woocommerce #reviews {
    direction: rtl;
    font-family: 'Vazirmatn', 'Tahoma', sans-serif;
}

/* دکمه باز کردن پاپ آپ */
.rosium-open-modal-btn {
    background: linear-gradient(45deg, #1a1a1a, #333);
    color: #d4af37;
    padding: 14px 40px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    margin: 20px auto;
    display: block;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
}
.rosium-open-modal-btn:hover {
    transform: translateY(-2px);
    background: #d4af37;
    color: #1a1a1a;
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.3);
}

/* پس‌زمینه تیره پاپ‌آپ - کاملا وسط صفحه */
.rosium-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.65);
    backdrop-filter: blur(4px);
    z-index: 99999;
    justify-content: center; /* وسط چین افقی */
    align-items: center; /* وسط چین عمودی */
    padding: 20px;
}

/* باکس سفید پاپ‌آپ */
.rosium-modal-box {
    background: #fff;
    width: 100%;
    max-width: 550px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 24px;
    padding: 45px 40px 30px;
    position: relative;
    box-sizing: border-box;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
    animation: rosiumPopIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes rosiumPopIn {
    from { transform: scale(0.8) translateY(20px); opacity: 0; }
    to { transform: scale(1) translateY(0); opacity: 1; }
}

.rosium-modal-close {
    position: absolute;
    top: 15px;
    left: 20px;
    font-size: 32px;
    color: #ccc;
    cursor: pointer;
    transition: 0.2s;
    line-height: 1;
    z-index: 2;
}
.rosium-modal-close:hover { color: #d4af37; }

/* فرم نظرات */
.rosium-form-title {
    display: block;
    font-size: 22px;
    font-weight: 800;
    color: #1a1a1a;
    margin-bottom: 5px;
    text-align: center;
}
.rosium-form-subtitle {
    display: block;
    font-size: 14px;
    color: #777;
    margin-bottom: 30px;
    text-align: center;
}
.rosium-form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}
.rosium-col, .rosium-col-full { flex: 1; }
.rosium-col-full { flex: 100%; }

#review_form input, #review_form select, #review_form textarea {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    background: #f9f9f9;
    font-family: inherit;
    transition: all 0.3s ease;
    font-size: 14px;
    color: #333;
    box-sizing: border-box;
}
#review_form input:focus, #review_form select:focus, #review_form textarea:focus {
    border-color: #d4af37;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
    outline: none;
}

/* سیستم آواتار (شبیه دیجی کالا) */
.rosium-avatar-label {
    display: block;
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 600;
    color: #555;
}
.rosium-avatar-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}
.rosium-avatar-option {
    width: 100%;
    aspect-ratio: 1;
    border: 2px solid #e0e0e0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f9f9f9;
}
.rosium-avatar-option svg {
    width: 55%;
    height: 55%;
    opacity: 0.5;
    transition: all 0.3s ease;
}
.rosium-avatar-option:hover {
    border-color: #d4af37;
    transform: translateY(-2px);
}
.rosium-avatar-option.selected {
    border-color: #d4af37;
    background: #fffdf5;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
}
.rosium-avatar-option.selected svg {
    opacity: 1;
    transform: scale(1.1);
}

.rosium-submit-btn, #review_form .submit {
    background: linear-gradient(45deg, #1a1a1a, #333);
    color: #d4af37;
    padding: 16px 40px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-family: inherit;
    font-size: 16px;
    font-weight: 700;
    transition: all 0.3s ease;
    margin-top: 15px;
    width: 100%;
}
.rosium-submit-btn:hover, #review_form .submit:hover {
    background: linear-gradient(45deg, #d4af37, #e8c969);
    color: #1a1a1a;
}

/* لیست نظرات */
.woocommerce #comments ol.commentlist { padding: 0; list-style: none; }
.rosium-review-item {
    display: flex;
    gap: 20px;
    padding: 25px 0;
    border-bottom: 1px solid #f0f0f0;
}
.rosium-review-avatar { flex-shrink: 0; }
.rosium-avatar-svg-wrap {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #d4af37;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}
.rosium-avatar-svg-wrap svg {
    width: 100%;
    height: 100%;
}
.rosium-review-content { flex-grow: 1; }
.rosium-review-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}
.rosium-author-name {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 5px 0;
    color: #1a1a1a;
}
.rosium-rating-stars .star { color: #e0e0e0; font-size: 18px; }
.rosium-rating-stars .star.filled { color: #d4af37; }
.rosium-review-date {
    font-size: 12px;
    color: #999;
    background: #f5f5f5;
    padding: 5px 12px;
    border-radius: 20px;
}
.rosium-review-text {
    color: #555;
    line-height: 1.8;
    font-size: 14px;
    margin-bottom: 15px;
}
.rosium-review-meta-tag {
    display: inline-block;
    background: #fdf8ed;
    color: #8a6d3b;
    border: 1px solid #faebcc;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 12px;
    margin-bottom: 15px;
}
.rosium-review-actions { display: flex; gap: 15px; align-items: center; }
.rosium-like-btn {
    background: #fff;
    border: 1px solid #e0e0e0;
    padding: 6px 15px;
    border-radius: 25px;
    cursor: pointer;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #666;
    transition: all 0.3s;
}
.rosium-like-btn:hover, .rosium-like-btn.liked {
    border-color: #d4af37;
    color: #d4af37;
    background: #fffdf5;
}
.rosium-review-actions .comment-reply-link {
    font-size: 13px;
    color: #666;
    text-decoration: none;
    padding: 6px 0;
}
.rosium-review-actions .comment-reply-link:hover { color: #d4af37; }