/* ===== Compact mode (layout плашка) ===== */

.review-prompt-widget {
    margin-bottom: 16px;
}

.review-prompt-inner {
    display: flex;
    align-items: center;
    gap: 14px;
    background: linear-gradient(135deg, #fffbe6 0%, #fff8e1 100%);
    border: 1px solid #ffe082;
    border-radius: 10px;
    padding: 14px 18px;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
}

.review-prompt-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffca28;
    border-radius: 50%;
    color: #fff;
    font-size: 18px;
}

.review-prompt-product {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.review-prompt-img-link { flex-shrink: 0; }

.review-prompt-img {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #f0e6c0;
}

.review-prompt-info { min-width: 0; }

.review-prompt-title {
    font-size: 13px;
    font-weight: 600;
    color: #795548;
    margin-bottom: 2px;
}

.review-prompt-name a {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.review-prompt-name a:hover {
    color: #1976d2;
    text-decoration: underline;
}

.review-prompt-count {
    font-size: 12px;
    color: #888;
    margin-top: 2px;
}

.review-prompt-bonus {
    font-size: 12px;
    color: #e65100;
    font-weight: 500;
    margin-top: 2px;
}

.review-prompt-bonus .fas { color: #ff9800; }

.review-prompt-actions {
    flex-shrink: 0;
    display: flex;
    gap: 8px;
    align-items: center;
}

.review-prompt-dismiss-btn,
.review-prompt-rate-btn {
    font-size: 13px;
}

@media (max-width: 767px) {
    .review-prompt-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 12px 14px;
    }
    .review-prompt-icon { display: none; }
    .review-prompt-product { width: 100%; }
    .review-prompt-actions {
        width: 100%;
        justify-content: flex-start;
    }
}

.review-prompt-widget.hiding {
    transition: opacity 0.3s ease, max-height 0.3s ease;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    margin-bottom: 0;
    padding: 0;
}

/* ===== Full mode (страница Мои отзывы) ===== */

.rp-eligible-section {
    margin-bottom: 24px;
}

.rp-section-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
    color: #333;
}

.rp-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ff9800;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    min-width: 22px;
    height: 22px;
    border-radius: 11px;
    padding: 0 7px;
    margin-left: 6px;
    vertical-align: middle;
}

.rp-eligible-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rp-eligible-card {
    background: #fff;
    border-radius: 10px;
    border: 1px solid #eee;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.rp-eligible-card:hover {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.rp-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    gap: 12px;
}

.rp-card-product {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
    min-width: 0;
}

.rp-card-img-link { flex-shrink: 0; }

.rp-card-img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #f0f0f0;
}

.rp-card-info {
    min-width: 0;
    flex: 1;
}

.rp-card-name a {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rp-card-name a:hover {
    color: #1976d2;
}

.rp-card-meta {
    font-size: 12px;
    color: #999;
    margin-top: 3px;
}

.rp-card-bonus {
    font-size: 12px;
    color: #e65100;
    font-weight: 500;
    margin-top: 3px;
}

.rp-card-bonus .fas { color: #ff9800; }

.rp-card-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
    align-items: center;
}

.rp-dismiss-btn {
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 12px;
    color: #aaa;
    border-color: #ddd;
}

.rp-dismiss-btn:hover {
    color: #e53935;
    border-color: #e53935;
}

@media (max-width: 575px) {
    .rp-card-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .rp-card-actions {
        width: 100%;
        margin-top: 8px;
    }
    .rp-card-actions .btn { flex: 1; }
    .rp-dismiss-btn { flex: 0 !important; width: 36px; }
}

/* ===== Раскрывающаяся форма ===== */

.rp-form-collapse {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
}

.rp-form-collapse.open {
    max-height: 800px;
}

.rp-review-form {
    padding: 0 18px 18px;
    border-top: 1px solid #f0f0f0;
}

.rp-form-group {
    margin-top: 16px;
}

.rp-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    margin-bottom: 6px;
}

/* ===== Звёзды с подписями ===== */

.rp-star-rating {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    user-select: none;
}

.rp-star {
    font-size: 28px;
    cursor: pointer;
    color: #ddd;
    transition: color 0.15s, transform 0.15s;
    line-height: 1;
}

.rp-star:hover,
.rp-star.hover {
    transform: scale(1.15);
}

.rp-star.active {
    color: #f5a623;
}

.rp-star.active i {
    font-weight: 900;
}

.rp-rating-label {
    font-size: 13px;
    color: #888;
    margin-left: 8px;
    min-width: 70px;
    transition: color 0.2s;
}

.rp-rating-label.filled {
    color: #f5a623;
    font-weight: 500;
}

/* ===== Текст отзыва ===== */

.rp-textarea {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 14px;
    resize: vertical;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.rp-textarea:focus {
    border-color: #ffca28;
    box-shadow: 0 0 0 3px rgba(255, 202, 40, 0.15);
    outline: none;
}

/* ===== Drag-and-drop зона ===== */

.rp-media-dropzone {
    position: relative;
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.rp-media-dropzone:hover,
.rp-media-dropzone.dragover {
    border-color: #ffca28;
    background: #fffef5;
}

.rp-dropzone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: #999;
    font-size: 13px;
    pointer-events: none;
}

.rp-dropzone-content i {
    font-size: 28px;
    color: #ccc;
}

.rp-dropzone-content b {
    color: #1976d2;
    text-decoration: underline;
}

.rp-media-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.rp-media-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.rp-preview-item {
    position: relative;
    width: 72px;
    height: 72px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #eee;
}

.rp-preview-item img,
.rp-preview-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rp-preview-remove {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 20px;
    height: 20px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
}

/* ===== Чек-бокс ===== */

.rp-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.rp-checkbox input[type="checkbox"] {
    margin-top: 3px;
    width: 16px;
    height: 16px;
    accent-color: #4caf50;
    flex-shrink: 0;
}

.rp-checkbox label {
    font-size: 13px;
    color: #666;
    cursor: pointer;
    margin: 0;
    line-height: 1.4;
}

.rp-checkbox a {
    color: #1976d2;
}

/* ===== Футер формы ===== */

.rp-form-footer {
    margin-top: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.rp-submit-btn {
    font-size: 14px;
    padding: 8px 20px;
    border-radius: 8px;
}

.rp-bonus-hint {
    font-size: 12px;
    color: #888;
}

.rp-bonus-hint .fas {
    color: #ff9800;
}

/* ===== Форма редактирования (переиспользуем стили) ===== */

.rp-edit-form .rp-form-group,
.rp-edit-form .rp-star-rating,
.rp-edit-form .rp-textarea,
.rp-edit-form .rp-media-dropzone,
.rp-edit-form .rp-checkbox,
.rp-edit-form .rp-form-footer {
    /* наследуют стили выше */
}

.rp-edit-wrapper {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
}

.rp-edit-wrapper.open {
    max-height: 800px;
}

/* ===== Валидация полей ===== */

.rp-star-rating-error {
    padding: 4px 8px;
    border-radius: 6px;
    background: #fff5f5;
    border: 1px solid #e53935;
    animation: rp-shake 0.4s ease;
}

.rp-field-error {
    color: #e53935;
    font-size: 12px;
    margin-top: 4px;
    font-weight: 500;
}

@keyframes rp-shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-4px); }
    40%, 80% { transform: translateX(4px); }
}

/* ===== Анимация скрытия карточки ===== */

.rp-eligible-card.hiding {
    transition: opacity 0.3s ease, max-height 0.3s ease, margin 0.3s ease, padding 0.3s ease;
    opacity: 0;
    max-height: 0 !important;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: none;
}
