/* ==========================================================================
   ZH FEEDBACK - Giao diện trang Góp ý & Đánh giá trải nghiệm
   Tuân thủ nghiêm ngặt chuẩn biến token --lx-* (zh-luxury.css)
   ========================================================================== */

/* Hero Banner & Thống kê tổng quan */
.fb-hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 32px;
}

.fb-stat-card {
  background: var(--lx-surface);
  border: 1px solid var(--lx-hair);
  border-radius: 18px;
  padding: 20px 22px;
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--lx-shadow-sm);
  transition: transform .25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow .25s ease, border-color .25s ease;
}

.fb-stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--lx-shadow);
  border-color: rgba(59, 130, 246, 0.4);
}

/* THẺ ĐÁNH GIÁ NỔI BẬT ĐẶC BIỆT (Golden Amber Luxury Glow) */
.fb-stat-card.fb-stat-highlight {
  border: 1.5px solid rgba(245, 158, 11, 0.55);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.10) 0%, var(--lx-surface) 55%, rgba(217, 119, 6, 0.06) 100%);
  box-shadow: 0 10px 28px -6px rgba(245, 158, 11, 0.25), 0 0 0 1px rgba(245, 158, 11, 0.18);
}

[data-theme="light"] .fb-stat-card.fb-stat-highlight {
  background: linear-gradient(135deg, #fffdf7 0%, #ffffff 55%, #fffbeb 100%);
  border-color: rgba(245, 158, 11, 0.6);
  box-shadow: 0 10px 26px -6px rgba(245, 158, 11, 0.20), 0 2px 8px rgba(0, 0, 0, 0.04);
}

.fb-stat-card.fb-stat-highlight:hover {
  transform: translateY(-4px);
  border-color: rgba(245, 158, 11, 0.88);
  box-shadow: 0 16px 36px -8px rgba(245, 158, 11, 0.36), 0 0 0 1px rgba(245, 158, 11, 0.45);
}

/* Tia sáng shimmer quét nhẹ qua thẻ đánh giá */
.fb-stat-card.fb-stat-highlight::after {
  content: '';
  position: absolute;
  top: -60%;
  left: -80%;
  width: 50%;
  height: 220%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transform: rotate(28deg);
  pointer-events: none;
  animation: fbGlowSweep 4.5s infinite ease-in-out;
}
@keyframes fbGlowSweep {
  0% { left: -80%; opacity: 0; }
  20% { opacity: 1; }
  45%, 100% { left: 160%; opacity: 0; }
}

.fb-stat-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
  transition: transform .25s ease;
}
.fb-stat-card:hover .fb-stat-icon {
  transform: scale(1.08);
}

.fb-stat-icon-gold {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 60%, #d97706 100%);
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(245, 158, 11, 0.42);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.fb-stat-icon-blue {
  background: color-mix(in srgb, #3b82f6 18%, transparent);
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.fb-stat-icon-green {
  background: color-mix(in srgb, #10b981 18%, transparent);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.fb-stat-body {
  flex: 1;
  min-width: 0;
}

.fb-stat-num-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}

.fb-stat-num {
  font-size: 28px;
  font-weight: 800;
  color: var(--lx-text);
  line-height: 1.1;
  letter-spacing: -0.5px;
  font-variant-numeric: tabular-nums;
}

/* Số vàng kim loại rực rỡ */
.fb-gold-num {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 60%, #b45309 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: 32px;
}
[data-theme="dark"] .fb-gold-num {
  background: linear-gradient(135deg, #fef08a 0%, #fbbf24 50%, #f59e0b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.fb-stat-slash {
  font-size: 15px;
  font-weight: 600;
  color: var(--lx-muted);
}

.fb-stat-unit {
  font-size: 16px;
  font-weight: 700;
  color: var(--lx-text);
}

.fb-stat-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.16);
  color: #d97706;
  border: 1px solid rgba(245, 158, 11, 0.35);
  letter-spacing: 0.2px;
  margin-left: auto;
}
[data-theme="dark"] .fb-stat-badge {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.2);
}

.fb-stat-lbl {
  font-size: 13px;
  color: var(--lx-text2);
  margin-top: 4px;
  line-height: 1.35;
}

/* Khối Form Gửi Feedback */
.fb-form-card {
  background: var(--lx-surface);
  border: 1px solid var(--lx-hair);
  border-radius: 20px;
  padding: 32px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  margin-top: 24px;
}
@media (max-width: 640px) {
  .fb-form-card { padding: 20px 16px; }
}

/* Category Chips */
.fb-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.fb-cat-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--lx-hair);
  background: var(--lx-surface2);
  color: var(--lx-text2);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s ease;
  user-select: none;
}
.fb-cat-btn:hover {
  border-color: var(--lx-gold-hi);
  color: var(--lx-text);
}
.fb-cat-btn.active {
  background: color-mix(in srgb, var(--lx-gold) 18%, var(--lx-surface2));
  border-color: var(--lx-gold-hi);
  color: var(--lx-gold-text, var(--lx-text));
  box-shadow: 0 0 14px color-mix(in srgb, var(--lx-gold) 25%, transparent);
}

/* Interactive Star Rating */
.fb-star-wrap {
  background: color-mix(in srgb, var(--lx-surface2) 70%, transparent);
  border: 1px dashed var(--lx-hair);
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  margin-bottom: 24px;
}

.fb-stars {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 8px;
}

.fb-star {
  font-size: 38px;
  color: var(--lx-muted, rgba(255, 255, 255, 0.2));
  cursor: pointer;
  transition: transform .15s ease, color .15s ease;
  user-select: none;
  line-height: 1;
}
.fb-star:hover {
  transform: scale(1.22);
}
.fb-star.hovered,
.fb-star.active {
  color: #f59e0b;
  text-shadow: 0 0 12px rgba(245, 158, 11, 0.5);
}

.fb-star-text {
  font-size: 15px;
  font-weight: 700;
  color: var(--lx-text);
  min-height: 22px;
}

/* Sub Ratings (Khía cạnh nhỏ) */
.fb-sub-ratings {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
  padding: 16px;
  border-radius: 14px;
  background: var(--lx-surface2);
  border: 1px solid var(--lx-hair);
}

.fb-sub-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.fb-sub-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--lx-text2);
}
.fb-sub-stars {
  display: inline-flex;
  gap: 4px;
}
.fb-sub-star {
  font-size: 18px;
  color: var(--lx-muted, rgba(255, 255, 255, 0.2));
  cursor: pointer;
  line-height: 1;
}
.fb-sub-star.active {
  color: #f59e0b;
}

/* Form inputs & textarea */
.fb-field {
  margin-bottom: 20px;
}
.fb-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--lx-text);
  margin-bottom: 6px;
}
.fb-label span.req {
  color: #ef4444;
}

.fb-textarea {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--lx-hair);
  background: var(--lx-surface2);
  color: var(--lx-text);
  padding: 14px 16px;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.6;
  resize: vertical;
  min-height: 120px;
  transition: border-color .15s ease, box-shadow .15s ease;
  box-sizing: border-box;
}
.fb-textarea:focus {
  outline: none;
  border-color: var(--lx-gold-hi);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--lx-gold) 20%, transparent);
}

.fb-meta-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--lx-muted);
  margin-top: 4px;
}

/* Photo Upload Box */
.fb-upload-box {
  border: 2px dashed var(--lx-hair);
  border-radius: 12px;
  padding: 18px;
  text-align: center;
  cursor: pointer;
  background: color-mix(in srgb, var(--lx-surface2) 50%, transparent);
  transition: all .2s ease;
}
.fb-upload-box:hover {
  border-color: var(--lx-gold-hi);
  background: color-mix(in srgb, var(--lx-gold) 6%, var(--lx-surface2));
}

.fb-preview-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
}

.fb-preview-item {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--lx-hair);
}
.fb-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.fb-preview-del {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* User Info Grid */
.fb-user-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.fb-input {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--lx-hair);
  background: var(--lx-surface2);
  color: var(--lx-text);
  padding: 10px 14px;
  font-family: inherit;
  font-size: 14px;
  transition: border-color .15s ease;
  box-sizing: border-box;
}
.fb-input:focus {
  outline: none;
  border-color: var(--lx-gold-hi);
}

.fb-check-lbl {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--lx-text2);
  cursor: pointer;
  user-select: none;
  margin-bottom: 24px;
}
.fb-check-lbl input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

/* Nút Submit */
.fb-submit-btn {
  width: 100%;
  padding: 14px 28px;
  font-size: 16px;
  font-weight: 700;
  border-radius: 14px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff !important;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all .2s ease;
  box-shadow: 0 4px 18px rgba(245, 158, 11, 0.35);
}
.fb-submit-btn:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(245, 158, 11, 0.45);
}
.fb-submit-btn:active {
  transform: translateY(0);
}

/* ---- Danh sách Cảm nhận & Lời chứng thực (Wall of Love) ---- */
.fb-reviews-sec {
  margin-top: 64px;
}

.fb-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}

.fb-review-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}
@media (max-width: 640px) {
  .fb-review-grid { grid-template-columns: 1fr; }
}

/* Thẻ Review Luxury & Sinh động */
.fb-review-card {
  background: var(--lx-surface);
  border: 1px solid var(--lx-hair);
  border-radius: 20px;
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: all .28s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}
.fb-review-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--lx-gold-hi), transparent);
  opacity: 0;
  transition: opacity .3s ease;
}
.fb-review-card:hover {
  transform: translateY(-5px);
  border-color: color-mix(in srgb, var(--lx-gold-hi) 65%, var(--lx-hair));
  box-shadow: 0 16px 36px -6px rgba(0, 0, 0, 0.35), 0 0 24px -4px color-mix(in srgb, var(--lx-gold) 20%, transparent);
}
.fb-review-card:hover::before {
  opacity: 1;
}

/* Dấu ngoặc kép trích dẫn nghệ thuật chìm */
.fb-quote-mark {
  position: absolute;
  top: 12px;
  right: 18px;
  font-size: 80px;
  font-family: Georgia, serif;
  line-height: 1;
  color: var(--lx-gold);
  opacity: 0.12;
  pointer-events: none;
  user-select: none;
  transition: opacity .3s ease, transform .3s ease;
}
.fb-review-card:hover .fb-quote-mark {
  opacity: 0.22;
  transform: scale(1.08) rotate(4deg);
}

/* Header Thẻ: Avatar + Thông tin cá nhân */
.fb-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
  z-index: 1;
}

.fb-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 17px;
  color: #fff;
  background: linear-gradient(135deg, var(--h-c1, #3b82f6), var(--h-c2, #8b5cf6));
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25), 0 0 0 2px color-mix(in srgb, var(--h-c1, #3b82f6) 40%, transparent);
}

.fb-user-info {
  flex: 1;
  min-width: 0;
}

.fb-name-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.fb-user-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--lx-text);
  margin: 0;
  line-height: 1.3;
}

/* Huy hiệu xác thực học viên - Pill bo góc mềm mại, không bao giờ bị tràn */
.fb-verified-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  background: color-mix(in srgb, #10b981 16%, var(--lx-surface2));
  color: #10b981;
  border: 1px solid color-mix(in srgb, #10b981 35%, transparent);
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1.2;
}
.fb-check-ic {
  width: 13px;
  height: 13px;
  fill: currentColor;
  flex-shrink: 0;
}

.fb-user-role {
  font-size: 13px;
  color: var(--lx-text2);
  margin-top: 3px;
  line-height: 1.4;
}

/* Hàng Rating & Category Tag riêng biệt */
.fb-rating-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 4px;
}

.fb-stars-gold {
  color: #f59e0b;
  font-size: 16px;
  letter-spacing: 2px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-shadow: 0 0 10px rgba(245, 158, 11, 0.35);
}

.fb-rating-num {
  font-size: 13px;
  font-weight: 700;
  color: #f59e0b;
  letter-spacing: 0;
  background: color-mix(in srgb, #f59e0b 16%, transparent);
  padding: 1px 7px;
  border-radius: 6px;
}

.fb-cat-tag {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 8px;
  background: var(--lx-surface2);
  color: var(--lx-gold-text);
  border: 1px solid var(--lx-hair);
  white-space: nowrap;
}
.fb-cat-tag.praise {
  background: color-mix(in srgb, #f59e0b 14%, var(--lx-surface2));
  color: #f59e0b;
  border-color: color-mix(in srgb, #f59e0b 30%, transparent);
}
.fb-cat-tag.feature {
  background: color-mix(in srgb, #3b82f6 14%, var(--lx-surface2));
  color: #60a5fa;
  border-color: color-mix(in srgb, #3b82f6 30%, transparent);
}
.fb-cat-tag.content {
  background: color-mix(in srgb, #8b5cf6 14%, var(--lx-surface2));
  color: #a78bfa;
  border-color: color-mix(in srgb, #8b5cf6 30%, transparent);
}
.fb-cat-tag.bug {
  background: color-mix(in srgb, #ef4444 14%, var(--lx-surface2));
  color: #f87171;
  border-color: color-mix(in srgb, #ef4444 30%, transparent);
}

/* Nội dung cảm nhận */
.fb-card-body {
  font-size: 14.5px;
  line-height: 1.68;
  color: var(--lx-text);
  white-space: pre-line;
  flex: 1;
  position: relative;
  z-index: 1;
}

/* Chân thẻ: Ngày tháng & Nút Like tương tác */
.fb-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--lx-muted);
  border-top: 1px solid var(--lx-hair);
  padding-top: 14px;
  margin-top: auto;
}

.fb-date-lbl {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--lx-text2);
  font-size: 12px;
}

.fb-like-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--lx-surface2);
  border: 1px solid var(--lx-hair);
  border-radius: 999px;
  padding: 4px 12px;
  color: var(--lx-text2);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s ease;
  user-select: none;
}
.fb-like-btn:hover {
  border-color: var(--lx-gold-hi);
  color: var(--lx-text);
  transform: translateY(-1px);
}
.fb-like-btn.liked {
  background: color-mix(in srgb, #3b82f6 18%, var(--lx-surface2));
  border-color: #3b82f6;
  color: #60a5fa;
}
.fb-like-btn.liked .fb-like-ic {
  transform: scale(1.2);
}

/* Modal Tri Ân & Confetti Canvas */
.fb-modal-ov {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fbFadeIn .2s ease;
}
@keyframes fbFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.fb-modal-box {
  background: var(--lx-surface);
  border: 1px solid var(--lx-gold-hi);
  border-radius: 24px;
  padding: 36px 28px;
  max-width: 480px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 30px color-mix(in srgb, var(--lx-gold) 30%, transparent);
  animation: fbScaleUp .25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
}
@keyframes fbScaleUp {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.fb-gift-code {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--lx-surface2);
  border: 1px dashed var(--lx-gold-hi);
  border-radius: 12px;
  padding: 12px 18px;
  margin: 18px 0;
}
.fb-gift-code b {
  font-size: 18px;
  letter-spacing: 2px;
  color: var(--lx-gold-hi);
}

#fbConfettiCanvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
}
