/**
 * RatePopup — стили под Aspro Max
 * Цветовая схема: #2f333a (основной), Montserrat, белый фон
 */

/* Затемнение */
.rate-popup-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: rateFadeIn 0.3s ease;
}

@keyframes rateFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes rateSlideUp {
    from { transform: translateY(30px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

/* Модалка */
.rate-popup {
    background: #fff;
    border-radius: 12px;
    width: 480px;
    max-width: 94vw;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: rateSlideUp 0.3s ease;
    font-family: 'Montserrat', sans-serif;
}

/* Шапка */
.rate-popup__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 0;
}

.rate-popup__title {
    font-size: 20px;
    font-weight: 700;
    color: #2f333a;
}

.rate-popup__close {
    background: none;
    border: none;
    font-size: 22px;
    color: #999;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: color 0.2s, background 0.2s;
}

.rate-popup__close:hover {
    color: #2f333a;
    background: #f0f0f0;
}

/* Тело */
.rate-popup__body {
    padding: 16px 24px 24px;
}

.rate-popup__subtitle {
    font-size: 14px;
    color: #666;
    margin: 0 0 16px;
    line-height: 1.4;
}

/* Список товаров */
.rate-popup__list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.rate-popup__item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border: 1px solid #eee;
    border-radius: 8px;
    transition: border-color 0.2s;
}

.rate-popup__item:hover {
    border-color: #ddd;
}

.rate-popup__item-img {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
    background: #f5f5f5;
}

.rate-popup__item-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.rate-popup__item-info {
    flex: 1;
    min-width: 0;
}

.rate-popup__item-name {
    font-size: 13px;
    font-weight: 500;
    color: #333;
    line-height: 1.3;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Звёзды */
.rate-popup__stars {
    display: flex;
    gap: 3px;
    direction: ltr;
}

.rate-popup__star {
    font-size: 22px;
    color: #ddd;
    cursor: pointer;
    transition: color 0.15s, transform 0.15s;
    user-select: none;
    line-height: 1;
}

.rate-popup__star:hover {
    transform: scale(1.15);
}

.rate-popup__star.active {
    color: #2f333a;
}

.rate-popup__star.hover {
    color: #4a4f57;
}

/* Кнопка */
.rate-popup__btn {
    display: block;
    width: 100%;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s, opacity 0.2s;
}

.rate-popup__btn--submit {
    background: #2f333a;
    color: #fff;
}

.rate-popup__btn--submit:not(:disabled):hover {
    background: #1f232a;
}

.rate-popup__btn--submit:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.rate-popup__btn--success {
    background: #27ae60;
    color: #fff;
    cursor: default;
}
