/**
 * OPS Reviews – giao diện ngoài site.
 * Giữ nguyên tên class và thông số của plugin cũ (Wordpress Review MH) để giao diện không đổi
 * và CSS tuỳ biến của theme (app.css, Customizer) vẫn áp dụng.
 */

/* ---------- Chung ---------- */
.overflow-hidden { overflow: hidden; }
.hide-m { display: none !important; }
.ops-rv-hp { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; opacity: 0 !important; }

.wp-review-mh__title { font-size: 18px; }
.wp-reviews-mh { margin-bottom: 20px; }
.customer-reviews__inner {
	border: 1px solid #ddd;
	border-radius: 10px;
	background: #fff;
	padding: 25px;
	margin-top: 20px;
}

/* ---------- Hộp thoại ---------- */
.modal__overlay {
	position: fixed;
	inset: 0;
	z-index: 99999;
	background: rgba(0, 0, 0, .6);
	display: flex;
	justify-content: center;
	align-items: center;
}
.modal__container {
	background-color: #fff;
	padding: 30px;
	max-width: 500px;
	max-height: 100vh;
	border-radius: 4px;
	overflow-y: auto;
	box-sizing: border-box;
}
.modal__header { display: flex; justify-content: space-between; align-items: center; }
.modal__title {
	margin: 0;
	font-weight: 600;
	font-size: 1.25rem;
	line-height: 1.25;
	color: #00449e;
	box-sizing: border-box;
}
.modal__close { background: transparent; border: 0; }
.modal__content { line-height: 1.5; color: rgba(0, 0, 0, .8); }
#modal-review .modal__close:before { content: "\2715"; color: #000; font-size: 20px; }
#modal-review .modal__close:hover { background: transparent; border: 0; }

@keyframes mmfadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes mmslideIn { from { transform: translateY(15%); } to { transform: translateY(0); } }
.micromodal-slide { display: none; }
.micromodal-slide.is-open { display: block; }
.micromodal-slide.is-open .modal__overlay { animation: mmfadeIn .3s cubic-bezier(0, 0, .2, 1); }
.micromodal-slide.is-open .modal__container { animation: mmslideIn .3s cubic-bezier(0, 0, .2, 1); }

/* ---------- Tổng quan đánh giá ---------- */
.customer-reviews__top { display: flex; justify-content: space-between; align-items: center; }
.review-rating { flex-basis: 300px; flex-shrink: 0; margin: 0 20px; }
.pFROu .review-rating__summary { display: flex; align-items: center; }
.pFROu .review-rating__point {
	font-size: 32px;
	line-height: 40px;
	font-weight: 700;
	white-space: nowrap;
	margin: 0 16px 0 0;
}
.pFROu .review-rating__total { font-size: 14px; line-height: 20px; color: rgb(120, 120, 120); }
.pFROu .review-rating__detail { margin: 5px 0 0; }
.pFROu .review-rating__level { display: flex; margin: 0; align-items: center; }
.KCfxa {
	width: 166px;
	height: 6px;
	background-color: rgb(238, 238, 238);
	position: relative;
	z-index: 1;
	margin: 0 6px;
	border-radius: 99em;
}
.KCfxa > div {
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	background-color: rgb(120, 120, 120);
	border-radius: 99em;
}
.review-rating__photos { align-self: flex-start; padding-right: 20px; }
.review-rating__photos-title { font-size: 16px; }
.review-rating__real_photos { display: flex; flex-wrap: wrap; }
.review-real__photos {
	width: 50px;
	height: 50px;
	border-radius: 4px;
	background-size: cover;
	background-position: center center;
	margin: 0 6px 16px;
	cursor: pointer;
}

/* Sao: 5 sao viền + lớp sao vàng phủ theo % */
.dYhelp { position: relative; z-index: 1; display: inline-block; }
.dYhelp span { display: inline-block; vertical-align: middle; }
.dYhelp > div { white-space: nowrap; overflow: hidden; position: absolute; top: 0; left: 0; }

/* ---------- Nút ---------- */
.rv-btn {
	padding: 4px 20px;
	display: inline-block;
	background-color: rgb(24, 158, 255);
	border-radius: 5px;
	color: #fff;
}
.rv-btn-review {
	padding: 4px 20px;
	display: inline-block;
	color: #fff !important;
	font-size: 14px;
	background-color: rgb(24, 158, 255);
	border-radius: 5px;
}

/* ---------- Bộ lọc ---------- */
.filter-review { display: flex; padding: 0 0 20px; align-items: center; }
.filter-review .filter-review__inner { flex-grow: 1; display: flex; flex-wrap: wrap; }
.filter-review .filter-review__item {
	font-size: 14px;
	line-height: 20px;
	padding: 7px 12px;
	border-radius: 16px;
	color: rgb(120, 120, 120);
	background: rgb(238, 238, 238);
	cursor: pointer;
	display: flex;
	margin: 3px;
	align-items: center;
	user-select: none;
}
.filter-review .filter-review__star { font-size: 16px; color: rgb(199, 199, 199); margin: 0 0 0 4px; }
.filter-review__item--active { background: rgb(230, 238, 247) !important; }
.filter-review__item--active svg path { fill: #FDD835 !important; }
.filter-review__item--active .filter-review__check { display: block; }
.filter-review__check {
	display: none;
	width: 12px;
	height: 6px;
	border-left: 1px solid rgb(13, 92, 182);
	border-bottom: 1px solid rgb(13, 92, 182);
	transform: rotate(-45deg);
	margin: -3px 4px 0 0;
}
[data-type="reset"] { color: rgb(255 255 255) !important; background: rgb(233 30 142) !important; }

/* ---------- Danh sách đánh giá ---------- */
.review-comment { padding: 20px 0; display: flex; border-top: 1px solid rgb(242, 242, 242); }
.review-comment__user { flex-basis: 250px; flex-shrink: 0; }
.review-comment__user-inner { display: flex; align-items: center; }
.review-comment__user-avatar {
	margin: 0 12px 0 0;
	width: 40px;
	height: 40px;
	background-size: cover;
	border-radius: 50%;
	position: relative;
	z-index: 1;
}
.review-comment__user-name { font-size: 16px; line-height: 12px; font-weight: 600; text-transform: capitalize; }
.review-comment__user-date { font-size: 13px; }
.review-comment__user-info {
	margin: 10px 0 0;
	color: rgb(120, 120, 120);
	display: flex;
	align-items: center;
	font-size: 13px;
}
.review-comment__user-info > svg { width: 20px; height: 20px; margin: 0 10px 0 0; }
.review-comment__user-info > span { color: rgb(36, 36, 36); }
.rc-like-total { margin-right: 3px; }
.review-comment__rating-title { display: flex; align-items: center; margin: 0 0 4px; }
.review-comment__title {
	margin: 0 0 0 12px;
	font-size: 16px;
	line-height: 24px;
	font-weight: 500;
	color: rgb(36, 36, 36);
	overflow: hidden;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 1;
}
.review-comment__content { font-size: 14px; line-height: 20px; margin: 0 0 8px; color: #000; }
.review-comment__created-date { font-size: 13px; line-height: 16px; margin: 0 0 10px; color: rgb(120, 120, 120); }
.review-comment__created-date > span {
	padding: 0 7px;
	border-left: 1px solid rgb(238, 238, 238);
	display: inline-block;
	vertical-align: middle;
}
.review-comment__created-date > span:first-child { padding: 0 7px 0 0; border-left: 0; }
.hMjYZK .review-comment__images { display: flex; flex-wrap: wrap; margin: 0 -6px; }
.hMjYZK .review-comment__image {
	width: 50px;
	height: 50px;
	border-radius: 4px;
	background-size: cover;
	background-position: center center;
	margin: 0 6px 8px;
	cursor: pointer;
}
.review-comment__thank {
	padding: 3px 9px 5px;
	font-size: 14px;
	line-height: 20px;
	color: rgb(13, 92, 182);
	border: 1px solid rgb(13, 92, 182);
	font-weight: 500;
	border-radius: 4px;
	margin: 0 15px 0 0;
	cursor: pointer;
	display: inline-block;
	user-select: none;
}
.review-comment__thank--active { background-color: rgb(230, 238, 247); border-color: transparent; }
.review-comment__thank > svg { margin: 0 8px 0 0; }
.review-comment__thank > svg,
.review-comment__thank > span { display: inline-block; vertical-align: middle; }
.review-comment__reply {
	padding: 8px 0 9px;
	font-size: 14px;
	line-height: 20px;
	color: rgb(13, 92, 182);
	font-weight: 500;
	cursor: pointer;
	display: inline-block;
	user-select: none;
}

/* Avatar chữ cái */
.gDQSLG { border-radius: 50%; overflow: hidden; }
.gDQSLG img { display: block; width: 100%; height: 100%; object-fit: cover; }
.has-character { position: relative; padding-top: 100%; background-color: #fdd029; border-radius: 50%; }
.has-character span {
	position: absolute;
	inset: 0;
	display: flex;
	justify-content: center;
	align-items: center;
	font-size: 100%;
	font-weight: 500;
	color: #424242;
}

/* ---------- Trả lời ---------- */
.review-comment__sub-comments { margin: 20px 0 0; }
.fKaYwj { margin: 12px 0 0; display: flex; }
.review-sub-comment__avatar { display: flex; align-items: center; }
.review-sub-comment__avatar-name { font-size: 14px; line-height: 20px; font-weight: 500; text-transform: capitalize; }
.review-sub-comment__check-icon {
	display: block;
	width: 10px;
	height: 10px;
	background-color: rgb(13, 92, 182);
	border-radius: 50%;
	position: relative;
	z-index: 1;
	margin: 0 0 0 4px;
}
.review-sub-comment__check-icon::before {
	content: "";
	width: 5px;
	height: 3px;
	border-left: 1px solid #fff;
	border-bottom: 1px solid #fff;
	position: absolute;
	display: block;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -70%) rotate(-45deg);
}
.review-sub-comment__avatar-date {
	color: rgb(120, 120, 120);
	margin: 0 0 0 8px;
	padding: 0 0 0 10px;
	position: relative;
	z-index: 1;
	font-size: 13px;
	line-height: 20px;
}
.review-sub-comment__avatar-date::before {
	content: "";
	height: 4px;
	width: 4px;
	background-color: rgb(120, 120, 120);
	border-radius: 50%;
	position: absolute;
	top: 50%;
	left: 0;
	margin: -2px 0 0;
}
.review-sub-comment__inner {
	padding: 10px 12px;
	border: 1px solid rgb(242, 242, 242);
	background-color: rgb(250, 250, 250);
	border-radius: 6px;
	flex-grow: 1;
}
.review-sub-comment__content { font-size: 14px; line-height: 20px; margin: 4px 0 10px; }
.review-sub-comment__avatar-thumb {
	width: 32px;
	height: 32px;
	min-width: 32px;
	background-size: cover;
	margin: 0 8px 0 0;
	border-radius: 50%;
}
.review-sub-comment__avatar-thumb .has-character span { font-size: 13px; }

/* ---------- Phân trang ---------- */
.customer-reviews__pagination > ul { justify-content: center; padding: 0 48px; margin-top: 30px; }
.kiFxlu { display: flex; margin: 0; list-style: none; }
.kiFxlu li { margin-left: 8px; }
.kiFxlu .btn-pagi-m,
.kiFxlu .next-mm,
.kiFxlu .prev-mm {
	cursor: pointer;
	display: flex;
	justify-content: center;
	align-items: center;
	width: 30px;
	height: 30px;
	font-size: 13px;
	color: rgb(51, 51, 51);
	font-weight: 500;
	background-color: rgb(243 243 243);
	border-radius: 14px;
}
.kiFxlu .btn-pagi-m.active { cursor: default; color: #fff; background-color: rgb(24, 158, 255); }
.kiFxlu .btn-pagi-m--dots { cursor: default; background: transparent; }
.customer-reviews__pagination--mobile--button {
	margin-top: 12px;
	font-size: 15px;
	padding: 10px;
	text-align: center;
	color: rgb(13, 92, 182);
	line-height: 24px;
	border: 1px solid rgb(13, 92, 182);
	border-radius: 4px;
	font-weight: 500;
	cursor: pointer;
}
.customer-reviews--load_more { display: none; }
.infinite-scroll-component .open-reviews-box { display: none; }
.infinite-scroll-component .customer-reviews--load_more { display: block !important; }

/* ---------- Form đánh giá / trả lời ---------- */
.write-review__inner { margin-bottom: 0; }
.write-review__star { margin: 0 8px; cursor: pointer; }
.fill-yellow svg path { fill: #FDD835 !important; }
.write-review__product { display: flex; padding: 0 40px 0 0; align-items: center; margin: 0 0 32px; }
.write-review__product-img { width: 40px; margin: 0 12px 0 0; }
.write-review__product-wrap {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	width: 100%;
	height: 40px;
	padding: 0 40px 0 0;
}
.write-review__product-name {
	font-size: 14px;
	line-height: 20px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	flex: 1 1 0%;
}
.write-review__heading { font-size: 18px; line-height: 24px; font-weight: 500; text-align: center; margin: 0 0 12px; }
.write-review__stars { text-align: center; }
.write-review__rating-message { margin: 8px 0 0; font-size: 12px; line-height: 16px; color: rgb(255, 66, 78); text-align: center; }
.write-review__input {
	border: 1px solid rgb(241, 241, 241);
	padding: 12px;
	border-radius: 4px;
	resize: none;
	width: 100%;
	background: #fff !important;
	box-shadow: none !important;
	outline: 0 !important;
	margin: 24px 0 12px;
}
.review-inputs { display: flex; justify-content: space-between; margin-bottom: 15px; }
.review-input {
	width: 33%;
	padding: .6180469716em !important;
	border: 1px solid rgb(241, 241, 241) !important;
	border-radius: 4px;
	box-shadow: none !important;
	background: #fff !important;
}
.review-input:focus { outline-color: #00449e; }
.review-input::-webkit-input-placeholder { font-size: 14px; }
.write-review__buttons {
	flex: 1 1 0%;
	align-items: flex-end;
	display: flex;
	justify-content: space-between;
	margin: 12px 0 0;
}
.write-review__file {
	position: absolute;
	height: 0;
	width: 0;
	visibility: hidden;
	opacity: 0;
	clip: rect(0, 0, 0, 0);
}
.write-review__button {
	width: 49%;
	height: 36px;
	border: 0;
	background: 0 center;
	padding: 0;
	line-height: 36px;
	cursor: pointer;
	border-radius: 4px;
	display: flex;
	justify-content: center;
	align-items: center;
	outline: 0;
}
.write-review__button--image { color: rgb(13, 92, 182); border: 1px solid rgb(13, 92, 182); }
.write-review__button--image img { width: 20px; height: 20px; margin: 0 4px 0 0; }
.write-review__button--submit { background-color: rgb(253, 216, 53) !important; color: rgb(36, 36, 36) !important; }
.write-review__image {
	display: inline-block;
	width: 60px;
	height: 60px;
	background-size: cover;
	background-repeat: no-repeat;
	background-position: center center;
	margin: 0 12px 0 0;
	border: 1px solid rgb(224, 224, 224);
	border-radius: 4px;
	position: relative;
	overflow: hidden;
	cursor: pointer;
}
.write-review__image:hover::after { content: ""; position: absolute; inset: 0; background-color: rgba(36, 36, 36, .7); }
.write-review__image-close {
	width: 21px;
	height: 21px;
	background-color: #fff;
	border-radius: 50%;
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	z-index: 2;
	line-height: 21px;
	font-size: 18px;
	display: none;
	text-align: center;
}
.write-review__image:hover .write-review__image-close { display: block; }

/* Chế độ trả lời: ẩn phần chọn sao / sản phẩm, hiện nội dung đang trả lời */
#modal-review .write-review__reply--to { display: none; }
.modal-reply-m .write-review__heading,
.modal-reply-m .write-review__stars,
.modal-reply-m .write-review__product { display: none; }
.modal-reply-m .write-review__reply--to { display: block !important; }
.modal-reply-m .review-comment__content { margin-top: 10px; }
.review-input-reply-comment .review-input { width: 39%; }
.review-input-reply-comment .write-review__button { width: 20%; line-height: 46px; height: 46px; }
.review-input-reply-comment .review-input__phone,
.review-input-reply-comment .write-review__button--image { display: none; }

/* ---------- Bình luận - hỏi đáp ---------- */
.comments-input_message {
	width: 100%;
	border: 1px solid #ddd;
	background: transparent;
	border-radius: 4px;
	resize: none;
	outline: 0;
	box-shadow: none;
}
.comments-input_message:focus,
.comments-input_message:active { border: 0; outline: 0; }
.customer-comments__input { margin-top: 5px; margin-bottom: 15px; display: flex; justify-content: flex-end; }
.customer-comments__input input {
	border: 1px solid #ddd !important;
	border-radius: 4px;
	line-height: 34px;
	height: 34px;
	margin: 0 5px;
	box-shadow: none !important;
	background: #fff !important;
}
.rv-btn-comment { height: 34px; position: relative; top: -1px; color: #fff !important; }
.customer-comments { font-size: 14px; }
.customer-comment__item { margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px solid #efefef; }
.customer-comment__item:last-child { margin-bottom: 0; }
.customer-comment__item-user { display: flex; }
.customer-comment__item-name { display: flex; align-items: center; color: #6d6d6d; }
.customer-comment__content { margin: 0; color: #666; }
.customer-comment__action { font-size: 13px; }
.customer-comment__action a { margin-right: 5px; color: #9e9e9e; }
.customer-comments .review-comment__sub-comments { margin: 0; }
.customer-comments .review-sub-comment__inner { border: 0; padding: 0; }
.customer-comments .review-sub-comment {
	margin-top: 0;
	padding-bottom: 10px;
	border-bottom: 1px solid #ddd;
	margin-bottom: 10px;
}
.customer-comments .review-sub-comment:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.listreply {
	display: block;
	position: relative;
	margin: 10px 0 0 20px;
	padding: 10px 15px 5px 12px;
	clear: both;
	font-size: 14px;
	color: #333;
	line-height: 24px;
	background: #FAFAFA;
	border: 1px solid #dfdfdf;
	border-radius: 4px;
}
.listreply:after,
.listreply:before {
	top: -20px;
	left: 18px;
	border: solid transparent;
	content: " ";
	height: 0;
	width: 0;
	position: absolute;
	pointer-events: none;
}
.listreply:before { border-color: rgba(238, 238, 238, 0); border-bottom-color: #f8f8f8; border-width: 11px; margin-left: -11px; z-index: 1; }
.listreply:after { border-color: rgba(255, 255, 255, 0); border-bottom-color: #d2cccc; border-width: 10px; margin-left: -10px; }

/* ---------- Màn hình xem tất cả (mobile) ---------- */
.reviews__mobile {
	position: fixed;
	width: 100%;
	height: 100%;
	z-index: 99999;
	top: -130%;
	left: 0;
	transition-timing-function: cubic-bezier(.25, .1, .25, 1);
}
.jdYFzj {
	position: fixed;
	z-index: 10;
	top: -100%;
	left: 0;
	right: 0;
	background-color: rgb(27, 168, 255);
	display: flex;
	align-items: center;
	padding: 0 8px;
	height: 56px;
}
.reviews__mobile.show,
.reviews__mobile.show .jdYFzj { top: 0; }
.xOFEo {
	color: #fff;
	font-size: 17px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	flex: 1 1 0%;
	text-align: center;
	padding-right: 40px;
}
.jdYFzj .btn-back_modal {
	min-width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	background: 0 center;
	outline: 0;
	color: #fff;
	display: flex;
	justify-content: center;
	align-items: center;
}
.reviews-mobile { background: #fff; }
.infinite-scroll-component { padding: 56px 15px 35px; position: relative; height: 100vh; overflow: auto; box-sizing: border-box; }

/* ---------- Sao dưới tên sản phẩm (tuỳ chọn) ---------- */
.wp_rv_product-loop__meta {
	display: flex;
	justify-content: space-between;
	margin-bottom: 10px;
	color: #666;
	font-size: 13px;
}
.wp_rv_product-loop__meta .review-comment__rating-title { margin: 0; }
.wp_rv-count-reviews { margin-left: 4px; }
.wp_rv_product_info { font-size: 15px; }
.wp_rv_total {
	cursor: pointer;
	padding-right: 10px;
	display: inline-block;
	border-right: 1px solid #ddd;
	margin-right: 10px;
}

/* ---------- Đang tải ---------- */
.loading-m {
	display: none;
	position: fixed;
	left: 0;
	top: 0;
	z-index: 999992 !important;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, .7);
}
.loading-m.in { display: flex; align-items: center; justify-content: center; }
.loading-m svg path { stroke: #03a9f4; }

/* ---------- Xem ảnh ---------- */
.ops-rv-lightbox {
	position: fixed;
	inset: 0;
	z-index: 999999;
	background: rgba(0, 0, 0, .9);
	display: flex;
	align-items: center;
	justify-content: center;
}
.ops-rv-lightbox[hidden] { display: none; }
.ops-rv-lightbox img { max-width: 92vw; max-height: 88vh; object-fit: contain; }
.ops-rv-lightbox button {
	position: absolute;
	background: transparent;
	border: 0;
	color: #fff;
	font-size: 44px;
	line-height: 1;
	padding: 10px 16px;
	margin: 0;
	cursor: pointer;
	min-height: 0;
}
.ops-rv-lightbox__close { top: 10px; right: 10px; }
.ops-rv-lightbox__prev { left: 10px; top: 50%; transform: translateY(-50%); }
.ops-rv-lightbox__next { right: 10px; top: 50%; transform: translateY(-50%); }

/* ---------- Responsive ---------- */
@media only screen and (min-width: 601px) {
	.modal__container { width: 800px; min-width: 800px; }
	.customer-reviews__pagination--mobile,
	.reviews__mobile { display: none; }
}

@media only screen and (max-width: 600px) {
	.modal__container { padding: 15px; margin: 0 15px; min-width: 365px; }
	#modal-review .modal__container { padding: 15px; }
	.write-review__buttons { font-size: 13px; }
	.write-review__input { height: 85px; margin-bottom: 25px; }

	.customer-reviews__inner { padding: 15px; }
	.customer-reviews__top { flex-direction: column; }
	.review-rating { flex-basis: auto; margin-bottom: 20px; width: 100%; }
	.review-rating__inner { display: flex; justify-content: space-between; align-items: center; margin-right: 0 !important; }
	.review-rating__summary { flex-direction: column; }
	.pFROu .review-rating__summary { text-align: center; }
	.review-rating__big-stars svg { width: 12px; height: 12px; }
	.KCfxa { width: 140px; }
	.review-rating__photos { padding-right: 0; width: 100%; }
	.review-rating__real_photos { justify-content: center; }
	.review-rating__photos-title { text-align: center; margin-bottom: 10px; }

	.filter-review { padding: 0 0 20px; flex-direction: column; align-items: flex-start; }
	.filter-review .filter-review__item { margin-right: 3px; margin-left: 0; }

	.review-comment { padding: 15px 0; flex-direction: column; }
	.review-comment__user { flex-basis: auto; flex-shrink: 0; }
	.review-comment__user-avatar { width: 38px; height: 38px; }
	.review-comment__user-name { line-height: 14px; }
	.review-comment__user-info { display: none; }
	.review-comment__rating svg { width: 14px; height: 14px; }
	.review-comment__title { margin: -2px 0 0 12px; font-size: 14px; }

	.listreply { margin-left: 0; }
	.customer-comments { margin-top: 25px; }
	.customer-comments__input > input { width: 40%; }
	.comments-input__name { margin-left: 0 !important; }

	.wp-review-mh__title { font-size: 20px; }
	.Navigation__Wrapper-dgcpmq-0 { display: none; }
}

@media only screen and (max-width: 375px) {
	.KCfxa { width: 110px; }
}

@media only screen and (max-width: 325px) {
	.KCfxa { width: 75px; }
}
