/* ============================================================
   Мнения за продукт (product_reviews / info / write) — стилове
   Използва --mainRed / --mainBlue от assets/css/app.css
   ============================================================ */

.pr_wrap { padding-bottom: 24px; }

/* ── Списък с мнения (product_reviews.php) ── */
.pr_list {
    list-style: none;
    margin: 0 0 20px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.pr_card {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    padding: 14px 16px;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.pr_card:hover {
    border-color: var(--mainRed);
    box-shadow: 0 2px 8px rgba(213, 31, 34, 0.12);
}
.pr_card_num {
    font-size: 12px;
    color: #999;
    min-width: 22px;
}
.pr_card_author {
    font-weight: bold;
    color: var(--mainBlue);
    text-decoration: none;
    flex: 1 1 160px;
}
.pr_card_author:hover { color: var(--mainRed); text-decoration: underline; }
.pr_card_rating { display: flex; align-items: center; gap: 6px; }
.pr_card_meta {
    display: flex;
    gap: 18px;
    font-size: 12px;
    color: #888;
    margin-left: auto;
}
.pr_empty {
    padding: 24px 16px;
    text-align: center;
    color: #888;
    background: #f9f9f9;
    border: 1px dashed #ddd;
    border-radius: 8px;
    margin-bottom: 20px;
}

/* ── Детайли за мнение (product_reviews_info.php) ── */
.pr_detail_card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    padding: 20px 24px;
    margin-bottom: 20px;
}
.pr_detail_head {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    border-bottom: 1px solid #eee;
    padding-bottom: 16px;
    margin-bottom: 16px;
}
.pr_detail_media img { border-radius: 6px; border: 1px solid #eee; }
.pr_detail_info p { margin: 0 0 6px; font-size: 14px; }
.pr_detail_info b { color: #333; }
.pr_detail_text {
    line-height: 1.7;
    font-size: 14px;
    color: #333;
    margin-bottom: 16px;
    white-space: pre-line;
}
.pr_detail_rating { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }

/* ── Форма "Напиши мнение" (product_reviews_write.php) ── */
.pr_form_card {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 24px 28px;
    margin-bottom: 20px;
}
.pr_form_head {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    margin-bottom: 20px;
}
.pr_form_head img { border-radius: 6px; border: 1px solid #eee; }
.pr_form_head p { margin: 0 0 6px; font-size: 14px; }
.pr_field { margin-bottom: 18px; }
.pr_field > label,
.pr_field > b {
    display: block;
    font-size: 13px;
    font-weight: bold;
    margin-bottom: 8px;
    color: #333;
}
.pr_field textarea {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
    resize: vertical;
    min-height: 140px;
    transition: border-color 0.2s;
}
.pr_field textarea:focus { border-color: var(--mainRed); outline: none; }
.pr_hint { font-size: 12px; color: #888; margin-top: 6px; }

/* Звезди-радио бутони за оценка */
.pr_star_rating {
    display: inline-flex;
    flex-direction: row-reverse;
    align-items: center;
    gap: 2px;
}
.pr_star_rating input { position: absolute; opacity: 0; width: 0; height: 0; }
.pr_star_rating label {
    cursor: pointer;
    font-size: 30px;
    line-height: 1;
    color: #ddd;
    transition: color 0.15s;
}
.pr_star_rating label:hover,
.pr_star_rating label:hover ~ label,
.pr_star_rating input:checked ~ label {
    color: var(--mainRed);
}
.pr_rating_row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.pr_rating_row span { font-size: 13px; color: #888; }

/* ── Съобщения за грешка/действия (общи) ── */
.pr_error {
    padding: 12px 16px;
    background: #fdecea;
    border: 1px solid #f5c6c2;
    border-radius: 4px;
    color: #c0392b;
    margin-bottom: 16px;
}
.pr_actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 8px;
}

@media (max-width: 600px) {
    .pr_card { flex-direction: column; align-items: flex-start; }
    .pr_card_meta { margin-left: 0; }
    .pr_detail_head,
    .pr_form_head { flex-direction: column; }
    .pr_actions { justify-content: flex-start; }
}
