/* 微信分享浮层（不依赖主题样式，全部自绘） */
.gtws-lock {
  overflow: hidden;
}

.gtws-overlay {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  inset: 0;
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
  padding: 24px;
}

.gtws-overlay.is-open {
  display: flex;
}

.gtws-dialog {
  position: relative;
  background: #fff;
  border-radius: 12px;
  padding: 24px; /* 四边一致 */
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
  text-align: center;
  max-width: 320px;
  width: calc(var(--gtws-qr, 190px) + 48px); /* 二维码 + 左右 padding，四边留白一致 */
}

.gtws-title {
  font-size: 15px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0 0 14px;
  line-height: 1.45;
  white-space: pre-line; /* 双语两行 */
}

.gtws-body {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%; /* 让二维码能按卡片内宽计算尺寸 */
}

/* 旧内核无 gap：用相邻外边距兜底（现代浏览器 gap 生效时 margin 由 :not 排除） */
@supports not (gap: 10px) {
  .gtws-body > * + * {
    margin-top: 10px;
  }
}

.gtws-qr {
  max-width: 100%;
  position: relative;
  display: block;
  line-height: 0;
}

.gtws-qr canvas,
.gtws-qr img:not(.gtws-logo) {
  display: block;
  width: 100% !important;
  height: auto !important;
}

.gtws-logo {
  width: 32px !important;
  height: 32px !important;
}

.gtws-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 32px;
  height: 32px;
  margin: -16px 0 0 -16px;
  border-radius: 6px;
  background: #fff;
  padding: 2px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.gtws-hint,
.gtws-guide {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: #666;
  white-space: pre-line; /* 英文 + 西班牙语各一行 */
}

.gtws-guide {
  padding: 8px 4px 12px;
  color: #333;
}

.gtws-close {
  position: absolute;
  top: 6px;
  right: 8px;
  width: 28px;
  height: 28px;
  line-height: 24px;
  border: 0;
  background: transparent;
  font-size: 22px;
  color: #999;
  cursor: pointer;
  padding: 0;
}

.gtws-close:hover {
  color: #333;
}
