/*
 * Tingee QR Tools
 * Every rule is scoped to .tqr so nothing leaks into the theme, and the
 * rules re-state the properties Flatsome sets globally on inputs, buttons,
 * labels, lists and headings (margins, inset shadows, fixed heights...).
 * Palette and shapes follow tingee.vn: Mulish, red #e12a41, navy #191e36,
 * pill buttons, white cards with a soft red-tinted shadow.
 */

.tqr {
  --tqr-red: #e12a41;
  --tqr-red-dark: #c81f35;
  --tqr-red-soft: #fdecee;
  --tqr-red-ring: rgba(225, 42, 65, 0.18);
  --tqr-navy: #191e36;
  --tqr-navy-soft: #eef0f6;
  --tqr-napas: #093f7d;
  --tqr-text: #1a1a1a;
  --tqr-text-2: #3a3a3a;
  --tqr-muted: #6c6c6c;
  --tqr-border: #e0e0e0;
  --tqr-border-strong: #d0d0d0;
  --tqr-subtle: #f6f6f6;
  --tqr-surface: #ffffff;
  --tqr-success: #1f7a4a;
  --tqr-success-soft: #e7f5ed;
  --tqr-warn: #9a5b00;
  --tqr-warn-soft: #fff4e0;
  --tqr-danger: #b2041d;
  --tqr-danger-soft: #fdecee;
  --tqr-radius: 12px;
  --tqr-radius-lg: 16px;
  --tqr-shadow: 0 4px 12px rgba(186, 28, 28, 0.12);
  --tqr-shadow-lg: 0 18px 40px -12px rgba(25, 30, 54, 0.22);
  --tqr-font: Mulish, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --tqr-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;

  font-family: var(--tqr-font);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--tqr-text-2);
  -webkit-font-smoothing: antialiased;
}

.tqr *,
.tqr *::before,
.tqr *::after {
  box-sizing: border-box;
}

.tqr [hidden] {
  display: none !important;
}

.tqr .tqr-sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.tqr h1,
.tqr h2,
.tqr h3,
.tqr h4 {
  font-family: var(--tqr-font);
  color: var(--tqr-text);
  letter-spacing: normal;
  text-transform: none;
  margin: 0;
}

.tqr p {
  margin: 0;
}

.tqr ul,
.tqr ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.tqr li {
  margin: 0;
}

.tqr a {
  color: var(--tqr-red);
  text-decoration: none;
}

.tqr a:hover {
  color: var(--tqr-red-dark);
}

.tqr code,
.tqr pre,
.tqr kbd {
  font-family: var(--tqr-mono);
}

.tqr :focus-visible {
  outline: 3px solid var(--tqr-red-ring);
  outline-offset: 2px;
}

.tqr-container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 15px;
}

/* ---------- Hero (matches the pink title band of tingee.vn pages) ---------- */

.tqr-hero {
  position: relative;
  overflow: hidden;
  padding: 44px 0 40px;
  text-align: center;
  /* Light centre behind the text, pink towards the edges (like the tingee.vn FAQ banner) */
  background:
    radial-gradient(ellipse 60% 120% at 50% 50%, #ffffff 0%, rgba(255, 255, 255, 0.85) 40%, rgba(255, 255, 255, 0) 75%),
    linear-gradient(90deg, #fcd9df 0%, #fff4f6 50%, #fcd9df 100%);
  border-bottom: 1px solid #fbe3e7;
}

/* Dotted decorations, kept in the corners and faded so they never sit behind text */
.tqr-hero::before,
.tqr-hero::after {
  content: '';
  position: absolute;
  width: 180px;
  height: 110px;
  background: radial-gradient(circle, rgba(225, 42, 65, 0.4) 0 2px, transparent 2.5px) 0 0 / 18px 18px;
  pointer-events: none;
}

.tqr-hero::before {
  top: 18px;
  left: 3%;
  -webkit-mask-image: linear-gradient(90deg, #000 30%, transparent);
  mask-image: linear-gradient(90deg, #000 30%, transparent);
}

.tqr-hero::after {
  right: 3%;
  bottom: 14px;
  -webkit-mask-image: linear-gradient(270deg, #000 30%, transparent);
  mask-image: linear-gradient(270deg, #000 30%, transparent);
}

.tqr-hero__title {
  position: relative;
  font-size: 36px;
  line-height: 1.25;
  font-weight: 900;
  color: var(--tqr-red) !important;
}

.tqr-hero__lead {
  position: relative;
  max-width: 760px;
  margin: 12px auto 0 !important;
  font-size: 17px;
  font-weight: 500;
  color: #2f2f2f;
}

.tqr-hero__chips {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 18px !important;
}

.tqr-hero__chips li {
  padding: 4px 14px;
  font-size: 13px;
  font-weight: 700;
  color: var(--tqr-red);
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid #f7c5cd;
  border-radius: 999px;
}

.tqr-hero__bank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 52px;
  margin-bottom: 14px;
  padding: 8px;
  background: #fff;
  border-radius: 12px;
  box-shadow: var(--tqr-shadow);
}

.tqr-hero__bank img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* ---------- Tool area ---------- */

.tqr-tool-wrap {
  padding: 32px 0 8px;
}

.tqr-mount {
  min-height: 560px;
}

.tqr-mount--compact {
  min-height: 360px;
}

/* Reserved height is only for the skeleton */
.tqr-mount.is-ready {
  min-height: 0;
}

.tqr-card {
  background: var(--tqr-surface);
  border: 1px solid #f1e3e5;
  border-radius: var(--tqr-radius-lg);
  box-shadow: var(--tqr-shadow);
  padding: 24px;
}

/* Vertical rhythm between the blocks of a tool (grid, integration, promo) */
.tqr-tool > * + * {
  margin-top: 24px;
}

/* Themes add a bottom margin to every <form>; it would shorten the stretched card */
.tqr form.tqr-card {
  margin: 0;
}

/* Both columns share the height of the taller one */
.tqr-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 24px;
  align-items: stretch;
}

.tqr-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.tqr-card__title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px !important;
  font-weight: 800;
  line-height: 1.3;
}

.tqr-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  color: var(--tqr-red);
  background: var(--tqr-red-soft);
  border-radius: 10px;
}

.tqr-card__desc {
  margin: -10px 0 18px !important;
  font-size: 14px;
  color: var(--tqr-muted);
}

/* Skeleton shown until the tool's script runs, and the no-JS notice */
.tqr-skeleton {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 24px;
}

.tqr-skeleton > div {
  height: 520px;
  border-radius: var(--tqr-radius-lg);
  background: linear-gradient(90deg, #f6f6f6 0%, #fbfbfb 50%, #f6f6f6 100%) 0 0 / 200% 100%;
  animation: tqr-shimmer 1.4s ease-in-out infinite;
}

.tqr-mount--compact .tqr-skeleton > div {
  height: 340px;
}

@keyframes tqr-shimmer {
  to {
    background-position: -200% 0;
  }
}

.tqr-noscript {
  padding: 16px 20px;
  color: var(--tqr-warn);
  background: var(--tqr-warn-soft);
  border-radius: var(--tqr-radius);
}

/* ---------- Form controls ---------- */

.tqr-fields {
  display: grid;
  /* minmax(0, 1fr): long nowrap text (bank names) must not widen the column */
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

.tqr-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.tqr-field {
  min-width: 0;
}

.tqr .tqr-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 6px;
  padding: 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--tqr-text);
  text-transform: none;
  letter-spacing: normal;
}

.tqr-label__req {
  color: var(--tqr-red);
  margin-left: 2px;
}

.tqr-label__aside {
  font-size: 12px;
  font-weight: 600;
  color: var(--tqr-muted);
}

.tqr-hint {
  margin-top: 6px !important;
  font-size: 13px;
  line-height: 1.45;
  color: var(--tqr-muted);
}

.tqr-hint--accent {
  font-weight: 700;
  color: var(--tqr-red);
}

.tqr-hint--error {
  color: var(--tqr-danger);
}

.tqr .tqr-input,
.tqr .tqr-select,
.tqr .tqr-textarea {
  display: block;
  width: 100%;
  max-width: none;
  height: auto;
  min-height: 46px;
  margin: 0;
  padding: 11px 14px;
  font-family: var(--tqr-font);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--tqr-text);
  letter-spacing: normal;
  text-transform: none;
  background: #fff;
  border: 1px solid var(--tqr-border-strong);
  border-radius: 10px;
  box-shadow: none;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
  -webkit-appearance: none;
  appearance: none;
}

.tqr .tqr-input::placeholder,
.tqr .tqr-textarea::placeholder {
  font-weight: 500;
  color: #a3a3a3;
  opacity: 1;
}

.tqr .tqr-input:hover,
.tqr .tqr-select:hover,
.tqr .tqr-textarea:hover {
  border-color: #b9b9b9;
}

.tqr .tqr-input:focus,
.tqr .tqr-select:focus,
.tqr .tqr-textarea:focus {
  outline: none;
  border-color: var(--tqr-red);
  box-shadow: 0 0 0 4px var(--tqr-red-ring);
}

.tqr .tqr-input[aria-invalid='true'] {
  border-color: var(--tqr-danger);
}

.tqr .tqr-select {
  padding-right: 40px;
  cursor: pointer;
  background: #fff
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236c6c6c' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E")
    no-repeat right 14px center;
}

.tqr .tqr-textarea {
  min-height: 120px;
  resize: vertical;
}

.tqr .tqr-textarea--mono {
  font-family: var(--tqr-mono);
  font-size: 13px;
  font-weight: 500;
  word-break: break-all;
}

.tqr-input-wrap {
  position: relative;
}

.tqr-input-wrap > svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--tqr-muted);
  pointer-events: none;
}

.tqr .tqr-input-wrap > .tqr-input {
  padding-left: 42px;
}

.tqr-input-suffix {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  font-weight: 700;
  color: var(--tqr-muted);
  pointer-events: none;
}

.tqr .tqr-input-wrap > .tqr-input--suffix {
  padding-right: 52px;
}

.tqr-input--big {
  font-size: 18px !important;
  letter-spacing: 0.02em !important;
}

/* Segmented choice (radio buttons) */
.tqr .tqr-fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.tqr .tqr-fieldset > legend {
  float: left;
  width: 100%;
  margin: 0 0 6px;
  padding: 0;
  line-height: 1.4;
  text-transform: none;
  letter-spacing: normal;
  border: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--tqr-text);
}

.tqr-fieldset > legend + * {
  clear: both;
}

.tqr-choices {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.tqr-choices--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tqr-choices--5 {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.tqr .tqr-choice {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 74px;
  margin: 0;
  padding: 10px 6px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  color: var(--tqr-text-2);
  background: #fff;
  border: 1px solid var(--tqr-border-strong);
  border-radius: 10px;
  cursor: pointer;
  transition:
    border-color 0.15s,
    background 0.15s,
    color 0.15s;
}

.tqr .tqr-choice:hover {
  border-color: #f09aa6;
}

.tqr .tqr-choice input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.tqr .tqr-choice:has(input:checked),
.tqr .tqr-choice.is-checked {
  color: var(--tqr-red);
  background: var(--tqr-red-soft);
  border-color: var(--tqr-red);
}

.tqr .tqr-choice:has(input:focus-visible) {
  box-shadow: 0 0 0 4px var(--tqr-red-ring);
}

.tqr-choice svg {
  flex-shrink: 0;
}

.tqr-choices--compact .tqr-choice {
  min-height: 44px;
  flex-direction: row;
}

/* Color input */
.tqr-color {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tqr .tqr-color input[type='color'] {
  width: 46px;
  height: 46px;
  margin: 0;
  padding: 3px;
  background: #fff;
  border: 1px solid var(--tqr-border-strong);
  border-radius: 10px;
  box-shadow: none;
  cursor: pointer;
}

.tqr-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tqr .tqr-swatch {
  width: 28px;
  height: 28px;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--tqr-border-strong);
  cursor: pointer;
}

.tqr .tqr-swatch[aria-pressed='true'] {
  box-shadow: 0 0 0 2px var(--tqr-text);
}

/* ---------- Buttons ---------- */

.tqr .tqr-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  margin: 0;
  padding: 10px 22px;
  font-family: var(--tqr-font);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: normal;
  text-transform: none;
  text-decoration: none;
  white-space: nowrap;
  color: #fff;
  background: var(--tqr-red);
  border: 1px solid var(--tqr-red);
  border-radius: 999px;
  box-shadow: none;
  cursor: pointer;
  transition:
    background 0.15s,
    border-color 0.15s,
    color 0.15s,
    transform 0.1s;
}

.tqr .tqr-btn:hover {
  color: #fff;
  background: var(--tqr-red-dark);
  border-color: var(--tqr-red-dark);
}

.tqr .tqr-btn:active {
  transform: translateY(1px);
}

.tqr .tqr-btn:disabled,
.tqr .tqr-btn[aria-disabled='true'] {
  color: #9a9a9a;
  background: #efeff1;
  border-color: #efeff1;
  cursor: not-allowed;
  transform: none;
}

.tqr .tqr-btn--ghost:disabled {
  background: #fff;
  border-color: var(--tqr-border);
}

.tqr .tqr-btn--navy {
  background: var(--tqr-navy);
  border-color: var(--tqr-navy);
}

.tqr .tqr-btn--navy:hover {
  background: #2a3152;
  border-color: #2a3152;
}

.tqr .tqr-btn--ghost {
  color: var(--tqr-text);
  background: #fff;
  border-color: var(--tqr-border-strong);
}

.tqr .tqr-btn--ghost:hover {
  color: var(--tqr-red);
  background: #fff;
  border-color: var(--tqr-red);
}

.tqr .tqr-btn--sm {
  min-height: 34px;
  padding: 6px 14px;
  font-size: 13px;
}

.tqr .tqr-btn--block {
  width: 100%;
}

.tqr-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

/* ---------- Bank picker ---------- */

.tqr-bank {
  position: relative;
}

.tqr .tqr-bank__button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 58px;
  margin: 0;
  padding: 8px 44px 8px 10px;
  font-family: var(--tqr-font);
  text-align: left;
  text-transform: none;
  letter-spacing: normal;
  color: var(--tqr-text);
  background: #fff
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236c6c6c' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E")
    no-repeat right 16px center;
  border: 1px solid var(--tqr-border-strong);
  border-radius: 10px;
  box-shadow: none;
  cursor: pointer;
}

.tqr .tqr-bank__button:hover {
  border-color: #b9b9b9;
}

.tqr .tqr-bank__button[aria-expanded='true'] {
  border-color: var(--tqr-red);
  box-shadow: 0 0 0 4px var(--tqr-red-ring);
}

.tqr .tqr-bank__button:disabled {
  cursor: default;
  background-image: none;
  background-color: var(--tqr-subtle);
}

.tqr-bank__logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 40px;
  flex-shrink: 0;
  padding: 4px 6px;
  background: #fff;
  border: 1px solid var(--tqr-border);
  border-radius: 8px;
}

.tqr-bank__logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.tqr-bank__text {
  min-width: 0;
  flex: 1;
}

.tqr-bank__short {
  display: block;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.3;
}

.tqr-bank__name {
  display: block;
  overflow: hidden;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.35;
  color: var(--tqr-muted);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.tqr-bank__pop {
  position: absolute;
  z-index: 50;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--tqr-border);
  border-radius: 14px;
  box-shadow: var(--tqr-shadow-lg);
}

.tqr-bank__search {
  padding: 10px;
  border-bottom: 1px solid var(--tqr-border);
}

.tqr .tqr-bank__search .tqr-input {
  min-height: 42px;
  font-size: 15px;
}

.tqr-bank__list {
  max-height: min(380px, 55vh);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 4px 6px 8px;
}

.tqr-bank__group {
  padding: 10px 8px 4px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--tqr-muted);
}

.tqr-bank__option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 8px;
  cursor: pointer;
}

.tqr-bank__option .tqr-bank__logo {
  width: 48px;
  height: 32px;
}

.tqr-bank__option.is-active {
  background: var(--tqr-subtle);
}

.tqr-bank__option[aria-selected='true'] .tqr-bank__short {
  color: var(--tqr-red);
}

.tqr-bank__bin {
  flex-shrink: 0;
  font-family: var(--tqr-mono);
  font-size: 12px;
  color: var(--tqr-muted);
}

.tqr-bank__empty {
  padding: 22px 12px;
  font-size: 14px;
  text-align: center;
  color: var(--tqr-muted);
}

/* ---------- Preview ---------- */

.tqr-preview {
  display: flex;
  flex-direction: column;
}

/* Push the privacy note to the bottom when the column is stretched */
.tqr-preview > .tqr-privacy {
  margin-top: auto !important;
  padding-top: 14px;
}

.tqr-preview__frame {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
  padding: 14px;
  background: #fff;
  border: 1px dashed var(--tqr-border-strong);
  border-radius: var(--tqr-radius);
}

.tqr-preview__frame--tall {
  aspect-ratio: auto;
}

.tqr-preview__frame img {
  display: block;
  width: 100%;
  max-width: 340px;
  height: auto;
  transition:
    filter 0.25s,
    opacity 0.25s;
}

.tqr-preview__frame.is-placeholder img {
  filter: blur(6px);
  opacity: 0.45;
}

.tqr-preview__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  color: var(--tqr-text);
}

.tqr-preview__overlay span {
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.tqr-summary {
  display: grid;
  gap: 6px;
  margin: 16px 0 !important;
  padding: 14px 16px;
  background: var(--tqr-subtle);
  border-radius: var(--tqr-radius);
}

.tqr-summary > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
  line-height: 1.45;
}

.tqr .tqr-summary dt,
.tqr .tqr-summary dd,
.tqr .tqr-details dt,
.tqr .tqr-details dd {
  text-transform: none;
  letter-spacing: normal;
}

.tqr-summary dt {
  flex-shrink: 0;
  font-weight: 600;
  color: var(--tqr-muted);
}

.tqr-summary dd {
  min-width: 0;
  margin: 0;
  font-weight: 700;
  text-align: right;
  color: var(--tqr-text);
  overflow-wrap: anywhere;
}

.tqr-summary dd.is-amount {
  color: var(--tqr-red);
}

.tqr-privacy {
  display: flex;
  gap: 8px;
  margin-top: 14px !important;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--tqr-muted);
}

.tqr-privacy svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--tqr-success);
}

/* ---------- Promo ---------- */

.tqr-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: linear-gradient(100deg, #fff 40%, #fdecee 100%);
}

.tqr-cta__body .tqr-hint {
  margin-top: 4px !important;
  font-size: 14px;
}

/* ---------- Code blocks ---------- */

.tqr-code {
  overflow: hidden;
  border: 1px solid var(--tqr-border);
  border-radius: var(--tqr-radius);
}

.tqr-code + .tqr-code {
  margin-top: 12px;
}

.tqr-code__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px 8px 14px;
  background: var(--tqr-subtle);
  border-bottom: 1px solid var(--tqr-border);
}

.tqr-code__label {
  font-size: 13px;
  font-weight: 800;
  color: var(--tqr-text);
}

.tqr-code__tools {
  display: flex;
  gap: 6px;
}

.tqr .tqr-code pre {
  max-height: 220px;
  margin: 0;
  padding: 12px 14px;
  overflow: auto;
  font-size: 13px;
  line-height: 1.6;
  color: var(--tqr-text);
  white-space: pre-wrap;
  word-break: break-all;
  overflow-wrap: anywhere;
  background: #fff;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

/* Themes (Flatsome) style <code> as an inline grey chip that never wraps */
.tqr .tqr-code pre code {
  display: block;
  margin: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  white-space: inherit;
  word-break: inherit;
  overflow-wrap: inherit;
  background: none;
  border: 0;
  border-radius: 0;
}

/* ---------- Tabs ---------- */

.tqr-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px !important;
  padding: 4px;
  background: var(--tqr-subtle);
  border-radius: 999px;
  width: fit-content;
  max-width: 100%;
}

.tqr .tqr-tab {
  min-height: 36px;
  margin: 0;
  padding: 6px 16px;
  font-family: var(--tqr-font);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  text-transform: none;
  letter-spacing: normal;
  color: var(--tqr-text-2);
  background: transparent;
  border: 0;
  border-radius: 999px;
  box-shadow: none;
  cursor: pointer;
}

.tqr .tqr-tab[aria-selected='true'] {
  color: #fff;
  background: var(--tqr-red);
}

/* ---------- Toast & notes ---------- */

.tqr-toast {
  position: fixed;
  z-index: 99999;
  left: 50%;
  bottom: 28px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  font-family: var(--tqr-font);
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  background: var(--tqr-navy);
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  transform: translateX(-50%);
  animation: tqr-toast 0.2s ease-out;
}

@keyframes tqr-toast {
  from {
    opacity: 0;
    transform: translate(-50%, 8px);
  }
}

.tqr-alert {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--tqr-text-2);
  background: var(--tqr-subtle);
  border-radius: 10px;
}

.tqr-alert strong {
  flex-shrink: 0;
}

.tqr-alert--error {
  color: var(--tqr-danger);
  background: var(--tqr-danger-soft);
}

.tqr-alert--warn {
  background: var(--tqr-warn-soft);
}

.tqr-alert--warn strong {
  color: var(--tqr-warn);
}

.tqr-alert--success {
  color: var(--tqr-success);
  background: var(--tqr-success-soft);
}

.tqr-alert + .tqr-alert {
  margin-top: 8px;
}

.tqr-progress {
  height: 8px;
  overflow: hidden;
  background: var(--tqr-subtle);
  border-radius: 999px;
}

.tqr-progress > span {
  display: block;
  height: 100%;
  background: var(--tqr-red);
  border-radius: inherit;
  transition: width 0.2s;
}

/* ---------- Decoder ---------- */

.tqr-drop {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 240px;
  margin: 0;
  padding: 20px;
  text-align: center;
  background: #fffafa;
  border: 2px dashed #f1b5bf;
  border-radius: var(--tqr-radius);
  cursor: pointer;
  transition:
    background 0.15s,
    border-color 0.15s;
}

.tqr-drop:hover,
.tqr-drop.is-dragging {
  background: var(--tqr-red-soft);
  border-color: var(--tqr-red);
}

.tqr-drop:focus-within {
  box-shadow: 0 0 0 4px var(--tqr-red-ring);
}

.tqr-drop input[type='file'] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.tqr-drop__icon {
  color: var(--tqr-red);
}

.tqr-drop__title {
  font-size: 15px;
  font-weight: 800;
  color: var(--tqr-text);
}

.tqr-drop__sub {
  font-size: 13px;
  color: var(--tqr-muted);
}

.tqr-drop__preview {
  max-width: 100%;
  max-height: 200px;
  object-fit: contain;
  border-radius: 8px;
}

.tqr-decode-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.tqr-decode-bank {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.tqr-decode-bank .tqr-bank__logo {
  width: 64px;
  height: 46px;
}

.tqr-decode-bank h2 {
  font-size: 20px !important;
  font-weight: 800;
  line-height: 1.3;
}

.tqr-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tqr-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  font-size: 12.5px;
  font-weight: 800;
  color: var(--tqr-text-2);
  background: var(--tqr-subtle);
  border-radius: 999px;
}

.tqr-badge--ok {
  color: var(--tqr-success);
  background: var(--tqr-success-soft);
}

.tqr-badge--bad {
  color: var(--tqr-danger);
  background: var(--tqr-danger-soft);
}

.tqr-keyfacts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.tqr-keyfact {
  min-width: 0;
  padding: 14px 16px;
  background: var(--tqr-subtle);
  border-radius: var(--tqr-radius);
}

.tqr-keyfact__label {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--tqr-muted);
}

.tqr-keyfact__value {
  margin-top: 4px;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.35;
  color: var(--tqr-text);
  overflow-wrap: anywhere;
}

.tqr-keyfact__value.is-mono {
  font-family: var(--tqr-mono);
  font-size: 16px;
}

.tqr-keyfact__hint {
  margin-top: 4px;
  font-size: 13px;
  color: var(--tqr-muted);
  overflow-wrap: anywhere;
}

.tqr-muted {
  color: var(--tqr-muted);
  font-weight: 600;
}

.tqr-subtitle {
  margin: 22px 0 10px !important;
  font-size: 16px !important;
  font-weight: 800;
}

.tqr-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 24px;
  margin: 0;
}

.tqr-details > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  font-size: 14px;
  border-bottom: 1px solid var(--tqr-border);
}

.tqr-details dt {
  flex-shrink: 0;
  font-weight: 600;
  color: var(--tqr-muted);
}

.tqr-details dd {
  min-width: 0;
  margin: 0;
  font-weight: 700;
  text-align: right;
  color: var(--tqr-text);
  overflow-wrap: anywhere;
}

.tqr-details dd small {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--tqr-muted);
}

.tqr-tlv {
  overflow: hidden;
  border: 1px solid var(--tqr-border);
  border-radius: var(--tqr-radius);
}

.tqr-tlv__row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--tqr-border);
}

.tqr-tlv__row:last-child {
  border-bottom: 0;
}

.tqr-tlv__row.is-nested {
  background: #fcfcfc;
}

.tqr-tlv__id,
.tqr-tlv__len {
  flex-shrink: 0;
  padding: 1px 7px;
  font-family: var(--tqr-mono);
  font-size: 12.5px;
  font-weight: 700;
  border-radius: 6px;
}

.tqr-tlv__id {
  color: #fff;
  background: var(--tqr-navy);
}

.tqr-tlv__len {
  color: var(--tqr-text-2);
  background: var(--tqr-subtle);
}

.tqr-tlv__body {
  min-width: 0;
  flex: 1;
}

.tqr-tlv__name {
  font-size: 14px;
  font-weight: 700;
  color: var(--tqr-text);
}

.tqr-tlv__value {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  color: var(--tqr-text-2);
  word-break: break-all;
}

.tqr-tlv__meaning {
  margin-top: 2px;
  font-size: 13px;
  font-weight: 600;
  color: var(--tqr-red);
}

/* ---------- Batch ---------- */

.tqr-batch-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  margin-top: 14px !important;
}

.tqr-batch-list figure {
  margin: 0;
  padding: 8px;
  text-align: center;
  background: #fff;
  border: 1px solid var(--tqr-border);
  border-radius: 10px;
}

.tqr-batch-list img {
  width: 100%;
  height: auto;
}

.tqr-batch-list figcaption {
  margin-top: 4px;
  overflow: hidden;
  font-family: var(--tqr-mono);
  font-size: 11.5px;
  color: var(--tqr-text-2);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.tqr-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-size: 13px;
  font-weight: 700;
  color: var(--tqr-muted);
}

.tqr-stats strong {
  color: var(--tqr-text);
}

/* ---------- Guide (server-rendered, indexable) ---------- */

.tqr-guide {
  padding: 24px 0 56px;
}

.tqr-section {
  padding: 36px 0;
  border-top: 1px solid #f0e4e6;
}

.tqr-section:first-child {
  border-top: 0;
}

.tqr-section__eyebrow {
  margin-bottom: 6px !important;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--tqr-red);
}

.tqr-section__title {
  margin-bottom: 22px !important;
  font-size: 28px !important;
  font-weight: 900;
  line-height: 1.3;
}

.tqr-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  counter-reset: tqr-step;
}

.tqr-steps--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tqr-step {
  position: relative;
  padding: 22px 18px 18px;
  background: #fff;
  border: 1px solid #f1e3e5;
  border-radius: var(--tqr-radius);
  box-shadow: var(--tqr-shadow);
  counter-increment: tqr-step;
}

.tqr-step::before {
  content: counter(tqr-step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin-bottom: 12px;
  font-size: 15px;
  font-weight: 900;
  color: #fff;
  background: var(--tqr-red);
  border-radius: 50%;
}

.tqr-step h3 {
  margin-bottom: 6px !important;
  font-size: 16px !important;
  font-weight: 800;
  line-height: 1.35;
}

.tqr-step p,
.tqr-feature p {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--tqr-text-2);
}

.tqr-features {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.tqr-feature {
  display: flex;
  gap: 14px;
  padding: 20px;
  background: #fff;
  border: 1px solid #f1e3e5;
  border-radius: var(--tqr-radius);
}

.tqr-feature__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  color: var(--tqr-red);
  border: 2px solid var(--tqr-red);
  border-radius: 10px;
}

.tqr-feature h3 {
  margin-bottom: 4px !important;
  font-size: 16px !important;
  font-weight: 800;
}

/* FAQ, styled like the Flatsome accordion on tingee.vn/faq */
.tqr-faq {
  display: grid;
  gap: 12px;
}

.tqr-faq details {
  background: #fff;
  border: 1px solid #d8d8d8;
  border-radius: 8px;
  box-shadow: 0 4px 4px rgba(0, 0, 0, 0.05);
}

.tqr-faq summary {
  position: relative;
  display: block;
  padding: 14px 48px 14px 16px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--tqr-text);
  list-style: none;
  cursor: pointer;
}

.tqr-faq summary::-webkit-details-marker {
  display: none;
}

.tqr-faq summary::after {
  content: '';
  position: absolute;
  right: 18px;
  top: 50%;
  width: 9px;
  height: 9px;
  margin-top: -7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.2s;
}

.tqr-faq details[open] summary {
  color: var(--tqr-red);
  border-bottom: 1px dashed #d8d8d8;
}

.tqr-faq details[open] summary::after {
  margin-top: -2px;
  transform: rotate(-135deg);
}

.tqr-faq__answer {
  padding: 14px 16px 16px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--tqr-text-2);
}

.tqr-faq__answer p + p {
  margin-top: 8px !important;
}

/* Related tools and bank chips */
/* auto-fit: 2, 3 or 4 cards always share one full row, no orphan card */
.tqr-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.tqr .tqr-link-card {
  display: block;
  padding: 20px;
  color: var(--tqr-text-2);
  background: #fff;
  border: 1px solid #f1e3e5;
  border-radius: var(--tqr-radius);
  box-shadow: var(--tqr-shadow);
  transition:
    transform 0.15s,
    border-color 0.15s;
}

.tqr .tqr-link-card:hover {
  color: var(--tqr-text-2);
  border-color: var(--tqr-red);
  transform: translateY(-2px);
}

.tqr-link-card__title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 16px;
  font-weight: 800;
  color: var(--tqr-text);
}

.tqr-link-card__title::after {
  content: '→';
  color: var(--tqr-red);
}

.tqr-link-card__desc {
  display: block;
  margin-top: 6px;
  font-size: 14px;
  line-height: 1.55;
}

.tqr-chips {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 20px !important;
}

.tqr .tqr-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 8px 10px;
  font-size: 14px;
  font-weight: 700;
  color: var(--tqr-text);
  background: #fff;
  border: 1px solid var(--tqr-border);
  border-radius: 10px;
}

.tqr .tqr-chip:hover {
  color: var(--tqr-red);
  border-color: var(--tqr-red);
}

.tqr-chip img {
  width: 40px;
  height: 26px;
  flex-shrink: 0;
  object-fit: contain;
}

.tqr-chip span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* Hub page */
.tqr-hub {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  padding: 32px 0 8px;
}

.tqr .tqr-hub__card {
  display: flex;
  gap: 18px;
  padding: 24px;
  color: var(--tqr-text-2);
  background: #fff;
  border: 1px solid #f1e3e5;
  border-radius: var(--tqr-radius-lg);
  box-shadow: var(--tqr-shadow);
  transition:
    transform 0.15s,
    border-color 0.15s;
}

/* Odd number of tools: the first (main) tool spans the row as a featured card */
.tqr .tqr-hub__card:first-child:nth-last-child(odd) {
  grid-column: 1 / -1;
  align-items: center;
  padding: 28px 32px;
  background: linear-gradient(100deg, #fff 45%, #fdecee 100%);
}

.tqr .tqr-hub__card:first-child:nth-last-child(odd) h2 {
  font-size: 22px !important;
}

.tqr .tqr-hub__card:first-child:nth-last-child(odd) .tqr-feature__icon {
  width: 56px;
  height: 56px;
  color: #fff;
  background: var(--tqr-red);
  border-color: var(--tqr-red);
}

.tqr .tqr-hub__card:hover {
  color: var(--tqr-text-2);
  border-color: var(--tqr-red);
  transform: translateY(-2px);
}

.tqr-hub__card h2 {
  margin-bottom: 6px !important;
  font-size: 19px !important;
  font-weight: 800;
}

.tqr-hub__card p {
  font-size: 14.5px;
  line-height: 1.6;
}

.tqr-hub__cta {
  display: inline-block;
  margin-top: 10px;
  font-size: 14px;
  font-weight: 800;
  color: var(--tqr-red);
}

/* API docs */
.tqr-docs {
  padding: 32px 0 8px;
}

.tqr-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--tqr-border);
  border-radius: var(--tqr-radius);
}

.tqr .tqr-table {
  width: 100%;
  margin: 0;
  border-collapse: collapse;
  font-size: 14px;
}

.tqr .tqr-table th,
.tqr .tqr-table td {
  padding: 10px 14px;
  text-align: left;
  vertical-align: top;
  border: 0;
  border-bottom: 1px solid var(--tqr-border);
}

.tqr .tqr-table th {
  font-size: 13px;
  font-weight: 800;
  color: var(--tqr-text);
  text-transform: none;
  letter-spacing: normal;
  background: var(--tqr-subtle);
}

.tqr .tqr-table tr:last-child td {
  border-bottom: 0;
}

.tqr .tqr-table code {
  padding: 1px 6px;
  font-size: 12.5px;
  color: var(--tqr-red-dark);
  background: var(--tqr-red-soft);
  border-radius: 5px;
}

.tqr-docs .tqr-section__title {
  font-size: 24px !important;
}

.tqr-docs p + p,
.tqr-docs p + .tqr-code,
.tqr-docs .tqr-code + p {
  margin-top: 12px !important;
}

.tqr-docs-example {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 20px;
  align-items: start;
}

.tqr-docs-example img {
  width: 100%;
  height: auto;
  border: 1px solid var(--tqr-border);
  border-radius: var(--tqr-radius);
}

/* ---------- Responsive ---------- */

@media (max-width: 1024px) {
  .tqr-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

}

@media (max-width: 849px) {
  .tqr-grid,
  .tqr-skeleton {
    grid-template-columns: minmax(0, 1fr);
  }

  .tqr-skeleton > div:last-child {
    display: none;
  }


  .tqr-keyfacts {
    grid-template-columns: minmax(0, 1fr);
  }

  .tqr-details {
    grid-template-columns: minmax(0, 1fr);
  }

  .tqr-hub {
    grid-template-columns: minmax(0, 1fr);
  }

  .tqr-docs-example {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 549px) {
  .tqr-hero {
    padding: 30px 0 28px;
  }

  .tqr-hero__title {
    font-size: 26px;
  }

  .tqr-hero__lead {
    font-size: 15px;
  }

  .tqr-hero::before,
  .tqr-hero::after {
    display: none;
  }

  .tqr-card {
    padding: 18px 16px;
    border-radius: 14px;
  }

  .tqr-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .tqr-cta {
    flex-direction: column;
    align-items: stretch;
  }

  .tqr-choices,
  .tqr-choices--5 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tqr-choices--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .tqr-steps,
  .tqr-steps--3,
  .tqr-features,
  .tqr-links {
    grid-template-columns: minmax(0, 1fr);
  }

  .tqr-section {
    padding: 28px 0;
  }

  .tqr-section__title {
    font-size: 22px !important;
  }

  .tqr-mount {
    min-height: 900px;
  }

  .tqr-skeleton > div {
    height: 860px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tqr *,
  .tqr *::before,
  .tqr *::after {
    animation: none !important;
    transition: none !important;
  }
}

@media print {
  .tqr-hero,
  .tqr-guide,
  .tqr-form,
  .tqr-actions,
  .tqr-toast {
    display: none !important;
  }

  .tqr-card {
    box-shadow: none;
    border: 0;
  }
}
