/* Shared help footer (community QR + support mailbox).
   Ported from prod/radeon-manager. Two deliberate differences from that version:
   - Visibility is decided server-side (``help_footer_visible``), so there is no
     `hide-site-help-footer` class and no inline script reading location.
   - The rail width is a custom property because this codebase's pages disagree:
     the gallery `.content` is 1180px and the profile `.content` is 1120px. A page
     with a different rail sets `--site-help-footer-rail` on `<body>`. */
body.with-site-help-footer {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  min-height: 100vh;
}
body.with-site-help-footer #root {
  flex: 1 0 auto;
  align-self: stretch;
  width: 100%;
  min-height: auto;
}

/* align-self:center is required: under a column flex + stretch, max-width alone
   leaves the rail stuck on the left instead of matching the centered content. */
.site-help-footer-wrap {
  align-self: center;
  width: min(100%, var(--site-help-footer-rail, 1180px));
  max-width: var(--site-help-footer-rail, 1180px);
  margin: 0;
  box-sizing: border-box;
  padding: 8px 24px 40px;
}

.site-help-footer {
  width: 100%;
  box-sizing: border-box;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 14px 32px rgba(25, 28, 65, 0.07);
  padding: 22px 28px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.site-help-footer-qr {
  flex: 0 0 auto;
  width: 112px;
  height: 112px;
  border: 1px solid #e8ebf3;
  border-radius: 10px;
  padding: 6px;
  box-sizing: border-box;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.site-help-footer-qr img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.site-help-footer-text {
  flex: 1 1 auto;
  min-width: 0;
}

.site-help-footer-title {
  font-size: 22px;
  font-weight: 800;
  color: #3b6fff;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
  line-height: 1.3;
}

.site-help-footer-desc {
  margin: 0;
  color: #3a4256;
  font-size: 14px;
  line-height: 1.7;
}

.site-help-footer-desc a {
  color: #3a4256;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.site-help-footer-desc a:hover {
  color: #3b6fff;
}

.site-help-footer-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
}

/* Secondary by design: reading the docs is the cheaper path, but filing a
   report is the one we must not make people hunt for. */
.site-help-footer-docs {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 22px;
  border: 1px solid #3b6fff;
  border-radius: 8px;
  background: transparent;
  color: #3b6fff;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.site-help-footer-docs:hover {
  background: rgba(59, 111, 255, 0.08);
  color: #2f5fe0;
}

.site-help-footer-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 22px;
  border-radius: 8px;
  background: #3b6fff;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(59, 111, 255, 0.24);
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

.site-help-footer-cta:hover {
  background: #2f5fe0;
  color: #fff;
  box-shadow: 0 10px 22px rgba(59, 111, 255, 0.28);
}

@media (max-width: 640px) {
  .site-help-footer-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .site-help-footer-wrap {
    padding: 8px 16px 28px;
  }
  .site-help-footer {
    flex-direction: column;
    align-items: flex-start;
    padding: 18px 18px;
    gap: 14px;
  }
  .site-help-footer-qr {
    width: 96px;
    height: 96px;
  }
  .site-help-footer-title {
    font-size: 20px;
  }
}

/* Bilingual secondary text. English sits alongside the Chinese rather than
   replacing it: lighter weight and a step down in size, so the Chinese stays
   the primary read and the footer keeps one visual hierarchy. */
.site-help-footer-title-en {
  margin-left: 8px;
  font-size: 16px;
  font-weight: 600;
  color: #7a89a8;
  letter-spacing: 0;
}

.site-help-footer-desc-en {
  margin-top: 4px;
  font-size: 13px;
  color: #6b7794;
  line-height: 1.6;
}

.site-help-footer-btn-en {
  margin-left: 5px;
  font-size: 12px;
  opacity: 0.75;
}
