/*
 * Wordpress Review MH v1.9.2 — Emerald Cyber Luxury Sync Layer for Nhàn MCTK
 * Loaded AFTER wordpress-review-mh-public.css. Only cosmetic: zero DB / logic change.
 * Uses Flatsome Child design tokens with safe fallbacks (works with any theme).
 */
:root{
  --rvx-green:var(--mcx-green,#059669);
  --rvx-green-dark:var(--mcx-green-dark,#047857);
  --rvx-mint-50:var(--mcx-emerald-50,#ecfdf5);
  --rvx-mint-200:var(--mcx-emerald-200,#a7f3d0);
  --rvx-ink:var(--mcx-ink,#0f172a);
  --rvx-muted:var(--mcx-muted,#475569);
  --rvx-line:var(--mcx-line,#e2e8f0);
  --rvx-canvas:var(--mcx-canvas,#f8fafc);
  --rvx-heading:var(--mcx-heading,"Plus Jakarta Sans",system-ui,-apple-system,"Segoe UI",sans-serif);
  --rvx-body:var(--mcx-body,"Be Vietnam Pro",system-ui,-apple-system,"Segoe UI",Arial,sans-serif);
}

/* ===== Card shell: Title (header) + Body ===== */
.wp-review-mh__title{
  display:flex!important;
  align-items:center;
  gap:10px;
  margin:0!important;
  padding:20px 24px 12px!important;
  background:#fff!important;
  border:1px solid var(--rvx-line)!important;
  border-bottom:0!important;
  border-radius:18px 18px 0 0!important;
  font-family:var(--rvx-heading)!important;
  font-size:19px!important;
  font-weight:800!important;
  letter-spacing:-.02em!important;
  text-transform:none!important;
  color:var(--rvx-ink)!important;
  line-height:1.3!important;
}
.wp-review-mh__title::before{
  content:"";
  flex:0 0 4px;
  width:4px;
  height:20px;
  border-radius:4px;
  background:var(--rvx-green);
}
#mctk-reviews-section{scroll-margin-top:calc(var(--mcx-header-offset,110px) + 8px)!important}
.wp-review-mh__title + .wp-reviews-mh{
  margin:0 0 22px!important;
  padding:8px 24px 24px!important;
  background:#fff!important;
  border:1px solid var(--rvx-line)!important;
  border-top:0!important;
  border-radius:0 0 18px 18px!important;
  box-shadow:0 4px 14px rgba(15,23,42,.04);
  font-family:var(--rvx-body);
  color:var(--rvx-ink);
}

/* ===== Rating Summary (5.0 big score + bars) ===== */
.wp-reviews-mh .review-rating{border:0!important;padding:0!important;margin:0 0 14px!important;background:transparent!important}
.wp-reviews-mh .review-rating__inner{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:18px 28px;
  padding:16px 18px!important;
  border-radius:14px;
  background:var(--rvx-canvas);
  border:1px solid var(--rvx-line);
}
.wp-reviews-mh .review-rating__point{
  font-family:var(--rvx-heading)!important;
  font-size:40px!important;
  font-weight:800!important;
  line-height:1!important;
  color:var(--rvx-ink)!important;
  font-variant-numeric:tabular-nums;
}
.wp-reviews-mh .review-rating__total{font-size:13px!important;color:var(--rvx-muted)!important;margin-top:4px}
.wp-reviews-mh .review-rating__total span{font-weight:800;color:var(--rvx-ink)}
.wp-reviews-mh .review-rating__detail{flex:1 1 260px;min-width:0}
.wp-reviews-mh .review-rating__level{display:flex;align-items:center;gap:8px;margin:3px 0!important;cursor:pointer}
.wp-reviews-mh .review-rating__number{font-size:12px!important;color:var(--rvx-muted)!important;min-width:28px;text-align:right}
.wp-reviews-mh .review-rating__photos-title{font-family:var(--rvx-heading);font-weight:700;font-size:14px;color:var(--rvx-ink)}
.wp-reviews-mh .review-rating__actions{display:flex;align-items:center}

/* Primary CTA */
.wp-reviews-mh .rv-btn-review,
.wp-reviews-mh .rv-btn,
.wp-reviews-mh .rv-btn-comment{
  display:inline-flex!important;
  align-items:center;
  justify-content:center;
  min-height:42px;
  padding:9px 18px!important;
  border:0!important;
  border-radius:10px!important;
  background:linear-gradient(135deg,var(--rvx-green),var(--rvx-green-dark))!important;
  color:#fff!important;
  font-family:var(--rvx-heading)!important;
  font-size:13.5px!important;
  font-weight:700!important;
  text-decoration:none!important;
  box-shadow:0 8px 20px -6px rgba(5,150,105,.32);
  transition:filter .15s,transform .15s;
}
.wp-reviews-mh .rv-btn-review:hover,
.wp-reviews-mh .rv-btn:hover{filter:brightness(1.06);transform:translateY(-1px)}

/* ===== Review items ===== */
.wp-reviews-mh .review-item{
  padding:16px 0!important;
  border-bottom:1px solid var(--rvx-line)!important;
}
.wp-reviews-mh .review-item:last-child{border-bottom:0!important}
.wp-reviews-mh .review-comment__user-name{font-family:var(--rvx-heading);font-weight:700!important;color:var(--rvx-ink)!important}
.wp-reviews-mh .review-comment__user-date,
.wp-reviews-mh .review-comment__user-info,
.wp-reviews-mh .review-comment__created-date{color:#64748b!important;font-size:12px!important}
.wp-reviews-mh .review-comment__title{font-family:var(--rvx-heading);font-weight:700!important;color:var(--rvx-ink)!important;text-decoration:none!important}
.wp-reviews-mh .review-comment__seller-name{color:var(--rvx-green-dark)!important;font-weight:600}
.wp-reviews-mh .review-comment__content{font-size:14px!important;line-height:1.7!important;color:#1e293b!important}
.wp-reviews-mh .review-comment__image{border-radius:10px!important}
.wp-reviews-mh .review-comment__thank,
.wp-reviews-mh .review-comment__reply{color:var(--rvx-green-dark)!important;font-weight:600}
/* Like button: only tint the thumb icon — the first <path> is a transparent 20×20 bounding box */
.wp-reviews-mh .review-comment__thank svg path:first-child{fill:none!important}
.wp-reviews-mh .review-comment__thank svg path[fill-rule="nonzero"]{fill:var(--rvx-green-dark)!important}
.wp-reviews-mh .review-comment__thank{display:inline-flex!important;align-items:center;gap:5px;padding:5px 12px!important;border:1px solid var(--rvx-mint-200)!important;border-radius:999px!important;background:var(--rvx-mint-50)!important;cursor:pointer}
.wp-reviews-mh .review-comment__thank svg{width:16px;height:16px}
.wp-reviews-mh .review-sub-comment{background:var(--rvx-canvas)!important;border-radius:12px!important;border:1px solid var(--rvx-line)}
.wp-reviews-mh .review-sub-comment__check-icon,
.wp-reviews-mh .review-comment__check-icon{filter:hue-rotate(-40deg) saturate(1.2)}

/* Comment form */
.wp-reviews-mh .comments-input_message,
.wp-reviews-mh .customer-comments__input input{
  border:1.5px solid #cbd5e1!important;
  border-radius:10px!important;
  font-family:var(--rvx-body)!important;
}
.wp-reviews-mh .comments-input_message:focus,
.wp-reviews-mh .customer-comments__input input:focus{
  border-color:var(--rvx-green)!important;
  box-shadow:0 0 0 3px rgba(5,150,105,.15)!important;
  outline:none;
}

/* Modal (Đánh giá sản phẩm) */
#modal-review .modal__container{border-radius:18px!important;font-family:var(--rvx-body)}
#modal-review .modal__title{font-family:var(--rvx-heading)!important;font-weight:800!important;color:var(--rvx-ink)!important}

/* Loop/single meta fallback (when theme does not take over) */
.wp_rv_product_info,.wp_rv_product-loop__meta{font-family:var(--rvx-body);color:var(--rvx-muted)}
.wp_rv_product_info .wp_rv_avg,.wp_rv_product-loop__meta .wp_rv_avg{font-weight:800;color:var(--rvx-ink)}

/* ===== Responsive ===== */
/* =====================================================================
 * v1.9.4 — COMPACT summary (one tidy row: score · bars · CTA) + Facebook-style verified badge
 * ===================================================================== */
.wp-reviews-mh .customer-reviews__top{
  display:flex!important;
  flex-wrap:wrap;
  align-items:center;
  gap:14px 24px;
  margin:0 0 12px!important;
  padding:14px 16px!important;
  border:1px solid var(--rvx-line);
  border-radius:14px;
  background:var(--rvx-canvas);
}
.wp-reviews-mh .customer-reviews__top .review-rating{flex:1 1 420px;margin:0!important}
.wp-reviews-mh .customer-reviews__top .review-rating__inner{display:flex!important;flex-wrap:nowrap;align-items:center;gap:24px;padding:0!important;border:0!important;background:transparent!important}
.wp-reviews-mh .review-rating__summary{display:flex!important;align-items:center;gap:12px;flex:0 0 auto}
.wp-reviews-mh .review-rating__point{font-size:38px!important}
.wp-reviews-mh .review-rating__detail{flex:1 1 auto;max-width:360px;margin:0!important}
.wp-reviews-mh .review-rating__level{gap:8px;margin:1px 0!important;line-height:1}
.wp-reviews-mh .review-rating__level .dYhelp{flex:0 0 auto;white-space:nowrap}
.wp-reviews-mh .review-rating__level .dYhelp svg{width:12px;height:12px}
.wp-reviews-mh .review-rating__level .KCfxa{flex:1 1 auto;min-width:70px;height:6px;border-radius:999px;background:#e2e8f0;overflow:hidden}
.wp-reviews-mh .review-rating__level .KCfxa > div{height:100%;border-radius:999px;background:linear-gradient(90deg,#f59e0b,#fbbf24)}
.wp-reviews-mh .review-rating__number{font-size:11.5px!important;min-width:24px}
/* Hide the empty "Hình ảnh đánh giá" block when there are no photos */
.wp-reviews-mh .review-rating__photos:not(:has(img, [style*="background"], .rv-video-btn)){display:none!important}
.wp-reviews-mh .customer-reviews__top .review-rating__actions{flex:0 0 auto;margin-left:auto}

/* Verified buyer badge — Facebook-style blue scalloped seal with white check */
.wp-reviews-mh .review-comment__check-icon,
.wp-reviews-mh .review-sub-comment__check-icon{
  display:inline-block!important;
  width:16px!important;
  height:16px!important;
  margin-left:4px;
  vertical-align:-3px;
  border-radius:0!important;
  background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%231877F2' d='M12 1.5l2.4 1.8 3-.2 1 2.8 2.6 1.5-.6 2.9 1.3 2.7-2.2 2 .1 3-2.9.8-1.6 2.5-2.9-.8L12 22.5l-2.2-1.9-2.9.8-1.6-2.5-2.9-.8.1-3-2.2-2 1.3-2.7-.6-2.9 2.6-1.5 1-2.8 3 .2z'/%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round' d='M7.6 12.3l3 3 5.8-6.2'/%3E%3C/svg%3E") center/contain no-repeat!important;
  filter:none!important;
}
.wp-reviews-mh .review-comment__check-icon::before,
.wp-reviews-mh .review-comment__check-icon::after,
.wp-reviews-mh .review-sub-comment__check-icon::before,
.wp-reviews-mh .review-sub-comment__check-icon::after{display:none!important;content:none!important}
.wp-reviews-mh .review-comment__seller-name{display:inline-flex!important;align-items:center;gap:2px}

@media(max-width:767px){
  .wp-reviews-mh .customer-reviews__top{padding:12px!important;gap:12px}
  .wp-reviews-mh .customer-reviews__top .review-rating__inner{flex-wrap:wrap;gap:12px}
  .wp-reviews-mh .review-rating__detail{max-width:none;width:100%}
  .wp-reviews-mh .customer-reviews__top .review-rating__actions{width:100%;margin-left:0}
}

/* ===== Responsive ===== */
@media(max-width:767px){
  .wp-review-mh__title{padding:16px 14px 10px!important;font-size:17px!important}
  .wp-review-mh__title + .wp-reviews-mh{padding:6px 14px 18px!important;border-radius:0 0 14px 14px!important}
  .wp-review-mh__title{border-radius:14px 14px 0 0!important}
  .wp-reviews-mh .review-rating__inner{gap:12px 16px;padding:12px!important}
  .wp-reviews-mh .review-rating__point{font-size:32px!important}
  .wp-reviews-mh .review-rating__actions{width:100%}
  .wp-reviews-mh .rv-btn-review{width:100%}
  .wp-reviews-mh .customer-comments__input input{font-size:16px!important}
  .wp-reviews-mh .comments-input_message{font-size:16px!important}
}
