/* ==========================================================================
   Footer 组件样式 footer.css
   还原 React Footer.tsx 的视觉效果
   ========================================================================== */

/* --------------------------------------------------------------------------
   Footer 主容器 - 黑色背景白色文字
   -------------------------------------------------------------------------- */
.footer {
  width: 100%;
  /* background-color: #000; */
  color: #000;
  overflow: visible;
}

/* 内部容器：66%宽度居中，120px高度，左右两栏 */
.footer__inner {
  width: 80%;
  min-width: 640px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 0;
}

/* --------------------------------------------------------------------------
   左侧信息区
   -------------------------------------------------------------------------- */
.footer__left {
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: left;
  font-size: 12px;
}

/* 第1行：公司名 + 备案凭证链接 */
.footer__company {
  margin: 6px 0;
  font-size: 14px;
}

.footer__license-trigger {
  font-size: 12px;
  cursor: pointer;
  margin-left: 4px;
  transition: opacity 0.2s ease;
}

.footer__license-trigger:hover {
  opacity: 0.7;
}

/* 第2行：药监局提示 */
.footer__notice {
  margin: 6px 0;
  opacity: 0.7;
  line-height: 1.4;
  font-size: 12px;
}

/* 第3行：版权 + 链接 */
.footer__copyright {
  margin: 6px 0;
  font-size: 9px;
  opacity: 0.7;
}

.footer__beian-link {
  display: inline-block;
  margin: 0 30px;
}

.footer__beian-link:hover {
  text-decoration: underline;
}

.footer__privacy-link {
  font-size: 12px;
}

.footer__privacy-link:hover {
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   右侧社交图标区
   -------------------------------------------------------------------------- */
.footer__right {
  display: flex;
  align-items: center;
}

.footer__social {
  position: relative;
  margin-left: 10px;
  display: inline-block;
}

.footer__social-link {
  display: inline-block;
}

.footer__social-icon {
  height: 13px;
  width: auto;
  display: block;
  filter: brightness(0);
}

/* 微信二维码 - hover 显示 */
.footer__qrcode {
  position: absolute;
  left: 0;
  bottom: 100%;
  padding-bottom: 10px;
  display: none;
  z-index: 9;
}

.footer__qrcode img {
  width: 100px;
  height: auto;
  display: block;
}

.footer__social--wechat:hover .footer__qrcode {
  display: block;
}

/* --------------------------------------------------------------------------
   医疗器械证书弹窗
   -------------------------------------------------------------------------- */
.footer__modal {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  cursor: pointer;
}

.footer__modal.is-open {
  opacity: 1;
  visibility: visible;
}

.footer__modal-img {
  width: 400px;
  height: 565px;
  z-index: 999;
  display: block;
}

/* --------------------------------------------------------------------------
   移动端响应式
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  .footer__inner {
    min-width: unset !important;
    width: 90%;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 24px 0;
  }

  .footer__left {
    text-align: center;
  }

  .footer__left p {
    justify-content: center;
  }

  .footer__right {
    justify-content: center;
  }

  /* 版权链接换行 */
  .footer__copyright {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
  }

  .footer__copyright a {
    margin: 0 !important;
  }

  /* 社交图标放大 */
  .footer__right img {
    height: 20px !important;
  }

  .footer__right a,
  .footer__right .footer__social {
    margin-left: 16px;
  }

  /* 证书弹窗自适应 */
  .footer__modal-img {
    width: auto !important;
    max-width: 90vw !important;
    height: auto !important;
    max-height: 80vh;
  }
}
