/* Стили для системы отзывов */

/* Контейнер отзывов */
.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Отдельный отзыв */
.review {
    background: #262837;
    border: 1px solid rgba(176, 71, 209, 0.2);
    border-radius: 0.625rem;
    padding: 1.5rem;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.review:hover {
    border-color: rgba(176, 71, 209, 0.5);
    box-shadow: 0 0 0.625rem rgba(176, 71, 209, 0.3);
}

/* Заголовок отзыва */
.review__header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

/* Аватар (круг с первой буквой) */
.review__avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 600;
    color: #fff;
    flex-shrink: 0;
}

/* Информация об авторе */
.review__info {
    flex: 1;
    min-width: 0;
}

.review__name-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.25rem;
    flex-wrap: wrap;
}

.review__name {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Бейдж "Ваш отзыв" */
.review__user-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    background: var(--color-primary);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    border-radius: 0.3125rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Рейтинг (звездочки) */
.review__rating {
    color: #f3d766;
    font-size: 18px;
    letter-spacing: 2px;
    margin-bottom: 0.25rem;
}

/* Дата отзыва */
.review__date {
    color: #888;
    font-size: 13px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Текст отзыва */
.review__text {
    line-height: 1.6;
    color: #ccc;
    margin-top: 0.5rem;
    word-wrap: break-word;
}

/* Email автора */
.review__email {
    display: block;
    font-size: 12px;
    color: #999;
    font-family: 'Courier New', monospace;
    margin-bottom: 0.5rem;
}

/* Форма добавления отзыва */
.review-form-container {
    background: #262837;
    border: 1px solid rgba(176, 71, 209, 0.2);
    border-radius: 0.625rem;
    padding: 2rem;
    margin-bottom: 2rem;
}

.review-form-title {
    font-size: 20px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 1.5rem;
}

.review-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* Поля формы */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    font-size: 14px;
    font-weight: 500;
    color: #ccc;
}

.form-label--required::after {
    content: ' *';
    color: #e06060;
}

.form-input,
.form-textarea {
    padding: 0.75rem 1rem;
    border: 1px solid rgba(176, 71, 209, 0.3);
    border-radius: 0.625rem;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.3s ease;
    background: #1b1d29;
    color: #fff;
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: #666;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0.625rem rgba(176, 71, 209, 0.3);
}

.form-textarea {
    min-height: 100px;
    resize: vertical;
}

/* Рейтинг (звездочки для выбора) */
.rating-stars {
    display: flex;
    gap: 0.5rem;
}

.rating-star {
    font-size: 28px;
    color: #444;
    cursor: pointer;
    transition: color 0.2s ease, transform 0.2s ease;
    user-select: none;
}

.rating-star:hover,
.rating-star.hover {
    color: #f3d766;
    transform: scale(1.1);
}

.rating-star.active {
    color: #f3d766;
}

/* Кнопка отправки */
.form-submit {
    padding: 0.875rem 2rem;
    background: var(--color-primary);
    color: #fff;
    border: none;
    border-radius: 1.5625rem;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    align-self: flex-start;
    box-shadow: 0 0 0.625rem rgba(176, 71, 209, 0.35);
}

.form-submit:hover {
    background: var(--primary-text-color);
    transform: translateY(-2px);
    box-shadow: 0 0 0.9375rem rgba(176, 71, 209, 0.5);
}

.form-submit:active {
    transform: translateY(0);
}

/* Сообщения */
.review-message {
    padding: 1rem 1.25rem;
    border-radius: 0.625rem;
    margin-bottom: 1.5rem;
    font-size: 14px;
    font-weight: 500;
    display: none;
}

.review-message--success {
    background: rgba(176, 71, 209, 0.15);
    color: #b047d1;
    border: 1px solid rgba(176, 71, 209, 0.3);
}

.review-message--error {
    background: rgba(224, 96, 96, 0.15);
    color: #e06060;
    border: 1px solid rgba(224, 96, 96, 0.3);
}

/* Ссылка "Все отзывы" */
.reviews-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--color-primary);
    color: #fff;
    text-decoration: none;
    border-radius: 1.5625rem;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-top: 1rem;
    box-shadow: 0 0 0.625rem rgba(176, 71, 209, 0.35);
}

.reviews-link:hover {
    background: var(--primary-text-color);
    transform: translateY(-2px);
    box-shadow: 0 0 0.9375rem rgba(176, 71, 209, 0.5);
}

/* Адаптивность */
@media (max-width: 768px) {
    .review {
        padding: 1rem;
    }

    .review__header {
        gap: 0.75rem;
    }

    .review__avatar {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .review__name {
        font-size: 15px;
    }

    .review__rating {
        font-size: 14px;
    }

    .review__text {
        font-size: 14px;
    }

    .review-form-container {
        padding: 1.5rem;
    }

    .review-form-title {
        font-size: 18px;
    }

    .form-submit {
        width: 100%;
    }

    .rating-star {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .review {
        padding: 0.875rem;
    }

    .review__avatar {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    .review__name {
        font-size: 14px;
    }

    .review__rating {
        font-size: 13px;
    }

    .review__date {
        font-size: 12px;
    }

    .review__text {
        font-size: 13px;
    }

    .review-form-container {
        padding: 1rem;
    }

    .rating-stars {
        gap: 0.25rem;
    }

    .rating-star {
        font-size: 22px;
    }
}

/* Скрытый input для рейтинга */
#review-rating {
    display: none;
}

/* Пустое состояние */
.reviews-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: #999;
    font-size: 16px;
}

/* Счетчик отзывов */
.reviews-counter {
    text-align: center;
    padding: 1.5rem 1rem;
    color: #888;
    font-size: 14px;
    margin-top: 1rem;
    border-top: 1px solid rgba(176, 71, 209, 0.2);
}

.reviews-counter span {
    color: #999;
}

/* Анимация появления */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.review {
    animation: fadeIn 0.4s ease;
}
