.qr-wrapper {
  display: flex;
  gap: var(--space-16, 16px);
  align-items: flex-start;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card, 12px);
  background: #fff;
}

.qr-panel {
  flex: 1;
  min-width: 0;
}

.qr-image {
  width: 280px;
  height: 280px;
  object-fit: contain;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card, 12px);
  padding: 12px;
  background: #fff;
  flex: 0 0 280px;
}

.qr-help {
  color: #475569;
  line-height: 1.55;
  margin: 0 0 12px;
  font-size: 14px;
}

.qr-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.72);
}

.qr-modal-backdrop.is-open {
  display: flex;
}

.qr-modal-dialog {
  position: relative;
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  max-width: calc(100vw - 32px);
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.24);
}

.qr-modal-image {
  width: 420px;
  height: 420px;
  max-width: calc(100vw - 80px);
  max-height: calc(100vh - 120px);
  object-fit: contain;
  display: block;
}

.qr-modal-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: #f1f5f9;
  color: #0f172a;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

@media (max-width: 720px) {
  .qr-wrapper {
    flex-direction: column;
    align-items: center;
  }

  .qr-image {
    width: min(280px, 100%);
    height: auto;
    aspect-ratio: 1;
    flex: none;
  }

  .qr-panel {
    width: 100%;
  }

  .qr-modal-image {
    width: min(420px, calc(100vw - 80px));
    height: auto;
    aspect-ratio: 1;
  }
}

/* Zalo community QR — lớn hơn QR thanh toán để dễ quét */
.zalo-qr-block {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  margin-top: 8px;
  padding: 20px;
  border: 2px solid #0f766e;
  border-radius: 16px;
  background: linear-gradient(180deg, #f0fdfa 0%, #fff 48%);
  box-shadow: 0 8px 24px rgba(15, 118, 110, 0.12);
}

.zalo-qr-block--compact {
  padding: 16px;
}

.zalo-qr-visual {
  flex: 0 0 auto;
  padding: 16px;
  background: #fff;
  border: 2px solid #cbd5e1;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
}

.zalo-qr-image {
  width: 360px;
  height: 360px;
  max-width: 100%;
  object-fit: contain;
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
}

.zalo-qr-block--compact .zalo-qr-image {
  width: 280px;
  height: 280px;
}

.zalo-qr-panel {
  flex: 1;
  min-width: 0;
  padding-top: 8px;
}

.zalo-qr-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 12px;
}

.zalo-qr-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

@media (max-width: 720px) {
  .zalo-qr-block {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .zalo-qr-panel {
    width: 100%;
    padding-top: 0;
  }

  .zalo-qr-actions {
    justify-content: center;
  }

  .zalo-qr-image {
    width: min(320px, calc(100vw - 80px));
    height: auto;
    aspect-ratio: 1;
  }
}

.qr-modal-backdrop[data-zalo-modal] .qr-modal-image {
  width: min(480px, calc(100vw - 48px));
  height: auto;
  aspect-ratio: 1;
}
