/*
 * Own product reviews (2026-11): star display (cards, product page, email review page), product-page
 * reviews section and form. Own rv-* styles: /css/app.css is a static Tailwind build.
 */

/* Stars: grey row + gold row clipped to the average (supports 4.5 etc.) */
.rv-stars { position: relative; display: inline-block; font-size: 16px; line-height: 1; letter-spacing: 1px; color: #d1d5db; white-space: nowrap; vertical-align: middle; }
.rv-stars::before { content: '★★★★★'; }
.rv-stars > span { position: absolute; left: 0; top: 0; overflow: hidden; color: #f59e0b; white-space: nowrap; }
.rv-stars > span::before { content: '★★★★★'; }

/* Product cards */
.rv-card-stars { display: flex; align-items: center; gap: 5px; font-size: 13px; color: #374151; margin: 0 0 6px; min-height: 0; }
.rv-card-stars:empty { display: none; }
.rv-card-stars .rv-stars { font-size: 14px; }
.rv-card-stars b { font-weight: 700; }
.rv-card-stars small { color: #6b7280; }

/* Product page: line under the title */
.rv-head-line { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: #374151; margin: 0 0 10px; text-decoration: none; }
.rv-head-line b { font-weight: 700; }
.rv-head-line span.rv-muted { color: #6b7280; }
.rv-head-line:hover .rv-muted { text-decoration: underline; }

/* Product page section */
.rv-section { background: #fff; border-radius: 10px; box-shadow: 0 1px 3px rgba(0,0,0,.08); padding: 20px; margin-top: 24px; }
@media (min-width: 1024px) { .rv-section { padding: 32px; } }
.rv-section h2 { font-size: 22px; font-weight: 800; margin: 0 0 16px; color: #111827; }
.rv-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; }
@media (min-width: 1024px) { .rv-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); } }
.rv-summary { display: flex; gap: 20px; align-items: center; background: #f9fafb; border-radius: 10px; padding: 16px 18px; margin-bottom: 18px; flex-wrap: wrap; }
.rv-avg { text-align: center; min-width: 110px; }
.rv-avg b { display: block; font-size: 40px; line-height: 1; font-weight: 800; color: #111827; }
.rv-avg .rv-stars { font-size: 20px; margin: 6px 0 4px; }
.rv-avg small { display: block; font-size: 12px; color: #6b7280; }
.rv-dist { flex: 1; min-width: 200px; }
.rv-dist-row { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #374151; margin: 3px 0; }
.rv-dist-row span:first-child { width: 28px; white-space: nowrap; }
.rv-dist-bar { flex: 1; height: 10px; background: #e5e7eb; border-radius: 9999px; overflow: hidden; }
.rv-dist-bar i { display: block; height: 100%; background: #f59e0b; border-radius: 9999px; }
.rv-dist-row span:last-child { width: 38px; text-align: right; color: #6b7280; }
.rv-empty { color: #6b7280; font-size: 15px; padding: 8px 0 16px; }

.rv-item { border-bottom: 1px solid #f3f4f6; padding: 14px 0; }
.rv-item:last-child { border-bottom: 0; }
.rv-item-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; flex-wrap: wrap; }
.rv-item-name { font-weight: 700; color: #111827; font-size: 15px; }
.rv-verified { display: inline-block; font-size: 12px; font-weight: 600; color: #15803d; margin-left: 6px; }
.rv-item-date { font-size: 12px; color: #9ca3af; margin-left: 6px; }
.rv-item-body { margin: 8px 0 0; font-size: 15px; line-height: 1.55; color: #374151; white-space: pre-line; }
.rv-item-imgs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.rv-item-imgs a { display: block; width: 76px; height: 76px; border-radius: 8px; overflow: hidden; background: #f3f4f6; }
.rv-item-imgs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rv-reply { margin-top: 10px; background: #f9fafb; border-left: 3px solid #ea580c; padding: 8px 12px; font-size: 14px; color: #374151; border-radius: 0 6px 6px 0; }
.rv-reply b { color: #111827; }
.rv-more { display: inline-block; margin-top: 12px; background: #fff; border: 1px solid #d1d5db; border-radius: 8px; padding: 9px 16px; font-weight: 600; cursor: pointer; }

/* Form (product page + email review page) */
.rv-form { background: #f9fafb; border-radius: 10px; padding: 18px; }
.rv-form h3 { font-size: 17px; font-weight: 800; margin: 0 0 4px; color: #111827; }
.rv-form p.rv-note { font-size: 13px; color: #6b7280; margin: 0 0 12px; }
.rv-pick { display: inline-flex; flex-direction: row-reverse; gap: 2px; margin: 2px 0 10px; }
.rv-pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
/* more specific than ".rv-field label" (the star labels sit inside a .rv-field) */
.rv-field .rv-pick label { display: inline-block; font-size: 34px; line-height: 1; font-weight: 400; color: #d1d5db; cursor: pointer; padding: 0 1px; margin: 0; }
.rv-field .rv-pick input:checked ~ label, .rv-field .rv-pick label:hover, .rv-field .rv-pick label:hover ~ label { color: #f59e0b; }
.rv-pick input:focus-visible + label { outline: 2px solid #ea580c; border-radius: 4px; }
.rv-field { margin-bottom: 10px; }
.rv-field label { display: block; font-size: 13px; font-weight: 600; color: #374151; margin-bottom: 3px; }
.rv-field input[type=text], .rv-field input[type=email], .rv-field input[type=tel], .rv-field textarea { width: 100%; border: 1px solid #d1d5db; border-radius: 8px; padding: 9px 11px; font-size: 16px; background: #fff; color: #111827; }
.rv-field textarea { min-height: 110px; resize: vertical; }
.rv-field input:focus, .rv-field textarea:focus { outline: none; border-color: #ea580c; box-shadow: 0 0 0 2px rgba(234,88,12,.15); }
.rv-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
@media (max-width: 480px) { .rv-two { grid-template-columns: minmax(0, 1fr); } }
.rv-req { color: #dc2626; }
.rv-files { font-size: 13px; }
.rv-thumbs { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.rv-thumbs img { width: 56px; height: 56px; object-fit: cover; border-radius: 6px; }
.rv-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.rv-submit { width: 100%; background: #111827; color: #fff; border: 0; border-radius: 8px; padding: 12px; font-size: 15px; font-weight: 800; cursor: pointer; margin-top: 4px; }
.rv-submit:disabled { background: #9ca3af; cursor: wait; }
.rv-msg { display: none; margin-top: 10px; border-radius: 8px; padding: 9px 12px; font-size: 14px; }
.rv-msg.rv-ok { display: block; background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.rv-msg.rv-err { display: block; background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
