/* ==========================================================
   Review photos (up to 3, each slot has its own progress bar)
   Loaded on the order page and the product page. No inline styles (CSP).
   ========================================================== */

.rp { margin: 12px 0 14px; }
.rp-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 6px; }

.rp-slot {
    display: flex; flex-direction: column; gap: 6px; min-width: 0;
    padding: 8px; border-radius: 14px;
    background: var(--glass-strong); border: 1px solid var(--line);
}
.rp-title { font-size: .76rem; font-weight: 700; color: var(--muted); line-height: 1.2; }

.rp-box {
    position: relative; display: block; width: 100%; aspect-ratio: 1 / 1; overflow: hidden; cursor: pointer;
    border-radius: 10px; border: 2px dashed rgba(79, 70, 229, .35); background: rgba(79, 70, 229, .05);
    transition: border-color .15s ease, background .15s ease;
}
.rp-box:hover, .rp-box:focus-within { border-color: var(--primary); background: rgba(79, 70, 229, .10); }
.rp-slot.is-done .rp-box { border-style: solid; border-color: rgba(4, 120, 87, .45); }
.rp-slot.is-busy .rp-box { cursor: progress; }
.rp-slot.is-error .rp-box { border-color: var(--danger); }

.rp-file { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.rp-slot.is-busy .rp-file { pointer-events: none; }

.rp-empty {
    position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 4px; padding: 4px; text-align: center; color: var(--primary); font-size: .72rem; font-weight: 700; line-height: 1.25;
    pointer-events: none;
}
.rp-empty .icon { width: 1.5rem; height: 1.5rem; }
.rp-slot.has-img .rp-empty { display: none; }

.rp-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.rp-img[hidden] { display: none; }
.rp-slot.is-busy .rp-img { opacity: .55; }

.rp-bar { height: 7px; overflow: hidden; border-radius: 7px; background: var(--line); }
.rp-bar[hidden] { display: none; }
.rp-fill { display: block; width: 100%; height: 100%; border-radius: 7px; background: var(--primary-grad); transform: scaleX(0); transform-origin: left center; transition: transform .12s linear; }
.rp-slot.is-error .rp-fill { background: var(--danger); }

.rp-msg { margin: 0; min-height: 1.2em; font-size: .72rem; line-height: 1.3; color: var(--muted); overflow-wrap: anywhere; }
.rp-slot.is-done .rp-msg { color: var(--ok); font-weight: 700; }
.rp-slot.is-error .rp-msg { color: var(--danger); font-weight: 700; }

.rp-x {
    display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-height: 30px; padding: 0 8px;
    font: inherit; font-size: .74rem; font-weight: 700; color: var(--danger); cursor: pointer;
    background: rgba(225, 29, 72, .10); border: 0; border-radius: 9px;
}
.rp-x[hidden] { display: none; }
.rp-x .icon { width: .95em; height: .95em; flex: none; }
.rp-x:hover { background: rgba(225, 29, 72, .18); }

@media (min-width: 99999px) {
    .rp-grid { gap: 12px; }
    .rp-slot { padding: 10px; }
    .rp-title { font-size: .82rem; }
    .rp-msg, .rp-x { font-size: .8rem; }
}

/* Photos shown under a saved review (product page + locked review on the order page) */
.rp-thumbs { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 10px 0 0; padding: 0; }
.rp-thumbs li { width: 72px; height: 72px; }
.rp-thumbs a { display: block; width: 100%; height: 100%; overflow: hidden; border-radius: 10px; border: 1px solid var(--line); }
.rp-thumbs img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* Full screen viewer for a tapped review photo */
.rp-lb {
    position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center;
    padding: 16px; background: rgba(2, 6, 23, .88);
}
.rp-lb[hidden] { display: none; }
.rp-lb-img { display: block; max-width: 100%; max-height: 100%; border-radius: 12px; object-fit: contain; }
.rp-lb-x {
    position: absolute; top: max(12px, env(safe-area-inset-top)); right: 12px; display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; color: #fff; cursor: pointer; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .18);
}
.rp-lb-x .icon { width: 1.4rem; height: 1.4rem; }


/* ==========================================================
   Customer's own review (read only) + conversation with the admin
   ========================================================== */

.rv-card { padding: 14px; border-radius: 16px; background: var(--glass-strong); border: 1px solid var(--line); }
.rv-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.rv-card-date { font-size: .78rem; white-space: nowrap; }
.rv-card .rv-text { margin: 10px 0 0; }

.rv-actions { display: flex; align-items: center; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.rv-act-form { margin: 0; }
.rv-act { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; }
.rv-act .icon { width: 1.05em; height: 1.05em; flex: none; }
.rv-act-del { color: var(--danger); border-color: rgba(225, 29, 72, .35); }
.rv-act-del:hover { background: rgba(225, 29, 72, .10); }

.rv-wait { display: flex; align-items: center; gap: 8px; margin: 10px 2px 0; font-size: .86rem; line-height: 1.45; }
.rv-wait .icon { width: 1.1em; height: 1.1em; flex: none; }

.rv-editing { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; padding: 8px 12px; font-size: .88rem; font-weight: 700; color: var(--primary); border-radius: 12px; background: rgba(79, 70, 229, .09); }
.rv-editing .icon { width: 1.05em; height: 1.05em; flex: none; }
.rv-cancel { margin-top: 8px; }

/* Conversation */
.rvt { margin-top: 12px; padding: 14px; border-radius: 16px; background: rgba(79, 70, 229, .06); border: 1px solid rgba(79, 70, 229, .16); }
.rvt.is-new { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79, 70, 229, .12); }
.rvt-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.rvt-title { display: flex; align-items: center; gap: 8px; margin: 0; font-size: .95rem; font-weight: 800; }
.rvt-title .icon { width: 1.15em; height: 1.15em; color: var(--primary); flex: none; }
.rvt-new { padding: 2px 10px; font-size: .74rem; font-weight: 800; color: #fff; border-radius: 999px; background: var(--primary-grad); }

.rvt-list { display: flex; flex-direction: column; gap: 10px; list-style: none; margin: 0; padding: 0; }
.rvt-msg { max-width: 92%; padding: 10px 12px; border-radius: 14px; }
.rvt-who { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 4px; font-size: .82rem; }
.rvt-who small { font-size: .72rem; white-space: nowrap; }
.rvt-body { margin: 0; font-size: .93rem; line-height: 1.55; overflow-wrap: anywhere; }
.rvt-admin { align-self: flex-start; background: var(--glass-strong); border: 1px solid var(--line); border-top-left-radius: 4px; }
.rvt-admin .rvt-who strong { color: var(--primary); }
.rvt-me { align-self: flex-end; background: rgba(4, 120, 87, .10); border: 1px solid rgba(4, 120, 87, .22); border-top-right-radius: 4px; }
.rvt-me .rvt-who strong { color: var(--ok); }

.rvt-form { display: grid; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.rvt-form .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.rvt-form .btn .icon { width: 1.1em; height: 1.1em; flex: none; }
