/* Модальное окно для оценивания товаров */
.rating-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
}

.rating-modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.rating-modal__content {
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.rating-modal__content--single {
    max-width: 600px;
}

.rating-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 32px;
    border-bottom: 1px solid #E0E0E0;
}

.rating-modal__title {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.rating-modal__close,
.rating-modal__back {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

.rating-modal__close:hover,
.rating-modal__back:hover {
    background: #F5F5F5;
}

.rating-modal__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 32px;
}

.rating-item {
    background: #F8F8F8;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.rating-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.rating-item__image {
    width: 100%;
    height: 160px;
    overflow: hidden;
}

.rating-item__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rating-item__content {
    padding: 16px;
}

.rating-item__code {
    font-size: 12px;
    color: #666;
    margin-bottom: 4px;
}

.rating-item__name {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 12px;
}

.rating-item__stars {
    display: flex;
    gap: 4px;
}

.rating-star {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: transform 0.2s ease;
}

.rating-star:hover {
    transform: scale(1.1);
}

.rating-star svg path {
    transition: fill 0.2s ease;
}

.rating-star.active svg path,
.rating-star:hover svg path {
    fill: #FFD700;
}

/* Модальное окно для отдельной оценки */
.single-rating {
    padding: 32px;
    text-align: center;
}

.single-rating__content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.single-rating__code {
    font-size: 14px;
    color: #666;
    margin-bottom: 4px;
}

.single-rating__name {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin-bottom: 16px;
}

.single-rating__stars {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    justify-content: center;
}

.rating-star--large {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: transform 0.2s ease;
}

.rating-star--large:hover {
    transform: scale(1.1);
}

.rating-star--large svg path {
    transition: fill 0.2s ease;
}

.rating-star--large.active svg path,
.rating-star--large:hover svg path {
    fill: #FFD700;
}

.single-rating__prompt {
    font-size: 16px;
    color: #666;
    margin-bottom: 16px;
}

.single-rating__textarea {
    width: 100%;
    max-width: 400px;
    min-height: 120px;
    border: 1px solid #E0E0E0;
    border-radius: 8px;
    padding: 12px;
    font-size: 14px;
    resize: vertical;
    margin-bottom: 24px;
}

.single-rating__textarea:focus {
    outline: none;
    border-color: #7BB3BC;
}

.single-rating__submit {
    background: #7BB3BC;
    color: white;
    border: none;
    border-radius: 40px;
    padding: 14px 40px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: 100%;
    max-width: 400px;
}

.single-rating__submit:hover {
    background: #6ba3ac;
}

/* Адаптивность */
@media (max-width: 768px) {
    .rating-modal__grid {
        grid-template-columns: repeat(2, 1fr);
        padding: 20px;
        gap: 16px;
    }
    
    .single-rating {
        flex-direction: column;
        padding: 20px;
        gap: 20px;
    }
    
    .single-rating__image {
        width: 100%;
        height: 200px;
    }
}

@media (max-width: 480px) {
    .rating-modal__grid {
        grid-template-columns: 1fr;
    }
}
