/* Custom Comments CSS - Dual Rating System */

.custom-comment-form-wrapper {
    background: #f9f9f9;
    padding: 25px;
    border-radius: 12px;
    margin: 25x 0 0 0;
    border: 1px solid #e5e5e5;
    direction: rtl;
    font-family: 'Vazir', 'Tahoma', sans-serif;
}

.custom-comment-form-wrapper h3 {
    margin: 0 0 15px;
    color: #333;
    font-size: 18px;
    font-weight: 600;
    border-bottom: 2px solid #E5B489;
    padding-bottom: 10px;
}

.custom-comment-form {
    direction: rtl;
}

.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.form-group {
    flex: 1;
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background: white;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #E5B489;
    box-shadow: 0 0 0 3px rgba(229, 180, 137, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* Rating Section */
.rating-section {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #eee;
}

.rating-section h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 16px;
    font-weight: 600;
}

.rating-row {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.rating-group {
    text-align: center;
}

.rating-group.single-rating {
    max-width: 300px;
    margin: 0 auto;
}

.rating-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
    font-size: 13px;
}

.star-rating {
    display: flex;
    gap: 4px;
    margin-bottom: 10px;
    justify-content: center;
}

.star-rating .star {
    font-size: 28px;
    color: #ddd;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.star-rating .star:hover {
    color: #E5B489;
    transform: scale(1.1);
}

.star-rating .star.active {
    color: #E5B489;
}

.star-rating .star.filled {
    color: #E5B489;
}

/* Submit Button */
.submit-comment-btn {
    background: linear-gradient(135deg, #E5B489 0%, #d9a06f 100%);
    color: white;
    border: none;
    padding: 14px 40px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-width: 180px;
    box-shadow: 0 4px 12px rgba(229, 180, 137, 0.3);
    text-transform: none;
    letter-spacing: 0.5px;
}

.submit-comment-btn:hover {
    background: linear-gradient(135deg, #d9a06f 0%, #E5B489 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(229, 180, 137, 0.3);
}

.submit-comment-btn:active {
    transform: translateY(0);
}

.submit-comment-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.submit-comment-btn .btn-loading {
    display: none;
}

.submit-comment-btn.loading .btn-text {
    display: none;
}

.submit-comment-btn.loading .btn-loading {
    display: inline;
}

/* Comment Result Messages */
.comment-result {
    margin-top: 15px;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
}

.comment-result.success {
    background: #f0f9f0;
    color: #2e7d2e;
    border: 1px solid #c3e6c3;
}

.comment-result.error {
    background: #fdf2f2;
    color: #c53030;
    border: 1px solid #fed7d7;
}

/* Rating Summary */
.rating-summary {
    background: white;
    padding: 25px;
    border-radius: 12px;
    margin: 20px 0;
    border: 1px solid #eee;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.rating-summary.single-rating-summary {
    text-align: center;
}

.overall-rating {
    text-align: center;
}

.rating-score {
    font-size: 48px;
    font-weight: bold;
    color: #E5B489;
    line-height: 1;
    margin-bottom: 10px;
}

.overall-rating .rating-stars {
    margin-bottom: 8px;
}

.overall-rating .rating-stars .star {
    font-size: 28px;
    color: #ddd;
    margin: 0 2px;
}

.overall-rating .rating-stars .star.filled {
    color: #E5B489;
}

.rating-count {
    color: #666;
    font-size: 14px;
}

.detailed-ratings {
    display: flex;
    gap: 20px;
    justify-content: space-around;
}

.rating-detail {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    justify-content: center;
}

.rating-detail .label {
    font-size: 13px;
    color: #666;
    white-space: nowrap;
}

.rating-detail .stars {
    display: flex;
    gap: 1px;
}

.rating-detail .stars .star {
    font-size: 16px;
    color: #ddd;
}

.rating-detail .stars .star.filled {
    color: #E5B489;
}

.rating-detail .score {
    font-weight: bold;
    color: #333;
    font-size: 14px;
    min-width: 25px;
}

/* Comments List */
.custom-comments-list {
    margin: 30px 0;
}

.comment-item {
    background: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 15px;
    border: 1px solid #eee;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s ease;
}

.comment-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.comment-author strong {
    color: #333;
    font-size: 16px;
    font-weight: 600;
}

.comment-date {
    color: #666;
    font-size: 12px;
    margin-right: 10px;
}

.comment-ratings {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.comment-ratings .rating-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.comment-ratings .rating-item.single-rating-display {
    justify-content: flex-end;
    gap: 10px;
}

.comment-ratings .rating-label {
    font-size: 12px;
    color: #666;
    min-width: 50px;
    font-weight: 500;
}

.comment-ratings .rating-score {
    font-size: 12px;
    color: #333;
    font-weight: 600;
    margin-left: 5px;
}

.comment-ratings .stars-display {
    display: flex;
    gap: 1px;
}

.comment-ratings .stars-display .star {
    font-size: 14px;
    color: #ddd;
}

.comment-ratings .stars-display .star.filled {
    color: #E5B489;
}

.comment-content {
    color: #333;
    line-height: 1.6;
    font-size: 14px;
}

/* No Comments/Ratings States */
.no-comments,
.no-ratings {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 30px;
    background: #f9f9f9;
    border-radius: 8px;
    margin: 20px 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .rating-row {
        flex-direction: column;
        gap: 20px;
    }
    
    .rating-group.single-rating {
        max-width: 100%;
    }
    
    .star-rating .star {
        font-size: 24px;
    }
    
    .submit-comment-btn {
        width: 100%;
        min-width: unset;
    }
    
    .comment-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .comment-ratings {
        width: 100%;
    }
    
    .comment-ratings .rating-item.single-rating-display {
        justify-content: flex-start;
    }
}

/* Loading Animation */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.submit-comment-btn.loading {
    animation: pulse 1.5s infinite;
}
