/* ============================================================
   STVT Reviews v2 - giao diện theo sieuthivienthong/baohonhanphat
   ============================================================ */
:root {
	--stvt-blue: #3a9fd6;
	--stvt-blue-d: #2f8fc4;
	--stvt-gold: #f5a623;
	--stvt-green: #46b450;
	--stvt-yellow: #f5c518;
	--stvt-bar: #eef0f2;
	--stvt-border: #e2e5e9;
}

/* ---------- KHỐI SAO ---------- */
.stvt-summary {
	display: flex;
	align-items: stretch;
	border: 1px solid var(--stvt-border);
	border-radius: 8px;
	margin: 10px 0 20px;
	overflow: hidden;
	background: #fff;
}
.stvt-summary__avg {
	flex: 0 0 150px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 16px;
	border-right: 1px solid var(--stvt-border);
	text-align: center;
}
.stvt-summary__score {
	font-size: 44px;
	font-weight: 700;
	color: var(--stvt-gold);
	line-height: 1;
	display: flex;
	align-items: center;
	gap: 6px;
}
.stvt-summary__score .stvt-star { font-size: 34px; }
.stvt-summary__avglabel {
	margin-top: 8px;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	color: #333;
	letter-spacing: .3px;
}
.stvt-summary__bars {
	flex: 1;
	padding: 14px 18px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 6px;
	min-width: 0;
}
.stvt-barrow {
	display: flex;
	align-items: center;
	gap: 12px;
}
.stvt-barrow__star {
	flex: 0 0 auto;
	color: #333;
	font-size: 15px;
	white-space: nowrap;
}
.stvt-barrow__star .stvt-star { color: var(--stvt-gold); }
.stvt-barrow__track {
	flex: 1;
	height: 14px;
	background: var(--stvt-bar);
	border-radius: 8px;
	overflow: hidden;
}
.stvt-barrow__fill {
	height: 100%;
	width: 0;
	background: var(--stvt-gold);
	border-radius: 8px;
	transition: width .7s ease;
}
.stvt-barrow__meta {
	flex: 0 0 auto;
	min-width: 130px;
	color: var(--stvt-blue);
	font-size: 14px;
}
.stvt-barrow__meta b { color: var(--stvt-blue); font-weight: 700; }
.stvt-summary__action {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	border-left: 1px solid var(--stvt-border);
}
.stvt-write-btn {
	background: var(--stvt-blue);
	color: #fff !important;
	border: 0;
	padding: 14px 26px;
	border-radius: 4px;
	font-weight: 700;
	text-transform: uppercase;
	cursor: pointer;
	text-decoration: none;
	white-space: nowrap;
	font-size: 14px;
}
.stvt-write-btn:hover { background: var(--stvt-blue-d); }

/* ---------- THANH LỌC ---------- */
.stvt-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	padding: 12px;
	background: #f7f8fa;
	border-radius: 8px;
	margin: 0 0 18px;
}
.stvt-filter {
	background: #fff;
	border: 1px solid var(--stvt-border);
	border-radius: 6px;
	padding: 7px 14px;
	cursor: pointer;
	font-size: 14px;
	color: #333;
}
.stvt-filter .stvt-star { color: var(--stvt-gold); }
.stvt-filter.is-active {
	background: var(--stvt-blue);
	border-color: var(--stvt-blue);
	color: #fff;
}
.stvt-filter.is-active .stvt-star { color: #fff; }

/* ---------- THƯ VIỆN ẢNH ---------- */
.stvt-gallery { margin: 0 0 20px; }
.stvt-gallery__title { font-size: 15px; font-weight: 700; margin: 0 0 10px; }
.stvt-gallery__grid { display: flex; flex-wrap: wrap; gap: 8px; }
.stvt-gallery__item {
	width: 78px; height: 78px; border-radius: 6px; overflow: hidden;
	border: 1px solid var(--stvt-border); cursor: pointer; background: #f5f5f5;
}
.stvt-gallery__item img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- ĐÁNH GIÁ ---------- */
#reviews ol.commentlist { margin: 0; padding: 0; list-style: none; }
.stvt-review { padding: 14px 0; border-bottom: 1px solid #f0f0f0; }
.stvt-review__meta { margin: 0 0 4px; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.stvt-review__author { font-weight: 700; color: #222; }
.stvt-review__verified {
	color: var(--stvt-green);
	font-style: italic;
	font-size: 13px;
	display: inline-flex;
	align-items: center;
	gap: 4px;
}
.stvt-review__verified::before {
	content: "✔";
	display: inline-block;
	width: 15px; height: 15px; line-height: 15px;
	text-align: center;
	background: var(--stvt-green);
	color: #fff;
	border-radius: 50%;
	font-size: 10px;
	font-style: normal;
}
.stvt-review__qtv {
	background: var(--stvt-blue);
	color: #fff;
	padding: 2px 8px;
	border-radius: 10px;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
}
.stvt-review__stars { margin: 2px 0; letter-spacing: 1px; }
.stvt-star { color: #d9d9d9; }
.stvt-star.is-on { color: var(--stvt-gold); }
.stvt-review__stars .stvt-star { font-size: 15px; }
.stvt-review__text { margin: 4px 0; color: #333; line-height: 1.55; }

.stvt-review-images { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.stvt-review-image { width: 90px; height: 90px; border-radius: 6px; overflow: hidden; border: 1px solid var(--stvt-border); display: block; }
.stvt-review-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.stvt-review-video video { max-width: 240px; border-radius: 6px; margin: 8px 0; }

.stvt-review__bottom { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #999; margin-top: 4px; }
.stvt-review__bottom a { color: var(--stvt-blue); text-decoration: none; }
.stvt-review__bottom .stvt-sep { color: #ccc; }
.stvt-like { display: inline-flex; align-items: center; gap: 3px; cursor: pointer; }
.stvt-like.is-liked { color: var(--stvt-blue-d); font-weight: 600; }

/* QTV reply nền nhẹ */
li.comment.stvt-admin-reply .stvt-review {
	background: #f2f9ff;
	border-left: 3px solid var(--stvt-blue);
	border-radius: 4px;
	padding-left: 12px;
}
#reviews ol.children { margin: 0 0 0 30px; padding: 0; list-style: none; }

/* ---------- POPUP FORM ---------- */
.stvt-modal {
	position: fixed; inset: 0; z-index: 999999;
	display: none; align-items: flex-start; justify-content: center;
	padding: 30px 12px; overflow: auto;
}
.stvt-modal.is-open { display: flex; }
.stvt-modal__overlay { position: fixed; inset: 0; background: rgba(0,0,0,.55); }
.stvt-modal__box {
	position: relative; background: #fff; border-radius: 8px;
	width: 100%; max-width: 640px; padding: 26px; box-shadow: 0 10px 50px rgba(0,0,0,.3);
}
.stvt-modal__close {
	position: absolute; top: -14px; right: -14px;
	width: 36px; height: 36px; border-radius: 50%;
	background: #111; color: #fff; border: 0; font-size: 22px; cursor: pointer; line-height: 1;
}
.stvt-modal__title { margin: 0 0 16px; font-size: 20px; font-weight: 700; }

.stvt-review-form textarea {
	width: 100%; box-sizing: border-box; border: 1px solid var(--stvt-border);
	border-radius: 6px; padding: 12px; font-size: 15px; resize: vertical; min-height: 120px;
}
.stvt-attach-row {
	display: flex; align-items: center; gap: 18px;
	background: #f4f5f7; padding: 10px 12px; border-radius: 0 0 6px 6px; margin-top: -4px;
}
.stvt-attach { cursor: pointer; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.stvt-attach--img { color: var(--stvt-blue); }
.stvt-attach--video { color: #e0332f; }
.stvt-counter { margin-left: auto; color: #888; font-size: 13px; }
.stvt-preview { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; }
.stvt-preview img, .stvt-preview video { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; border: 1px solid var(--stvt-border); }

.stvt-rating-row { display: flex; align-items: flex-start; gap: 18px; margin: 18px 0; flex-wrap: wrap; }
.stvt-rating-label { font-weight: 700; max-width: 160px; }
.stvt-rating-stars { display: flex; gap: 14px; }
.stvt-rate { display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; }
.stvt-rate__star { font-size: 34px; color: #d9d9d9; line-height: 1; transition: color .1s; }
.stvt-rate.is-on .stvt-rate__star, .stvt-rate.is-hover .stvt-rate__star { color: var(--stvt-gold); }
.stvt-rate__label { font-size: 13px; color: #888; }
.stvt-rate.is-on .stvt-rate__label { color: #333; }

.stvt-inputs { display: flex; gap: 10px; margin: 14px 0; flex-wrap: wrap; }
.stvt-inputs input { flex: 1; min-width: 150px; padding: 12px; border: 1px solid var(--stvt-border); border-radius: 6px; font-size: 14px; box-sizing: border-box; }
.stvt-captcha { display: flex; align-items: center; gap: 10px; margin: 8px 0 16px; }
.stvt-captcha input { width: 120px; padding: 10px; border: 1px solid var(--stvt-border); border-radius: 6px; }
.stvt-submit {
	display: block; margin: 0 auto; background: var(--stvt-blue); color: #fff; border: 0;
	padding: 14px 40px; border-radius: 4px; font-weight: 700; text-transform: uppercase; cursor: pointer; font-size: 15px;
}
.stvt-submit:hover { background: var(--stvt-blue-d); }

/* ---------- HỎI ĐÁP ---------- */
.stvt-qa { margin: 30px 0 10px; }
.stvt-qa__title { font-size: 20px; font-weight: 700; margin: 0 0 14px; }
.stvt-qa-form textarea {
	width: 100%; box-sizing: border-box; border: 1px solid var(--stvt-border); border-radius: 6px;
	padding: 12px; min-height: 90px; resize: vertical; font-size: 14px;
}
.stvt-qa-form__bottom { display: flex; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.stvt-qa-gender { display: flex; gap: 12px; white-space: nowrap; }
.stvt-qa-gender label { display: inline-flex; align-items: center; gap: 4px; }
.stvt-qa-name, .stvt-qa-email { flex: 1; min-width: 140px; padding: 10px; border: 1px solid var(--stvt-border); border-radius: 6px; }
.stvt-qa-submit {
	background: var(--stvt-yellow); color: #333; border: 0; padding: 10px 22px;
	border-radius: 4px; font-weight: 700; text-transform: uppercase; cursor: pointer;
}
.stvt-qa-submit:hover { filter: brightness(.96); }

.stvt-qa-head { display: flex; align-items: center; justify-content: space-between; margin: 22px 0 12px; flex-wrap: wrap; gap: 10px; }
.stvt-qa-count { font-weight: 700; font-size: 16px; }
.stvt-qa-search__input { padding: 9px 12px 9px 30px; border: 1px solid var(--stvt-border); border-radius: 6px; min-width: 220px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E") no-repeat 9px center; }

.stvt-qa-item { display: flex; gap: 12px; padding: 14px 0; border-top: 1px solid #f0f0f0; }
.stvt-qa-avatar {
	flex: 0 0 38px; width: 38px; height: 38px; border-radius: 50%;
	background: #e9edf1; color: #667; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.stvt-qa-body { flex: 1; min-width: 0; }
.stvt-qa-name { font-weight: 700; }
.stvt-qa-text { margin: 3px 0; color: #333; line-height: 1.5; }
.stvt-qa-meta { font-size: 13px; color: #999; display: flex; align-items: center; gap: 8px; }
.stvt-qa-meta a { color: var(--stvt-blue); text-decoration: none; }
.stvt-qa-children { margin: 10px 0 0 10px; padding-left: 12px; border-left: 2px solid #eef0f2; }
.stvt-qa-child { margin: 8px 0; }
.stvt-qa-reply-form { margin: 10px 0; display: flex; gap: 8px; flex-wrap: wrap; }
.stvt-qa-reply-form textarea { flex: 1 1 100%; min-height: 60px; padding: 10px; border: 1px solid var(--stvt-border); border-radius: 6px; box-sizing: border-box; }
.stvt-qa-reply-form input { flex: 1; min-width: 130px; padding: 8px; border: 1px solid var(--stvt-border); border-radius: 6px; }
.stvt-qa-notice { padding: 8px 12px; background: #eafaf0; color: #2e7d46; border-radius: 6px; margin: 8px 0; }

/* ---------- LIGHTBOX ---------- */
.stvt-lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.85); display: flex; align-items: center; justify-content: center; z-index: 9999999; opacity: 0; pointer-events: none; transition: opacity .2s; }
.stvt-lightbox.is-open { opacity: 1; pointer-events: auto; }
.stvt-lightbox img { max-width: 90vw; max-height: 90vh; border-radius: 8px; }
.stvt-lightbox__close { position: absolute; top: 18px; right: 24px; color: #fff; font-size: 34px; cursor: pointer; }

@media (max-width: 640px) {
	.stvt-summary { flex-direction: column; }
	.stvt-summary__avg { flex-basis: auto; border-right: 0; border-bottom: 1px solid var(--stvt-border); flex-direction: row; gap: 12px; }
	.stvt-summary__action { border-left: 0; border-top: 1px solid var(--stvt-border); }
	.stvt-write-btn { width: 100%; }
	.stvt-barrow__meta { min-width: 92px; font-size: 13px; }
	.stvt-rating-stars { gap: 8px; }
	.stvt-rate__star { font-size: 26px; }
}
