/* 
Reviews System Styles - обновленная версия
Система стилей для отзывов и рейтингов
Используется с префиксом single- для страницы товара
*/

/* Контейнер отзывов */
.single-product-reviews-section {
    margin-top: 30px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.single-product-reviews-section > h3 {
    margin: 0;
    padding: 20px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-size: 1.4rem;
    font-weight: 600;
}

/* Статистика рейтинга */
.single-rating-summary {
    padding: 24px;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.single-rating-summary h3,
.single-rating-summary h4 {
    margin: 0 0 16px 0;
    color: #333;
    font-weight: 600;
}

.single-rating-stats {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 30px;
    align-items: center;
}

.single-rating-average {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    min-width: 160px;
}

.single-rating-average .rating-number {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.single-rating-average .rating-stars {
    display: flex;
    gap: 2px;
}

.single-rating-average .star {
    font-size: 1.5rem;
    color: #ffd700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.single-rating-count {
    color: #6c757d;
    font-size: 0.9rem;
    font-weight: 500;
}

.single-rating-breakdown {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.single-rating-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.single-rating-item:hover {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.single-rating-icon {
    font-size: 1.4rem;
    width: 24px;
    text-align: center;
}

.single-rating-icon.positive { 
    color: #28a745;
    filter: drop-shadow(0 1px 2px rgba(40, 167, 69, 0.3));
}

.single-rating-icon.neutral { 
    color: #6c757d;
    filter: drop-shadow(0 1px 2px rgba(108, 117, 125, 0.3));
}

.single-rating-icon.negative { 
    color: #dc3545;
    filter: drop-shadow(0 1px 2px rgba(220, 53, 69, 0.3));
}

/* Список отзывов */
.single-reviews-list {
    background: #fff;
}

.single-reviews-list > h3 {
    margin: 0;
    padding: 20px 24px;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    color: #333;
    font-weight: 600;
}

.single-review-item {
    padding: 24px;
    border-bottom: 1px solid #f1f3f4;
    transition: background-color 0.3s ease;
}

.single-review-item:hover {
    background: #fafbfc;
}

.single-review-item:last-child {
    border-bottom: none;
}

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

.single-review-author {
    display: flex;
    align-items: center;
    gap: 8px;
}

.single-review-author .single-author-name,
.single-review-author a {
    font-weight: 600;
    color: #333;
    text-decoration: none;
    font-size: 1rem;
}

.single-review-author a:hover {
    color: #007bff;
    text-decoration: underline;
}

.single-review-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 16px;
    font-weight: 600;
    font-size: 0.9rem;
}

.single-review-rating .single-rating-positive { 
    color: #28a745;
    background: rgba(40, 167, 69, 0.1);
}

.single-review-rating .single-rating-neutral { 
    color: #6c757d;
    background: rgba(108, 117, 125, 0.1);
}

.single-review-rating .single-rating-negative { 
    color: #dc3545;
    background: rgba(220, 53, 69, 0.1);
}

.single-review-date {
    color: #6c757d;
    font-size: 0.85rem;
    font-weight: 500;
}

.single-review-content {
    line-height: 1.6;
}

.single-review-content p {
    margin: 0;
    color: #555;
}

.single-no-reviews {
    padding: 60px 24px;
    text-align: center;
    color: #6c757d;
    font-style: italic;
}

.single-no-reviews p {
    margin: 0;
    font-size: 1.1rem;
}

/* Форма добавления отзыва */
.single-add-review-form {
    background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
    padding: 30px;
    border-top: 1px solid #dee2e6;
}

.single-add-review-form h3 {
    margin: 0 0 24px 0;
    color: #333;
    font-weight: 600;
    font-size: 1.3rem;
}

.single-form-group {
    margin-bottom: 24px;
}

.single-form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #333;
    font-size: 1rem;
}

.single-rating-options {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.single-rating-option {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 12px 16px;
    border-radius: 8px;
    border: 2px solid #e9ecef;
    background: #fff;
    transition: all 0.3s ease;
    min-width: 140px;
}

.single-rating-option:hover {
    border-color: #007bff;
    background: rgba(0, 123, 255, 0.05);
    transform: translateY(-1px);
}

.single-rating-option input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: #007bff;
}

.single-rating-option input[type="radio"]:checked {
    accent-color: currentColor;
}

.single-rating-label {
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.single-rating-option:has(input[type="radio"]:checked) {
    background: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.single-rating-option:has(input[type="radio"]:checked) .single-rating-label.positive {
    color: #28a745;
    border-color: #28a745;
}

.single-rating-option:has(input[type="radio"]:checked) .single-rating-label.neutral {
    color: #6c757d;
    border-color: #6c757d;
}

.single-rating-option:has(input[type="radio"]:checked) .single-rating-label.negative {
    color: #dc3545;
    border-color: #dc3545;
}

.single-form-group textarea {
    width: 100%;
    padding: 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
    min-height: 120px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.single-form-group textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.single-form-group textarea::placeholder {
    color: #6c757d;
    font-style: italic;
}

/* Кнопка отправки */
.single-add-review-form .btn {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    border: none;
    color: #fff;
    padding: 12px 32px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.3);
}

.single-add-review-form .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.4);
}

.single-add-review-form .btn:active {
    transform: translateY(0);
}

/* Уведомления */
.single-review-notice,
.single-review-login-notice {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border: 1px solid #ffeaa7;
    color: #856404;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 24px;
    text-align: center;
}

.single-review-notice p,
.single-review-login-notice p {
    margin: 0;
    font-weight: 500;
}

.single-review-login-notice a {
    color: #007bff;
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease;
}

.single-review-login-notice a:hover {
    border-bottom-color: #007bff;
}

/* Алерты */
.alert {
    padding: 16px 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    font-weight: 500;
}

.alert-danger {
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.3);
    color: #721c24;
}

.alert-success {
    background: rgba(40, 167, 69, 0.1);
    border: 1px solid rgba(40, 167, 69, 0.3);
    color: #155724;
}

/* Адаптивность */
@media (max-width: 768px) {
    .single-rating-stats {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .single-rating-average {
        min-width: auto;
    }
    
    .single-rating-options {
        flex-direction: column;
        gap: 12px;
    }
    
    .single-rating-option {
        min-width: auto;
    }
    
    .single-review-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .single-add-review-form {
        padding: 20px;
    }
    
    .single-product-reviews-section > h3,
    .single-reviews-list > h3 {
        padding: 16px 20px;
        font-size: 1.2rem;
    }
    
    .single-review-item {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .single-rating-breakdown {
        gap: 8px;
    }
    
    .single-rating-item {
        padding: 10px 12px;
        gap: 12px;
    }
    
    .single-rating-icon {
        font-size: 1.2rem;
    }
    
    .single-form-group textarea {
        padding: 12px;
        min-height: 100px;
    }
    
    .single-add-review-form .btn {
        width: 100%;
        padding: 14px;
    }
}
