/* 不在 body 上使用 overflow:hidden，避免主文档滚动条被收起；背景滚动由 trial-popup.js 拦截 */

.trial-popup {
  position: fixed;
  inset: 0;
  z-index: 4000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(7, 20, 45, 0.42);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.trial-popup[hidden] {
  display: none;
}

.trial-popup.is-open {
  opacity: 1;
  visibility: visible;
}

/* 设计稿主画板约 800×500；外框圆角 8px */
.trial-popup__dialog {
  position: relative;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  width: min(800px, calc(100vw - 48px));
  height: min(500px, calc(100vh - 48px));
  max-height: min(500px, calc(100vh - 48px));
  overflow: hidden;
  border-radius: 8px;
  /* 不用实体 border，避免绝对定位底图只铺满 padding 区、一圈露出白底 */
  border: 0;
  box-shadow: inset 0 0 0 1px rgba(184, 212, 240, 0.9), 0 24px 64px rgba(15, 38, 84, 0.18);
  /* 与底图边缘接近，抗锯齿/加载前也不易出现白圈 */
  background-color: #e8f0fa;
}

/*
 * Pixso 0_2893：底图 + 50% 白罩层。
 * 网页里不再使用 Mask_0_2892：导出 mask 边缘常透明，会透出白底形成「白边」。
 */
.trial-popup__dialog::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  border-radius: inherit;
  background-image: linear-gradient(
      rgba(255, 255, 255, 0.5),
      rgba(255, 255, 255, 0.5)
    ),
    url("/assets/images/popup/pixso/9614998a26bab1ca24b9b1e6d633ba69a8fe0c42.png");
  background-size: 100% 100%, 100% 100%;
  background-position: center, center;
  background-repeat: no-repeat;
}

/* Pixso Vector_0_2884：叠在右侧（left 约 420.29/800，width 约 379.71/800） */
.trial-popup__dialog::after {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 50%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  background-image: url("/assets/images/popup/pixso/Vector_0_2884.png");
  background-repeat: no-repeat;
  background-size: 100% 100%;
  background-position: center;
}

.trial-popup__content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  flex: 1;
  min-height: 0;
  align-items: stretch;
}

.trial-popup__section {
  position: relative;
  box-sizing: border-box;
  min-height: 0;
}

.trial-popup__section--intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 64px 32px 40px;
  text-align: center;
}

.trial-popup__section--contact {
  --trial-popup-contact-icon-size: 26px;
  --trial-popup-contact-gap: 14px;
  display: flex;
  flex-direction: column;
  padding: 66px 40px 36px 54px;
}

.trial-popup__close {
  position: absolute;
  top: 20px;
  right: 22px;
  z-index: 2;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  color: #8a8b8b;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.trial-popup__close:hover {
  background: rgba(255, 255, 255, 0.98);
  color: #5f6775;
  transform: rotate(90deg);
}

.trial-popup__close:focus-visible {
  outline: 2px solid #0f69e6;
  outline-offset: 2px;
}

/*左栏标题 Pixso-paragraph-0_2885：28px Bold #1d2234 */
.trial-popup__title {
  margin: 0;
  color: #1d2234;
  font-size: 28px;
  line-height: 1.25;
  font-weight: 700;
  text-shadow: 0 2px 2px rgba(255, 255, 255, 0.16);
}

/* 左栏副标题 Pixso-paragraph-0_2886：16px Medium #8a8b8b */
.trial-popup__subtitle {
  margin: 12px 0 0;
  color: #8a8b8b;
  font-size: 16px;
  line-height: 1.5;
  font-weight: 500;
  text-shadow: 0 2px 2px rgba(255, 255, 255, 0.16);
}

.trial-popup__intro-copy {
  margin-bottom: 0;
}

/* 二维码外框：224×224，圆角 21px，描边 2px #b8d4f0；内图 204×204，圆角 12px */
.trial-popup__qr-shell {
  margin-top: 24px;

  box-sizing: border-box;

  border-radius: 21px;
  background: #ffffff;
  border: 2px solid #b8d4f0;
}

.trial-popup__qr {
  display: block;
  width: 204px;
  height: 204px;
  object-fit: cover;
  border-radius: 12px;
}

/*微信提示 Pixso-paragraph-0_2887：16px Bold #0f69e6 */
.trial-popup__wechat {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  color: #0f69e6;
  font-size: 16px;
  line-height: 1.4;
  font-weight: 700;
  text-shadow: 0 2px 2px rgba(255, 255, 255, 0.16);
}

.trial-popup__wechat-icon {
  width: 25px;
  height: 20px;
  flex-shrink: 0;
}

/* 右栏「联系方式」Pixso-paragraph-0_2898：22px Bold */
.trial-popup__contact-title {
  margin: 0;
  color: #1d2234;
  font-size: 22px;
  line-height: 1.3;
  font-weight: 700;
  text-shadow: 0 2px 2px rgba(255, 255, 255, 0.16);
}

/* Pixso-paragraph-0_2899：16px Medium #8a8b8b */
.trial-popup__contact-note {
  margin: 10px 0 0;
  color: #8a8b8b;
  font-size: 16px;
  line-height: 1.5;
  font-weight: 500;
  text-shadow: 0 2px 2px rgba(255, 255, 255, 0.16);
}

.trial-popup__contact-copy {
  padding-right: 8px;
}

.trial-popup__contact-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 22px;
}

/* 与 Pixso 一致：图标在首行首列，标签在首行第二列；号码/地址在第二行自第 1 列起（与图标左缘对齐，见 0_2905/0_2913的 left:0） */
.trial-popup__contact-item {
  display: grid;
  grid-template-columns: var(--trial-popup-contact-icon-size) minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: start;
  column-gap: var(--trial-popup-contact-gap);
  row-gap: 6px;
}

.trial-popup__contact-icon {
  grid-row: 1;
  grid-column: 1;
  width: var(--trial-popup-contact-icon-size);
  height: var(--trial-popup-contact-icon-size);
}

/* 标签 Pixso-paragraph-0_2906 / 0_2914：16px Medium #121827 */
.trial-popup__contact-label {
  grid-row: 1;
  grid-column: 2;
  margin: 0;
  min-width: 0;
  color: #121827;
  font-size: 16px;
  line-height: 1.4;
  font-weight: 500;
  text-align: left;
  text-shadow: 0 2px 2px rgba(255, 255, 255, 0.16);
}

/* 热线号码 Pixso-paragraph-0_2905：18px Bold #1850a2；第二行整行，左缘与图标对齐 */
.trial-popup__contact-value {
  grid-row: 2;
  grid-column: 1 / -1;
  margin: 0;
  color: #1850a2;
  font-size: 18px;
  line-height: 1.3;
  font-weight: 700;
  text-decoration: none;
  text-align: left;
  text-shadow: 0 2px 2px rgba(255, 255, 255, 0.16);
}

.trial-popup__contact-item--mobile .trial-popup__contact-value {
  color: #1d51a4;
}

.trial-popup__contact-value:hover {
  opacity: 0.88;
}

/* 地址块与导出0_2916 相同：整块自图标列左缘起排（left 约 0～3px） */
.trial-popup__contact-address-block {
  grid-row: 2;
  grid-column: 1 / -1;
  margin: 0;
  min-width: 0;
}

/*地址 Pixso-text-0_2916：14px，行高 22px；段落间距 1px（Pixso-paragraph-0_2916_1 margin-top） */
.trial-popup__contact-address {
  margin: 0;
  color: #121827;
  font-size: 14px;
  line-height: 22px;
  font-weight: 500;
  text-align: left;
  text-shadow: 0 2px 2px rgba(255, 255, 255, 0.16);
}

.trial-popup__contact-address + .trial-popup__contact-address {
  margin-top: 1px;
}

/* 底部说明 Pixso-paragraph-0_2925：14px，行高 28px */
.trial-popup__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  margin-top: auto;
  padding-top: 20px;
  color: #6b7280;
  font-size: 14px;
  line-height: 28px;
  font-weight: 500;
}

.trial-popup__meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 14px;
  text-shadow: 0 2px 2px rgba(255, 255, 255, 0.16);
}

.trial-popup__meta-item:first-child {
  padding-left: 0;
}

.trial-popup__meta-item + .trial-popup__meta-item {
  border-left: 1px solid rgba(18, 24, 39, 0.18);
}

.trial-popup__meta-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  opacity: 0.85;
}

@media (max-width: 767px) {
  .trial-popup {
    padding: 16px;
  }

  .trial-popup__dialog {
    width: min(100%, calc(100vw - 32px));
    height: auto;
    min-height: 0;
    max-height: calc(100vh - 32px);
    overflow: auto;
  }

  .trial-popup__content {
    grid-template-columns: 1fr;
  }

  .trial-popup__section--intro {
    padding: 56px 24px 28px;
  }

  .trial-popup__section--contact {
    padding: 28px 24px 28px;
    border-top: 1px solid rgba(184, 212, 240, 0.65);
  }

  .trial-popup__close {
    top: 14px;
    right: 14px;
  }

  .trial-popup__title {
    font-size: 24px;
  }

  .trial-popup__contact-title {
    font-size: 20px;
  }

  .trial-popup__qr-shell {
    margin-top: 20px;
  }

  .trial-popup__meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding-top: 18px;
  }

  .trial-popup__meta-item {
    padding: 0;
    border-left: 0 !important;
  }
}

@media (max-width: 479px) {
  .trial-popup__section--intro {
    padding: 48px 18px 24px;
  }

  .trial-popup__section--contact {
    padding: 24px 18px 24px;
  }

  .trial-popup__title {
    font-size: 22px;
  }

  .trial-popup__qr-shell {
    width: min(224px, 72vw);
    padding: 8px;
  }

  .trial-popup__qr {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    max-width: 204px;
    margin: 0 auto;
  }

  .trial-popup__contact-value {
    font-size: 17px;
  }
}
