/* ========================
 * 底部二维码弹窗样式 - QRcode Modal
 * ======================== */

/* 底部二维码网格布局 */
.footer-qrcode-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 10px;
}

@media (max-width: 767px) {
  .footer-qrcode-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
}

/* 单个二维码项 — 卡片风格 */
.footer-qrcode-item {
  text-align: center;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  padding: 10px 8px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.footer-qrcode-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
  border-color: rgba(0, 0, 0, 0.1);
}

.footer-qrcode-item:hover .footer-qrcode-img {
  border-color: var(--bs-primary, #0d6efd);
}

/* 二维码图片容器 */
.footer-qrcode-img-wrap {
  position: relative;
  width: 100%;
  padding-bottom: 100%; /* 1:1 */
  overflow: hidden;
  border-radius: 12px;
  margin-bottom: 8px;
}

.footer-qrcode-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  transition: border-color 0.3s ease;
  background: #fff;
  padding: 6px;
  box-sizing: border-box;
}

/* 二维码标签文字 */
.footer-qrcode-label {
  font-size: 12px;
  color: #555;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
}

/* ========================
 * 弹窗放大二维码 — 纯净浮动卡片（无遮罩）
 * ======================== */

/* 浮动卡片容器 */
.qrcode-popup-float {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 99999;
  background: #fff;
  border-radius: 20px;
  padding: 30px 22px 22px;
  text-align: center;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(0, 0, 0, 0.06);
  max-width: 300px;
  width: 90vw;
  animation: qrcodeFadeIn 0.25s ease;
}

@keyframes qrcodeFadeIn {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.92); }
  to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* 关闭按钮 */
.qrcode-popup-float-close {
  position: absolute;
  top: 10px;
  right: 16px;
  width: 30px;
  height: 30px;
  line-height: 30px;
  text-align: center;
  font-size: 20px;
  cursor: pointer;
  color: #999;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.04);
  transition: background 0.2s ease, color 0.2s ease;
  user-select: none;
}
.qrcode-popup-float-close:hover {
  background: rgba(0, 0, 0, 0.12);
  color: #333;
}

/* 弹窗内图片 */
.qrcode-popup-float .qrcode-popup-img {
  max-width: 200px;
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto 14px;
  border-radius: 16px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.1);
  background: #fff;
  padding: 10px;
  box-sizing: border-box;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

/* 弹窗内标签 */
.qrcode-popup-float .qrcode-popup-label {
  font-size: 16px;
  font-weight: 600;
  color: #222;
  margin-bottom: 10px;
}

/* 弹窗内提示文字 */
.qrcode-popup-float .qrcode-popup-tip {
  font-size: 13px;
  color: #888;
  line-height: 1.6;
  margin-top: 2px;
}

/* 旧区域图片点击指针 */
.footer-contact-wrap img {
  cursor: pointer;
  transition: opacity 0.2s ease;
}
.footer-contact-wrap img:hover {
  opacity: 0.85;
}

/* ========================
 * 暗色模式
 * ======================== */
[data-bs-theme="dark"] .footer-qrcode-item {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.06);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

[data-bs-theme="dark"] .footer-qrcode-item:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.35);
  border-color: rgba(255, 255, 255, 0.12);
}

[data-bs-theme="dark"] .footer-qrcode-img {
  border-color: #444;
}

[data-bs-theme="dark"] .footer-qrcode-label {
  color: #aaa;
}

[data-bs-theme="dark"] .qrcode-popup-inner {
  background: #1e1e1e;
}

[data-bs-theme="dark"] .qrcode-popup-img {
  background: #2a2a2a;
  border-color: rgba(255, 255, 255, 0.08);
}

[data-bs-theme="dark"] .qrcode-popup-label {
  color: #eee;
}

[data-bs-theme="dark"] .qrcode-popup-tip {
  color: #888;
}

[data-bs-theme="dark"] .qrcode-popup-float {
  background: #1e1e1e;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.08);
}

[data-bs-theme="dark"] .qrcode-popup-float .qrcode-popup-img {
  background: #2a2a2a;
  border-color: rgba(255, 255, 255, 0.08);
}

[data-bs-theme="dark"] .qrcode-popup-float .qrcode-popup-label {
  color: #eee;
}

[data-bs-theme="dark"] .qrcode-popup-float .qrcode-popup-tip {
  color: #888;
}

[data-bs-theme="dark"] .qrcode-popup-float-close {
  background: rgba(255, 255, 255, 0.08);
  color: #999;
}
[data-bs-theme="dark"] .qrcode-popup-float-close:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #eee;
}
