/* TKXD Help Center — styles scoped to .tkxd-help-section */
.tkxd-help-section {
  margin-top: 26px;
  margin-bottom: 26px;
  padding: clamp(16px, 3vw, 28px);
  border: 1px solid rgba(221, 174, 91, .35);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(36, 22, 17, .98), rgba(22, 15, 13, .98));
  color: #fff4df;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .14);
}
.tkxd-help-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}
.tkxd-help-kicker {
  display: inline-block;
  color: #e9bd6c;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
}
.tkxd-help-heading h2 {
  margin: 6px 0 7px;
  color: #fff2d7;
  font-size: clamp(22px, 3vw, 32px);
  line-height: 1.2;
}
.tkxd-help-heading p {
  max-width: 680px;
  margin: 0;
  color: #d3c4b5;
  font-size: 14px;
  line-height: 1.6;
}
.tkxd-help-contact {
  flex: 0 0 auto;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 42px;
  padding: 10px 15px;
  border-radius: 10px;
  color: #21150c !important;
  background: linear-gradient(135deg, #f3d18c, #d7a34f);
  text-decoration: none !important;
  font-weight: 800;
  font-size: 13px;
}
.tkxd-help-search {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 13px;
  border: 1px solid rgba(235, 207, 161, .28);
  border-radius: 12px;
  background: rgba(255,255,255,.07);
}
.tkxd-help-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff8eb;
  font: inherit;
  font-size: 14px;
}
.tkxd-help-search input::placeholder { color: #b6a99c; }
.tkxd-help-search button {
  border: 0;
  padding: 4px 7px;
  background: transparent;
  color: #e8d5b7;
  font-size: 23px;
  cursor: pointer;
}
.tkxd-help-categories {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 14px 0;
}
.tkxd-help-categories button {
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid rgba(235, 207, 161, .23);
  border-radius: 999px;
  background: rgba(255,255,255,.055);
  color: #eadcc8;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.tkxd-help-categories button.active,
.tkxd-help-categories button:hover {
  border-color: #e3b96b;
  background: #e3b96b;
  color: #24170d;
}
.tkxd-help-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.tkxd-faq-card {
  align-self: start;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(235, 207, 161, .2);
  border-radius: 12px;
  background: rgba(255,255,255,.045);
}
.tkxd-faq-question {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 11px;
  padding: 14px;
  border: 0;
  background: transparent;
  color: #fff2df;
  text-align: left;
  font: inherit;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.5;
  cursor: pointer;
}
.tkxd-faq-question:focus-visible,
.tkxd-help-categories button:focus-visible,
.tkxd-help-contact:focus-visible {
  outline: 2px solid #f4d48e;
  outline-offset: 3px;
}
.tkxd-faq-icon {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: rgba(227,185,107,.14);
  color: #f0ca80;
  font-size: 17px;
}
.tkxd-faq-question-text { flex: 1; }
.tkxd-faq-chevron { color: #e3b96b; font-size: 18px; }
.tkxd-faq-answer {
  padding: 0 15px 15px 59px;
  color: #d9cdbf;
  font-size: 13px;
  line-height: 1.75;
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.tkxd-faq-answer a { color: #f1cc82; text-decoration: underline; }
.tkxd-faq-image {
  display: block;
  width: min(100%, 380px);
  max-height: 260px;
  object-fit: contain;
  margin: 0 0 12px;
  border-radius: 8px;
}
.tkxd-faq-placeholder {
  display: none;
  width: min(100%, 380px);
  min-height: 72px;
  margin: 0 0 12px;
  padding: 12px;
  border: 1px dashed rgba(235,207,161,.25);
  border-radius: 8px;
  color: #a99b8c;
  font-size: 12px;
  align-items: center;
  justify-content: center;
}
.tkxd-faq-loading, .tkxd-faq-empty {
  grid-column: 1 / -1;
  padding: 20px;
  border: 1px dashed rgba(235,207,161,.25);
  border-radius: 12px;
  color: #d0c0af;
  text-align: center;
  font-size: 14px;
}
.tkxd-help-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 17px;
  padding-top: 15px;
  border-top: 1px solid rgba(235,207,161,.18);
  color: #cdbdab;
  font-size: 13px;
}
.tkxd-help-bottom a { color: #f1cc82; font-weight: 800; text-decoration: none; }
@media (max-width: 680px) {
  .tkxd-help-section { margin-top: 16px; margin-bottom: 18px; padding: 15px; border-radius: 14px; }
  .tkxd-help-heading { display: block; margin-bottom: 14px; }
  .tkxd-help-heading h2 { font-size: 23px; }
  .tkxd-help-heading p { font-size: 13px; }
  .tkxd-help-contact { width: 100%; margin-top: 12px; min-height: 42px; }
  .tkxd-help-search { min-height: 46px; }
  .tkxd-help-categories { flex-wrap: nowrap; overflow-x: auto; padding: 2px 1px 7px; margin: 12px 0; scrollbar-width: thin; }
  .tkxd-help-categories button { flex: 0 0 auto; padding: 8px 11px; font-size: 12px; }
  .tkxd-help-list { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .tkxd-faq-question { padding: 12px; font-size: 13px; }
  .tkxd-faq-answer { padding: 0 13px 14px 57px; font-size: 13px; }
  .tkxd-help-bottom { display: block; line-height: 1.7; }
  .tkxd-help-bottom a { display: inline-block; margin-top: 4px; }
}

/* Floating FAQ launcher and slide-out panel */
.tkxd-help-launcher {
  position: fixed;
  z-index: 10020;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(22px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 70px;
  height: 70px;
  padding: 7px 4px;
  border: 2px solid #f5d28a;
  border-radius: 50%;
  background: linear-gradient(145deg, #3a2117, #160d0a);
  color: #fff2d7;
  box-shadow: 0 7px 24px rgba(0,0,0,.35), 0 0 0 4px rgba(229,181,94,.15);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.tkxd-help-launcher-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255,235,190,.8);
  border-radius: 50%;
  background: linear-gradient(145deg, #f7d58f, #c98a32);
  color: #28170b;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: -.04em;
}
.tkxd-help-launcher-label { font-size: 11px; line-height: 1; font-weight: 800; }
.tkxd-help-launcher:focus-visible, .tkxd-help-close:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.tkxd-help-backdrop[hidden] { display: none; }
.tkxd-help-backdrop {
  position: fixed;
  z-index: 10010;
  inset: 0;
  background: rgba(5,4,4,.56);
  backdrop-filter: blur(2px);
}
.tkxd-help-panel {
  display: block;
  position: fixed;
  z-index: 10015;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(102px, calc(env(safe-area-inset-bottom) + 92px));
  width: min(460px, calc(100vw - 36px));
  max-height: min(78vh, 760px);
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(221,174,91,.55);
  border-radius: 18px;
  background: #180f0c;
  color: #fff4df;
  box-shadow: 0 18px 60px rgba(0,0,0,.48);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(12px) scale(.98);
  transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
}
.tkxd-help-panel.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}
.tkxd-help-panel-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 16px;
  background: linear-gradient(100deg, #352017, #1c100c);
  border-bottom: 1px solid rgba(235,207,161,.2);
  color: #f2ce87;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .07em;
}
.tkxd-help-close {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 50%;
  background: rgba(255,255,255,.07);
  color: #fff4df;
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
}
.tkxd-help-panel-content {
  max-height: calc(min(78vh, 760px) - 61px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px;
  scrollbar-width: thin;
}
.tkxd-help-panel .tkxd-help-heading { display: block; margin-bottom: 14px; }
.tkxd-help-panel .tkxd-help-heading h2 { font-size: clamp(21px, 5vw, 27px); }
.tkxd-help-panel .tkxd-help-heading p { font-size: 13px; }
.tkxd-help-panel .tkxd-help-contact { width: 100%; margin-top: 12px; }
.tkxd-help-panel .tkxd-help-categories { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; }
.tkxd-help-panel .tkxd-faq-list { grid-template-columns: minmax(0,1fr); }
.tkxd-help-panel .tkxd-faq-answer { padding-left: 14px; }
body.tkxd-help-open { overflow: hidden; }
@media (max-width: 520px) {
  .tkxd-help-launcher { right: max(13px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); width: 62px; height: 62px; }
  .tkxd-help-launcher-icon { width: 30px; height: 30px; }
  .tkxd-help-panel { right: 10px; bottom: calc(max(16px, env(safe-area-inset-bottom)) + 74px); width: calc(100vw - 20px); max-height: min(78dvh, 760px); border-radius: 15px; }
  .tkxd-help-panel-content { max-height: calc(min(78dvh, 760px) - 61px); padding: 13px; }
}
@media (prefers-reduced-motion: reduce) { .tkxd-help-panel { transition: none; } }

/* Ảnh FAQ: không tràn khung trên máy tính và điện thoại */
#help-center img,
.faq-answer img,
.faq-content img,
.answer-content img,
.help-answer img {
    max-width: 100% !important;
    height: auto !important;
    box-sizing: border-box;
    object-fit: contain;
}

/* Ngăn nội dung dài làm rộng khung FAQ */
.faq-answer,
.faq-content,
.answer-content,
.help-answer {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
}

/* Ảnh lớn nằm gọn trong vùng trả lời */
.faq-answer img,
.faq-content img,
.answer-content img,
.help-answer img {
    display: block;
    margin: 12px auto;
    border-radius: 10px;
}
