/* Better Shop Reviews — front-end styles */
:root {
	--bsr-accent: #2fb3a8;
	--bsr-text: #222;
	--bsr-muted: #6b7280;
	--bsr-border: #e5e7eb;
	--bsr-card-bg: #fff;
	--bsr-track: #eceff1;
	--bsr-radius: 10px;
}

.bsr { --wc-primary: var(--bsr-accent); color: var(--bsr-text); font-size: 15px; line-height: 1.5; }
.bsr *, .bsr *::before, .bsr *::after { box-sizing: border-box; }
.bsr .bsr-muted { color: var(--bsr-muted); font-weight: 400; font-size: 0.9em; }

/* Stars ------------------------------------------------------------ */
.bsr-stars { position: relative; display: inline-block; line-height: 0; white-space: nowrap; vertical-align: middle; }
.bsr-stars-bg, .bsr-stars-fg { display: inline-flex; gap: 2px; }
.bsr-stars-bg .bsr-star { fill: #d9dde3; }
.bsr-stars-fg { position: absolute; left: 0; top: 0; overflow: hidden; }
.bsr-stars-fg .bsr-star { fill: var(--bsr-accent); }
.bsr-star { width: 18px; height: 18px; flex: 0 0 auto; }
.bsr-stars-lg .bsr-star { width: 22px; height: 22px; }

/* Summary ---------------------------------------------------------- */
.bsr-summary { display: flex; flex-wrap: wrap; gap: 32px 48px; align-items: flex-start; padding: 8px 0 28px; margin-bottom: 20px; border-bottom: 1px solid var(--bsr-border); }
.bsr-average { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.bsr-average-num { font-size: 40px; font-weight: 700; line-height: 1; }
.bsr-average-count { color: var(--bsr-muted); font-size: 14px; }
.bsr-bars { list-style: none; margin: 0; padding: 0; min-width: 300px; }
.bsr-bar { display: grid; grid-template-columns: 38px 1fr 36px; align-items: center; gap: 10px; margin: 0 0 9px; cursor: pointer; border-radius: 6px; }
.bsr-bar:hover .bsr-bar-track, .bsr-bar:focus-visible .bsr-bar-track { outline: 2px solid var(--bsr-accent); outline-offset: 1px; }
.bsr-bar.is-empty { color: var(--bsr-muted); cursor: default; }
.bsr-bar.is-empty:hover .bsr-bar-track { outline: none; }
.bsr-bar-label { display: inline-flex; align-items: center; gap: 3px; font-size: 14px; }
.bsr-bar-label .bsr-star { width: 14px; height: 14px; fill: var(--bsr-accent); }
.bsr-bar.is-empty .bsr-bar-label .bsr-star { fill: #cfd4da; }
.bsr-bar-track { display: block; height: 8px; background: var(--bsr-track); border-radius: 99px; overflow: hidden; }
.bsr-bar-fill { display: block; height: 100%; background: var(--bsr-accent); border-radius: 99px; }
.bsr-bar-count { font-size: 14px; text-align: right; }
.bsr-photo-strip h4 { margin: 0 0 10px; font-size: 15px; font-weight: 700; }
.bsr-photo-strip-list { display: flex; gap: 8px; flex-wrap: wrap; max-width: 360px; }
.bsr-photo img, .bsr-card-photos img { width: 76px; height: 76px; object-fit: cover; border-radius: 6px; display: block; border: 1px solid var(--bsr-border); }
.bsr-cta { display: flex; flex-direction: column; gap: 8px; }
.bsr-note { color: var(--bsr-muted); font-size: 14px; max-width: 320px; }

/* Buttons ---------------------------------------------------------- */
.bsr .bsr-btn, .bsr .bsr-btn:visited { display: inline-block; background: var(--bsr-accent); color: #fff; border: 2px solid var(--bsr-accent); border-radius: 6px; padding: 10px 20px; font-size: 15px; font-weight: 600; line-height: 1.2; cursor: pointer; text-decoration: none; text-align: center; transition: filter .15s; }
.bsr .bsr-btn:hover, .bsr .bsr-btn:focus { filter: brightness(0.92); color: #fff; }
.bsr .bsr-btn-outline { background: transparent; color: var(--bsr-accent); }
.bsr .bsr-btn-outline:hover { background: var(--bsr-accent); color: #fff; }
.bsr .bsr-btn[disabled] { opacity: .6; cursor: default; }

/* Toolbar ---------------------------------------------------------- */
.bsr-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin: 0 0 18px; }
.bsr-showing { color: var(--bsr-muted); font-size: 14px; }
.bsr-controls { display: flex; gap: 8px; }
.bsr-controls select { padding: 8px 32px 8px 12px; border: 1px solid #d1d5db; border-radius: 6px; background: #fff; font-size: 14px; color: var(--bsr-text); min-width: 110px; }

/* Grid of cards ---------------------------------------------------- */
.bsr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 20px; align-items: start; }
.bsr-grid.has-cols { display: flex; align-items: flex-start; }
.bsr-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.bsr-grid.is-loading { opacity: .5; pointer-events: none; }
.bsr-card { background: var(--bsr-card-bg); border: 1px solid var(--bsr-border); border-radius: var(--bsr-radius); padding: 18px 20px 14px; display: flex; flex-direction: column; gap: 10px; box-shadow: 0 1px 2px rgba(0,0,0,.03); }
.bsr-card.is-pending { border-style: dashed; }
.bsr-card.is-highlight { box-shadow: 0 0 0 3px var(--bsr-accent); }
.bsr-card-head { display: flex; align-items: center; gap: 12px; }
.bsr-avatar { width: 38px; height: 38px; border-radius: 50%; color: #fff; font-weight: 700; font-size: 17px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.bsr-card-who { display: flex; flex-direction: column; min-width: 0; }
.bsr-name { font-weight: 700; font-size: 15px; display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.bsr-verified svg { width: 16px; height: 16px; fill: var(--bsr-accent); display: block; }
.bsr-verified .bsr-tick { fill: #fff; }
.bsr-date { color: var(--bsr-muted); font-size: 13px; }
.bsr-card-rating { line-height: 0; }
.bsr-card-rating .bsr-star { width: 17px; height: 17px; }
.bsr-card-title { margin: 0; font-size: 15px; font-weight: 700; line-height: 1.35; }
.bsr-card-body { font-size: 14.5px; color: #333; }
.bsr-card-body p { margin: 0 0 .6em; }
.bsr-card-body p:last-child { margin-bottom: 0; }
.bsr-card-photos { display: flex; flex-wrap: wrap; gap: 6px; }
.bsr-pending { margin: 0; color: #b45309; font-size: 13px; font-style: italic; }
.bsr-card-foot { margin-top: auto; display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding-top: 4px; }
.bsr-helpful-label { color: var(--bsr-muted); font-size: 13px; }
.bsr-vote { background: none; border: 0; padding: 2px 4px; display: inline-flex; align-items: center; gap: 4px; color: #4b5563; cursor: pointer; font-size: 13px; border-radius: 4px; line-height: 1; }
.bsr-vote svg { width: 16px; height: 16px; fill: currentColor; }
.bsr-vote:hover { color: var(--bsr-accent); background: #f3f4f6; }
.bsr-vote.is-voted { color: var(--bsr-accent); font-weight: 700; }
.bsr-vote[disabled] { cursor: default; }
.bsr-empty { color: var(--bsr-muted); text-align: center; padding: 24px 0; }
.bsr-more-wrap { text-align: center; margin: 24px 0 8px; }

/* Form ------------------------------------------------------------- */
.bsr-form-wrap { background: #fafafa; border: 1px solid var(--bsr-border); border-radius: var(--bsr-radius); padding: 20px 24px 8px; margin: 0 0 24px; }
.bsr-form-wrap[hidden] { display: none; }
.bsr-form-wrap .comment-reply-title { margin: 0 0 14px; font-size: 18px; }
.bsr-form-wrap .comment-reply-title small { display: none; }
.bsr-form p, .bsr-form .bsr-rate, .bsr-form .bsr-photo-field { margin: 0 0 14px; }
.bsr-form label { display: block; font-weight: 600; margin-bottom: 4px; font-size: 14px; }
.bsr-form input[type=text], .bsr-form input[type=email], .bsr-form textarea { width: 100%; max-width: 640px; padding: 10px 12px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 15px; background: #fff; }
.bsr-form textarea { min-height: 120px; }
.bsr-rate-label { display: block; font-weight: 600; margin-bottom: 4px; font-size: 14px; }
.bsr-rate-stars { display: inline-flex; gap: 2px; }
.bsr-rate-star { background: none; border: 0; padding: 2px; cursor: pointer; line-height: 0; }
.bsr-rate-star svg { width: 30px; height: 30px; fill: #d9dde3; transition: fill .1s, transform .1s; }
.bsr-rate-star:hover svg { transform: scale(1.12); }
.bsr-rate-star.is-on svg, .bsr-rate-star.is-hover svg { fill: var(--bsr-accent); }
.bsr-rate-select { display: block; margin-top: 6px; }
.bsr-form p.stars, .bsr-form .stars { display: none !important; }
.bsr.has-js .bsr-rate-select { position: absolute; opacity: 0; width: 1px; height: 1px; overflow: hidden; pointer-events: none; }
.bsr-photo-field input[type=file] { font-size: 14px; }
.bsr-photo-previews { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.bsr-photo-previews img { width: 72px; height: 72px; object-fit: cover; border-radius: 6px; border: 1px solid var(--bsr-border); }
.bsr-form .form-submit { margin-top: 6px; }
.bsr-form .required { color: #dc2626; }
.bsr-form .comment-form-cookies-consent { display: flex; align-items: center; gap: 8px; }
.bsr-form .comment-form-cookies-consent label { margin: 0; font-weight: 400; }

/* Lightbox --------------------------------------------------------- */
.bsr-lb { position: fixed; inset: 0; background: rgba(0,0,0,.82); z-index: 99999; display: flex; align-items: center; justify-content: center; padding: 24px; cursor: zoom-out; }
.bsr-lb img { max-width: 100%; max-height: 100%; border-radius: 8px; box-shadow: 0 10px 40px rgba(0,0,0,.5); }

/* Small screens ---------------------------------------------------- */
@media (max-width: 640px) {
	.bsr-summary { gap: 20px; }
	.bsr-bars { min-width: 0; width: 100%; }
	.bsr-grid { grid-template-columns: 1fr; }
	.bsr-grid.has-cols { flex-direction: column; }
	.bsr-col { width: 100%; }
	.bsr-toolbar { align-items: stretch; }
	.bsr-controls { width: 100%; }
	.bsr-controls select { flex: 1; min-width: 0; }
	.bsr-cta { width: 100%; }
	.bsr-form-wrap { padding: 16px 16px 4px; }
}