/* assets/css/ik-reviews.css — Reseñas v2 (assets/js/ik-reviews.js): resumen con distribución, filtros, tarjetas con fotos,
   "útil", respuesta del vendedor, formulario (estrellas con etiqueta, criterios, fotos) y reportes. Lo usan la ficha de
   producto, el área del comprador (buyer/reviews), el panel del vendedor (seller/reviews) y la moderación (admin/reviews). */
.ikr { --r-ink: #1D2530; --r-mute: #6b6358; --r-line: #eadfce; --r-soft: #faf6f0; --r-acc: #AB733C; --r-star: #e0a13a; --r-ok: #1f8a5b; --r-err: #b3261e;
  color: var(--r-ink); font-family: Inter, system-ui, sans-serif; min-width: 0; }
.ikr *, .ikr-ov * { box-sizing: border-box; }
.ikr [hidden], .ikr-ov [hidden], .ikr-more[hidden] { display: none !important; }
.ikr button, .ikr-ov button { font: inherit; }
.ikr .material-symbols-outlined, .ikr-ov .material-symbols-outlined { font-size: 18px; vertical-align: middle; }

/* estrellas (fondo con --r: 0–5) */
.ikr-stars { --r: 0; --sz: 16px; display: inline-block; position: relative; font-size: var(--sz); line-height: 1; letter-spacing: 1px; color: #d9cfc2; white-space: nowrap; }
.ikr-stars::before { content: '★★★★★'; }
.ikr-stars::after { content: '★★★★★'; position: absolute; left: 0; top: 0; width: calc(var(--r) / 5 * 100%); overflow: hidden; color: var(--r-star); }

/* resumen */
.ikr-top { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 18px; align-items: start; margin-bottom: 16px; }
.ikr-sum { border: 1px solid var(--r-line); border-radius: 16px; padding: 18px; background: #fff; }
.ikr-sum-score { display: flex; align-items: center; gap: 12px; }
.ikr-sum-score b { font: 800 42px/1 Manrope, Inter, sans-serif; letter-spacing: -.02em; }
.ikr-sum-score small { display: block; color: var(--r-mute); font-size: 12.5px; margin-top: 4px; }
.ikr-dist { display: grid; gap: 6px; margin-top: 14px; }
.ikr-bar { display: grid; grid-template-columns: 34px minmax(0, 1fr) 34px; align-items: center; gap: 8px; padding: 3px 6px; margin: 0 -6px; border: 0; background: none; border-radius: 8px; cursor: pointer; color: var(--r-ink); font-size: 12.5px; text-align: left; }
.ikr-bar:hover, .ikr-bar.is-on { background: var(--r-soft); }
.ikr-bar.is-on { box-shadow: inset 0 0 0 1px var(--r-acc); }
.ikr-bar[disabled] { cursor: default; opacity: .55; }
.ikr-bar i { display: block; height: 8px; border-radius: 99px; background: #efe7db; overflow: hidden; }
.ikr-bar i::before { content: ''; display: block; height: 100%; width: var(--w, 0%); background: var(--r-star); border-radius: inherit; }
.ikr-bar span:last-child { text-align: right; color: var(--r-mute); font-variant-numeric: tabular-nums; }
.ikr-facts { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--r-line); font-size: 12.5px; color: var(--r-mute); }
.ikr-facts span { display: inline-flex; align-items: center; gap: 4px; }
.ikr-facts .material-symbols-outlined { font-size: 16px; color: var(--r-ok); }
.ikr-crit { display: grid; gap: 6px; margin-top: 12px; }
.ikr-crit div { display: grid; grid-template-columns: minmax(0, 1fr) 70px 28px; gap: 8px; align-items: center; font-size: 12px; color: var(--r-mute); }
.ikr-crit i { display: block; height: 5px; border-radius: 99px; background: #efe7db; overflow: hidden; }
.ikr-crit i::before { content: ''; display: block; height: 100%; width: var(--w, 0%); background: var(--r-ink); }
.ikr-crit b { color: var(--r-ink); text-align: right; font-variant-numeric: tabular-nums; }

/* llamada a la acción */
.ikr-cta { border: 1px solid var(--r-line); border-radius: 16px; padding: 16px 18px; background: var(--r-soft); display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.ikr-cta > .material-symbols-outlined { font-size: 26px; color: var(--r-acc); }
.ikr-cta-txt { flex: 1 1 220px; min-width: 0; }
.ikr-cta-txt b { display: block; font-size: 14.5px; }
.ikr-cta-txt p { margin: 3px 0 0; font-size: 13px; color: var(--r-mute); line-height: 1.45; }
.ikr-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--r-line); background: #fff; color: var(--r-ink); font-weight: 700; font-size: 13px; cursor: pointer; text-decoration: none; white-space: nowrap; }
.ikr-btn:hover { border-color: #d6c4a8; }
.ikr-btn--solid { background: var(--r-ink); border-color: var(--r-ink); color: #fff; }
.ikr-btn--solid:hover { background: #2b3644; }
.ikr-btn--acc { background: var(--r-acc); border-color: var(--r-acc); color: #fff; }
.ikr-btn--sm { min-height: 30px; padding: 0 10px; font-size: 12px; border-radius: 8px; }
.ikr-btn--ghost { background: none; border-color: transparent; }
.ikr-btn--danger { color: var(--r-err); }
.ikr-btn[disabled], .ikr-btn.is-loading { opacity: .6; pointer-events: none; }

/* filtros y orden */
.ikr-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 4px 0 14px; }
.ikr-chip { display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--r-line); background: #fff; font-size: 12.5px; font-weight: 600; color: var(--r-ink); cursor: pointer; white-space: nowrap; }
.ikr-chip.is-on { background: var(--r-ink); border-color: var(--r-ink); color: #fff; }
.ikr-chip .material-symbols-outlined { font-size: 16px; }
.ikr-sort { margin-left: auto; height: 32px; border: 1px solid var(--r-line); border-radius: 10px; padding: 0 10px; font-size: 12.5px; background: #fff; color: var(--r-ink); max-width: 100%; }
.ikr-count { font-size: 12.5px; color: var(--r-mute); width: 100%; margin-top: -2px; }

/* tarjetas */
.ikr-list { display: grid; gap: 12px; }
.ikr-card { border: 1px solid var(--r-line); border-radius: 14px; padding: 14px 16px; background: #fff; min-width: 0; }
.ikr-card.is-mine { border-color: #d9b98f; box-shadow: 0 0 0 3px #f6ecdf; }
.ikr-card.is-hidden { background: #fbf7f7; border-style: dashed; }
.ikr-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; color: var(--r-mute); }
.ikr-av { width: 30px; height: 30px; border-radius: 50%; display: inline-grid; place-items: center; background: #efe5d6; color: #7a5a30; font-weight: 800; font-size: 12px; flex: none; }
.ikr-name { font-weight: 700; color: var(--r-ink); font-size: 13.5px; display: inline-flex; align-items: center; gap: 5px; }
.ikr-name img { width: 18px; height: 12px; border-radius: 2px; object-fit: cover; }
.ikr-badge { display: inline-flex; align-items: center; gap: 3px; height: 22px; padding: 0 8px; border-radius: 99px; font-size: 11.5px; font-weight: 700; background: #e6f4ec; color: var(--r-ok); white-space: nowrap; }
.ikr-badge .material-symbols-outlined { font-size: 14px; }
.ikr-badge--mute { background: #f1ece5; color: var(--r-mute); }
.ikr-badge--warn { background: #fdecea; color: var(--r-err); }
.ikr-badge--mine { background: #f6ecdf; color: #7a5a30; }
.ikr-rate { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.ikr-rate b { font-size: 12.5px; }
.ikr-title { font-weight: 800; font-size: 14.5px; margin: 6px 0 2px; overflow-wrap: anywhere; }
.ikr-text { margin: 4px 0 0; font-size: 13.5px; line-height: 1.55; color: #2f3640; white-space: pre-line; overflow-wrap: anywhere; }
.ikr-cr { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 8px; font-size: 12px; color: var(--r-mute); }
.ikr-cr span { display: inline-flex; align-items: center; gap: 5px; }
.ikr-photos { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.ikr-photo { width: 76px; height: 76px; border-radius: 10px; overflow: hidden; border: 1px solid var(--r-line); padding: 0; background: #f3eee7; cursor: zoom-in; flex: none; }
.ikr-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ikr-foot { display: flex; align-items: center; gap: 6px 10px; flex-wrap: wrap; margin-top: 10px; font-size: 12.5px; color: var(--r-mute); }
.ikr-help.is-on { background: #e6f4ec; border-color: #bfe3cf; color: var(--r-ok); }
.ikr-reply { margin-top: 12px; padding: 10px 12px; border-left: 3px solid var(--r-acc); background: var(--r-soft); border-radius: 0 10px 10px 0; font-size: 13px; }
.ikr-reply-h { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 12.5px; margin-bottom: 3px; flex-wrap: wrap; }
.ikr-reply-h small { font-weight: 500; color: var(--r-mute); }
.ikr-reply p { margin: 0; white-space: pre-line; line-height: 1.5; overflow-wrap: anywhere; }
.ikr-more { display: flex; justify-content: center; margin-top: 14px; }
.ikr-empty { border: 1px dashed var(--r-line); border-radius: 14px; padding: 26px 16px; text-align: center; color: var(--r-mute); font-size: 13px; }
.ikr-empty .material-symbols-outlined { display: block; margin: 0 auto 6px; font-size: 30px; color: #c9b89a; }
.ikr-note { margin-top: 8px; font-size: 12px; color: var(--r-err); }

/* superposición (formulario / reporte) */
.ikr-ov { position: fixed; inset: 0; z-index: 2000; background: rgba(20, 24, 30, .5); display: flex; align-items: center; justify-content: center; padding: 16px; opacity: 0; transition: opacity .18s; }
.ikr-ov.is-open { opacity: 1; }
.ikr-dlg { width: min(620px, 100%); max-height: calc(100dvh - 32px); overflow: auto; background: #fff; border-radius: 18px; box-shadow: 0 24px 60px rgba(0,0,0,.25); color: #1D2530; font-family: Inter, system-ui, sans-serif; }
.ikr-dlg-h { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid #eadfce; background: #fff; }
.ikr-dlg-h h3 { margin: 0; font: 800 17px/1.25 Manrope, Inter, sans-serif; flex: 1; min-width: 0; }
.ikr-dlg-h small { display: block; font: 500 12.5px Inter, sans-serif; color: #6b6358; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ikr-x { width: 34px; height: 34px; border-radius: 50%; border: 0; background: #f4efe8; cursor: pointer; display: grid; place-items: center; flex: none; }
.ikr-dlg-b { padding: 16px 18px; display: grid; gap: 14px; }
.ikr-dlg-f { position: sticky; bottom: 0; display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px; border-top: 1px solid #eadfce; background: #fff; }
.ikr-f { display: grid; gap: 6px; font-size: 13px; font-weight: 700; min-width: 0; }
.ikr-f small { font-weight: 500; color: #6b6358; }
.ikr-f input[type=text], .ikr-f textarea, .ikr-f select { width: 100%; border: 1px solid #ddd0bd; border-radius: 10px; padding: 9px 11px; font: 500 14px Inter, sans-serif; color: #1D2530; background: #fff; }
.ikr-f textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
.ikr-f input:focus, .ikr-f textarea:focus { outline: 2px solid #e8d3b4; border-color: #AB733C; }
.ikr-f.is-invalid input, .ikr-f.is-invalid textarea { border-color: #b3261e; }
.ikr-cnt { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; font-weight: 500; color: #6b6358; }
.ikr-cnt.is-low b { color: #b3261e; }
.ikr-pick { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.ikr-pick button { border: 0; background: none; padding: 2px; cursor: pointer; color: #d9cfc2; line-height: 0; border-radius: 6px; }
.ikr-pick button .material-symbols-outlined { font-size: 34px; font-variation-settings: 'FILL' 1; }
.ikr-pick button.is-on { color: #e0a13a; }
.ikr-pick button:focus-visible { outline: 2px solid #AB733C; }
.ikr-pick-lbl { margin-left: 8px; font-size: 14px; font-weight: 800; min-width: 80px; }
.ikr-pick--sm button .material-symbols-outlined { font-size: 22px; }
.ikr-crit-f { display: grid; gap: 6px; border: 1px solid #eadfce; border-radius: 12px; padding: 10px 12px; background: #fcfaf7; }
.ikr-crit-f > div { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 13px; font-weight: 600; }
.ikr-phs { display: flex; flex-wrap: wrap; gap: 8px; }
.ikr-ph { position: relative; width: 74px; height: 74px; border-radius: 10px; overflow: hidden; border: 1px solid #eadfce; background: #f3eee7; }
.ikr-ph img { width: 100%; height: 100%; object-fit: cover; }
.ikr-ph button { position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; display: grid; place-items: center; cursor: pointer; padding: 0; }
.ikr-ph button .material-symbols-outlined { font-size: 14px; }
.ikr-ph-add { width: 74px; height: 74px; border-radius: 10px; border: 1.5px dashed #cdb894; display: grid; place-items: center; cursor: pointer; color: #8a6a3e; text-align: center; font-size: 11px; font-weight: 700; line-height: 1.2; }
.ikr-ph-add .material-symbols-outlined { font-size: 22px; display: block; margin: 0 auto 2px; }
.ikr-check { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; font-weight: 500; }
.ikr-check input { margin-top: 2px; width: 16px; height: 16px; accent-color: #1D2530; }
.ikr-reasons { display: grid; gap: 6px; }
.ikr-reasons label { display: flex; gap: 8px; align-items: center; font-size: 13.5px; font-weight: 500; padding: 8px 10px; border: 1px solid #eadfce; border-radius: 10px; cursor: pointer; }
.ikr-reasons label:has(input:checked) { border-color: #1D2530; background: #faf6f0; }
.ikr-err { color: #b3261e; font-size: 12.5px; font-weight: 600; }
html.ikr-noscroll { overflow: hidden; }

/* tienda: calificación (ficha de producto) */
.ikr-store-lock { font-size: 12.5px; color: #6b6358; }

@media (max-width: 760px) {
  .ikr-top { grid-template-columns: minmax(0, 1fr); }
  .ikr-sort { margin-left: 0; flex: 1 1 100%; }
  .ikr-ov { align-items: flex-end; padding: 0; }
  .ikr-dlg { width: 100%; max-height: 92dvh; border-radius: 18px 18px 0 0; }
  .ikr-pick button .material-symbols-outlined { font-size: 30px; }
}
