/* Recenze v detailu produktu (js/reviews.js) */
.pd-reviews { display: grid; gap: 1rem; margin-top: 0.5rem; padding-top: 1.4rem; border-top: 1px solid var(--line); }
.pd-reviews[hidden] { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.rv-head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; }
.rv-head h4 { margin: 0; font-family: var(--font-head); font-size: 1.15rem; }
.rv-score { display: flex; align-items: center; gap: 0.5rem; }
.rv-score b { font-family: var(--font-head); font-size: 1.35rem; line-height: 1; }
.rv-score span:last-child { color: var(--muted); font-size: 0.85rem; }
.pd .rv-none, .pd .rv-loading { margin: 0; color: var(--muted); font-size: 0.9rem; }

/* hvězdičky: plná, poloviční, prázdná */
.rv-stars { display: inline-flex; gap: 2px; vertical-align: middle; }
.rv-stars i { display: block; width: 18px; height: 18px; color: var(--line-2); }
.rv-stars.sm i { width: 14px; height: 14px; }
.rv-stars svg { width: 100%; height: 100%; fill: currentColor; }
.rv-stars i.on { color: #e3a008; }
/* poloviční hvězda: dvoubarevné pozadí oříznuté maskou ve tvaru hvězdy */
.rv-stars i.half {
  --star: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.6l2.9 6 6.5.8-4.8 4.5 1.2 6.5L12 17.3l-5.8 3.1 1.2-6.5-4.8-4.5 6.5-.8z'/%3E%3C/svg%3E") center / contain no-repeat;
  background: linear-gradient(90deg, #e3a008 50%, var(--line-2) 50%);
  -webkit-mask: var(--star); mask: var(--star);
}
.rv-stars i.half svg { fill: transparent; }

/* výzva k přihlášení */
.rv-login { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem 1rem; flex-wrap: wrap; padding: 1rem 1.1rem; border-radius: var(--r); background: var(--bg-alt); }
.pd .rv-login p { margin: 0; font-size: 0.88rem; color: var(--muted); }
.rv-login p b { display: block; color: var(--text); font-size: 0.95rem; }
.rv-login > div { display: flex; gap: 0.5rem; }

/* vlastní recenze */
.rv-mine { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; flex-wrap: wrap; padding: 0.8rem 1rem; border-radius: var(--r); background: var(--brand-soft); font-size: 0.9rem; }
.rv-mine > span { display: inline-flex; align-items: center; gap: 0.5rem; }
.rv-mine em { font-style: normal; font-size: 0.75rem; color: var(--accent); }
.rv-mine button { font-weight: 600; color: var(--brand); padding: 0.2rem 0.4rem; border-radius: 6px; }
.rv-mine button:hover { background: rgba(35, 64, 47, 0.08); }
.rv-mine button[data-rv-delete] { color: var(--accent); }

/* formulář */
.rv-form { display: grid; gap: 0.6rem; padding: 1rem 1.1rem; border-radius: var(--r); border: 1px solid var(--line); }
.rv-pick { display: flex; gap: 4px; margin: 0; padding: 0; border: 0; }
.rv-pick legend { float: left; width: 100%; margin-bottom: 0.4rem; font-weight: 600; font-size: 0.93rem; }
.rv-pick label { position: relative; cursor: pointer; width: 30px; height: 30px; color: var(--line-2); transition: color 0.12s, transform 0.12s; }
.rv-pick label:hover { transform: scale(1.12); }
.rv-pick input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.rv-pick svg { width: 100%; height: 100%; fill: currentColor; }
.rv-pick input:focus-visible + svg { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
/* zvýraznění podle vybrané hodnoty (nebo náhledu při najetí myší) */
.rv-pick[data-value="1"] label:nth-of-type(-n+1), .rv-pick[data-value="2"] label:nth-of-type(-n+2),
.rv-pick[data-value="3"] label:nth-of-type(-n+3), .rv-pick[data-value="4"] label:nth-of-type(-n+4),
.rv-pick[data-value="5"] label:nth-of-type(-n+5) { color: #e3a008; }
.rv-pick[data-hover] label { color: var(--line-2); }
.rv-pick[data-hover="1"] label:nth-of-type(-n+1), .rv-pick[data-hover="2"] label:nth-of-type(-n+2),
.rv-pick[data-hover="3"] label:nth-of-type(-n+3), .rv-pick[data-hover="4"] label:nth-of-type(-n+4),
.rv-pick[data-hover="5"] label:nth-of-type(-n+5) { color: #f0b429; }
.rv-text textarea {
  width: 100%; min-height: 96px; resize: vertical; padding: 0.7rem 0.8rem; border-radius: var(--r-sm);
  border: 1px solid var(--line-2); font: inherit; font-size: 0.93rem; color: var(--text); background: #fff;
}
.rv-text textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(35, 64, 47, 0.12); }
.rv-err { font-size: 0.8rem; font-weight: 500; color: var(--accent); }
.rv-err:empty { display: none; }
.rv-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.rv-ok { margin: 0; padding: 0.7rem 0.9rem; border-radius: 10px; background: #e8f5ea; color: #1f6b30; font-size: 0.88rem; font-weight: 500; }

/* seznam */
.rv-list { list-style: none; margin: 0; padding: 0; display: grid; }
.rv-item { display: grid; gap: 0.35rem; padding: 0.95rem 0; border-top: 1px solid var(--line); }
.rv-item:first-child { border-top: 0; padding-top: 0.2rem; }
.rv-meta { display: flex; align-items: center; gap: 0.45rem; flex-wrap: wrap; font-size: 0.88rem; }
.rv-meta time { margin-left: auto; color: var(--muted); font-size: 0.8rem; }
.rv-tag { padding: 1px 7px; border-radius: 999px; background: var(--bg-alt); color: var(--muted); font-size: 0.72rem; font-weight: 600; }
.rv-verified { background: #e8f5ea; color: #1f6b30; }
.pd .rv-item p { margin: 0; font-size: 0.92rem; white-space: pre-line; overflow-wrap: anywhere; }
.rv-more { justify-self: start; font-weight: 600; font-size: 0.9rem; color: var(--brand); padding: 0.3rem 0; }
.rv-more:hover { text-decoration: underline; }

/* administrace – záložka Recenze (js/admin-reviews.js) */
.adm-rv { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 0.9rem 1.1rem; margin-bottom: 10px; display: grid; gap: 0.5rem; }
.adm-rv.is-hidden { background: #fbfaf7; }
.adm-rv.is-hidden p { color: var(--muted); }
.adm-rv-top { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.adm-rv-date { margin-left: auto; color: var(--muted); font-size: 0.85rem; }
.adm-rv p { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
.adm-rv-foot { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; flex-wrap: wrap; font-size: 0.88rem; color: var(--muted); }
.adm-rv-foot > span:last-child { display: flex; gap: 0.5rem; }

@media (max-width: 520px) {
  .rv-login > div, .rv-login .btn { width: 100%; }
  .rv-login .btn { flex: 1; }
  .rv-meta time { margin-left: 0; width: 100%; }
}
