/* Public Reviews */
.reviews{ background:#fff; border:1px solid #e5e7eb; border-radius:14px; padding:14px; box-shadow:0 8px 20px rgba(0,0,0,.06); }
.reviews *{ box-sizing: border-box; }
.reviews-head{ display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:8px }
.reviews-head .filters{ display:flex; align-items:center; gap:8px; }
.reviews-head select{ border:1px solid #e5e7eb; border-radius:8px; padding:6px 8px }
.review-list{ display:flex; flex-direction:column; gap:12px }
.review{ border:1px solid #e5e7eb; border-radius:12px; padding:12px; background:#fff; overflow:hidden }
.review.is-pending{ opacity:.65 }
.review.voted-helpful .rv-vote[data-v="helpful"], .review.voted-unhelpful .rv-vote[data-v="unhelpful"]{ filter:saturate(1.1); box-shadow:0 2px 6px rgba(0,0,0,.08) }
.review-head{ display:flex; align-items:center; justify-content:space-between; gap:8px; flex-wrap:wrap }
.review-user{ color:#334155; font-weight:700 }
.review-time{ color:#94a3b8; font-weight:600; margin-left:6px }
.review-scores{ display:flex; align-items:center; gap:8px; color:#0f172a; font-weight:800; flex-wrap:wrap }
.review-scores .stars-static{ display:inline-flex; align-items:center; gap:2px }
.review-scores .score-num{ margin-left:6px }
.review-scores .stars-static i{ color:#f59e0b; font-size:1rem; margin-right:2px }
.review-scores .score-num{ background:#fef3c7; color:#92400e; border:1px solid #fde68a; border-radius:9999px; padding:2px 8px; font-weight:800; }
.review-body{ color:#334155; margin-top:6px; white-space:pre-wrap }
.review-body{ word-break:break-word; overflow-wrap:anywhere; }
.review-body.clamp{ display:-webkit-box; -webkit-line-clamp:5; -webkit-box-orient:vertical; overflow:hidden; }
.review-toggle{ appearance:none; background:#fff; border:1px solid #e5e7eb; color:#0f172a; border-radius:8px; padding:6px 10px; font-weight:700; cursor:pointer; margin-top:6px }
.review-body{ word-break:break-word; overflow-wrap:anywhere; }
.review-images{ display:flex; gap:8px; margin-top:6px }
.review-images img{ width:72px; height:72px; border-radius:8px; object-fit:cover; border:1px solid #e5e7eb }
.review-meta{ color:#64748b; font-size:.9rem; margin-top:4px; display:flex; align-items:center; gap:10px; flex-wrap:wrap }
.review-votes{ display:flex; align-items:center; gap:8px; margin-top:6px }
.review-votes button{ appearance:none; background:#fff; border:1px solid #e5e7eb; border-radius:9999px; padding:4px 8px; cursor:pointer; font-weight:800; }
.review-votes .rv-vote[data-v="helpful"]{ color:#166534; border-color:#bbf7d0; background:#ecfdf5 }
.review-votes .rv-vote[data-v="unhelpful"]{ color:#991b1b; border-color:#fecaca; background:#fef2f2 }
.review-votes .rv-clear{ color:#334155; border-color:#e2e8f0; background:#fff }
.review.voted-helpful .rv-vote[data-v="helpful"]{ filter: saturate(1.1); box-shadow: 0 2px 6px rgba(22,163,74,.12) }
.review.voted-unhelpful .rv-vote[data-v="unhelpful"]{ filter: saturate(1.1); box-shadow: 0 2px 6px rgba(185,28,28,.12) }
/* Score chips */
.rv-chips{ display:flex; flex-wrap:wrap; gap:6px; margin-top:6px }
.rv-subs{ display:flex; flex-wrap:wrap; gap:10px; margin-top:6px; color:#334155; }
.rv-sub{ display:inline-flex; align-items:center; gap:6px; }
.rv-sub .lbl{ font-weight:700; color:#0f172a }
.rv-sub .stars i{ color:#f59e0b }
.rv-chip{ display:inline-flex; align-items:center; gap:4px; padding:4px 8px; border:1px solid #e5e7eb; border-radius:9999px; background:#fff; color:#334155; font-size:.85rem }
.review-form{ background:#f8fafc; border:1px solid #e5e7eb; border-radius:12px; padding:12px; margin-top:12px }
.review-form .g2{ display:grid; grid-template-columns:repeat(2,1fr); gap:8px }
.review-form .g4{ display:grid; grid-template-columns:repeat(4,1fr); gap:8px }
.review-form textarea{ width:100%; min-height:120px; border:1px solid #e5e7eb; border-radius:8px; padding:8px 10px }
.review-form input[type="number"], .review-form select{ border:1px solid #e5e7eb; border-radius:8px; padding:6px 8px; width:100% }
.review-form .actions{ display:flex; gap:8px; align-items:center; justify-content:flex-end; margin-top:8px }
.review-toast{ position:fixed; right:16px; bottom:16px; z-index:10010; background:#0f172a; color:#fff; border-radius:10px; box-shadow:0 10px 24px rgba(0,0,0,.25) }
.review-toast .inner{ padding:10px 12px; }
.review-empty{ color:#6b7280; padding:8px; border:1px dashed #e5e7eb; border-radius:10px; text-align:center }
.toast-stack{position:fixed; right:16px; bottom:16px; z-index:10010; display:flex; flex-direction:column; gap:10px; align-items:flex-end}
.toast{display:flex; background:#fff; border:1px solid #e5e7eb; border-left:4px solid #16a34a; border-radius:10px; box-shadow:0 8px 24px rgba(0,0,0,.08); min-width:260px; transition:opacity .25s ease, transform .25s ease}
.toast .toast-body{display:flex; align-items:center; gap:10px; padding:10px 12px}
.toast .icon{font-weight:700; color:#16a34a}
.toast .msg{color:#0f172a; font-weight:600}
.toast .close{appearance:none; background:transparent; border:1px solid #e5e7eb; border-radius:6px; padding:2px 8px; line-height:1; color:#334155; cursor:pointer}
.toast .close:hover{ background:#f1f5f9 }
.toast.hide{opacity:0; transform: translateY(-6px)}
.toast.error{border-left-color:#ef4444; background:#fef2f2}
.toast.error .icon{color:#ef4444}
.toast.error .msg{color:#991b1b}
.toast.success{border-left-color:#16a34a; background:#ecfdf5}
.toast--success{ border-left-color:#22c55e; background:#ecfdf5 }
.toast--success .icon{ color:#16a34a }
.toast--success .msg{ color:#065f46 }
.toast--error{ border-left-color:#ef4444; background:#fef2f2 }
.toast--error .icon{ color:#dc2626 }
.toast--error .msg{ color:#991b1b }
.toast--info{ border-left-color:#0ea5e9; background:#eff6ff }
.toast--info .icon{ color:#0284c7 }
.toast--info .msg{ color:#0f172a }

/* Public review admin inline editor */
.rv-admin .rv-edit{ background:#f8fafc; border:1px solid #e5e7eb; border-radius:12px; padding:12px; margin-top:8px }
.rv-admin .rv-edit input, .rv-admin .rv-edit textarea, .rv-admin .rv-edit select{ width:100%; border:1px solid #e5e7eb; border-radius:8px; padding:8px 10px }
.rv-admin .rv-edit .btn{ border:1px solid #e5e7eb; }
.sr-only{ position:absolute !important; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0 }
/* Eligibility banner */
.review-eligibility{ margin-bottom:8px }
.review-eligibility .ok{ background:#ecfdf5; border:1px solid #a7f3d0; color:#065f46; border-radius:8px; padding:8px 10px; }
.review-eligibility .warn{ background:#fff7ed; border:1px solid #fed7aa; color:#7c2d12; border-radius:8px; padding:8px 10px; }

/* Rating widget (half stars) */
.rating{ display:inline-flex; align-items:center; gap:4px; user-select:none }
.rating .star-btn{ appearance:none; background:transparent; border:0; padding:4px; cursor:pointer; line-height:1; }
.rating .star-btn i{ font-size:20px; color:#d1d5db; transition: color .15s ease }
.rating-ready .star-btn:hover i, .rating-ready .star-btn:focus i{ color:#f59e0b }
.rating-ready .star-btn i.bi-star-fill{ color:#f59e0b }
.score-num{ font-weight:900; color:#0f172a }
.stars-static .bi{ color:#f59e0b; font-size:18px }

@media (max-width: 640px){ .review-form .g4{ grid-template-columns:repeat(2,1fr) } }

/* Review lightbox */
.rv-lightbox{ position:fixed; inset:0; display:none; z-index:10020 }
.rv-lightbox.open{ display:block }
.review.is-highlight{ animation: rvPulse 1s ease-in-out 0s 2; outline:2px solid #22c55e; background: #f0fdf4; }
@keyframes rvPulse{ 0%{ box-shadow:0 0 0 0 rgba(34,197,94,.4);} 70%{ box-shadow:0 0 0 8px rgba(34,197,94,0);} 100%{ box-shadow:0 0 0 0 rgba(34,197,94,0);} }
.review-pick{ margin:8px 0 }
.rv-pick-list{ display:grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap:8px }
@media (max-width: 640px){ .rv-pick-list{ grid-template-columns:1fr } }
.rv-pick-item{ display:flex; align-items:flex-start; gap:8px; border:1px solid #e2e8f0; border-radius:10px; padding:10px; background:#fff; box-shadow:0 1px 0 rgba(0,0,0,.02); min-height:66px }
.rv-pick-item:hover{ border-color:#94a3b8; box-shadow:0 2px 4px rgba(0,0,0,.04) }
.rv-pick-item input[type="radio"]{ accent-color:#16a34a; margin-top:3px }
.rv-pick-item.is-disabled{ opacity:.6; background:#f8fafc }
.rv-pick-item .rv-pick-text{ color:#0f172a }
.rv-pick-item .rv-ref{ color:#64748b; font-weight:700 }
.rv-pick-item .rv-pill{ margin-left:auto; background:#fef3c7; color:#92400e; border:1px solid #fde68a; border-radius:9999px; padding:2px 6px; font-size:.75rem; font-weight:700 }
.rv-lb-backdrop{ position:absolute; inset:0; background:rgba(0,0,0,.7) }
.rv-lb-content{ position:absolute; inset:10% 8%; background:#000; border-radius:10px; display:flex; align-items:center; justify-content:center }
.rv-lb-image{ max-width:100%; max-height:100% }
.rv-lb-close{ position:absolute; top:10px; right:12px; background:#fff; border:0; border-radius:6px; padding:6px 8px; cursor:pointer }
.rv-lb-arrow{ position:absolute; top:50%; transform:translateY(-50%); background:#fff; border:0; border-radius:50%; width:36px; height:36px; display:flex; align-items:center; justify-content:center; cursor:pointer }
.rv-lb-arrow.prev{ left:12px }
.rv-lb-arrow.next{ right:12px }

/* Admin toolbar in public review list */
.rv-admin{ display:flex; align-items:center; gap:6px; margin-top:6px }
.rv-admin .btn{ appearance:none; background:#fff; border:1px solid #e5e7eb; border-radius:8px; padding:4px 8px; cursor:pointer; font-weight:700 }
.rv-admin .badge{ display:inline-block; padding:2px 6px; border-radius:9999px; font-weight:800; font-size:.75rem }
.rv-admin .badge.badge--pending{ background:#eff6ff; color:#1d4ed8; border:1px solid #bfdbfe }
.rv-admin .badge.badge--approved{ background:#ecfdf5; color:#065f46; border:1px solid #a7f3d0 }
.rv-admin .badge.badge--rejected{ background:#fef2f2; color:#991b1b; border:1px solid #fecaca }

/* Corporate refinements for form */
.rating-grid{ display:grid; grid-template-columns:1fr 1fr 1fr; gap:12px }
.rating-grid .rg-col{ display:flex; flex-direction:column; gap:8px }
.review-form label{ display:flex; flex-direction:column; gap:6px; font-weight:700; color:#0f172a }
.rev-input{ border:1px solid #e5e7eb; border-radius:8px; padding:8px 10px; width:100% }
.rev-text{ border:1px solid #e5e7eb; border-radius:10px; padding:10px 12px; min-height:140px }
.rev-file-label{ display:inline-flex; align-items:center; gap:8px; border:1px dashed #e5e7eb; border-radius:10px; padding:10px 12px; background:#fff; cursor:pointer }
.rev-file-label input[type=file]{ display:none }
.rev-submit{ padding:10px 16px; font-weight:800; border-radius:10px }
.review-form .btn.btn-primary{ background: linear-gradient(90deg,#FF8A5B,#FFB185); border:0; color:#fff; box-shadow:0 8px 20px rgba(255,138,91,.25); }
.review-form .btn.btn-primary:hover{ filter: brightness(1.03); transform: translateY(-1px); }
@media (max-width: 640px){ .rating-grid{ grid-template-columns:1fr } }
/* drag state */
.file-row.is-drag .rev-file-label{ border-color:#94a3b8; background:#f8fafc }

/* File chips */
.file-chips{ display:flex; gap:8px; margin-top:8px; flex-wrap:wrap }
.file-chip{ display:inline-flex; align-items:center; gap:6px; padding:4px 6px; border:1px solid #e5e7eb; border-radius:9999px; background:#fff }
.file-chip img{ width:32px; height:32px; object-fit:cover; border-radius:50% }
.file-chip .x{ appearance:none; background:#fff; border:1px solid #e5e7eb; color:#991b1b; width:20px; height:20px; border-radius:50%; line-height:18px; text-align:center; padding:0; cursor:pointer }
.file-chip .x:hover{ background:#fee2e2; border-color:#fecaca }
