/* The live patient experience keeps its own mobile viewport. */
#healthmate-live[hidden],
#healthmate-miniprogram [hidden] {
  display: none !important;
}

#product-panel[data-product="health"] > #product-screenshot {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: var(--white);
  box-shadow: none;
  overflow: visible;
  min-width: 0;
}

#product-panel[data-product="health"] #product-screenshot .screenshot-stage {
  display: block;
  width: 100%;
  min-height: 0;
  margin: 0;
  padding: 0;
  aspect-ratio: auto;
  position: static;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: var(--white);
}

#product-panel[data-product="health"] #product-image,
#product-panel[data-product="health"] #open-product-preview,
#product-panel[data-product="health"] #product-screenshot > .screenshot-heading,
#product-panel[data-product="health"] #product-screenshot > figcaption,
#product-panel[data-product="health"] #product-screenshot .inline-player {
  display: none !important;
}

#healthmate-live {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  min-width: 0;
  gap: 16px;
}

#healthmate-live .healthmate-phone,
#healthmate-miniprogram .healthmate-phone {
  width: min(390px, 100%);
  min-width: 0;
  margin-inline: auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--white);
  box-shadow: none;
}

.healthmate-phone-top {
  padding: 11px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--white);
  color: var(--muted);
  font-size: .8125rem;
  line-height: 1.55;
  text-align: center;
  overflow-wrap: anywhere;
}

#healthmate-live-frame,
#healthmate-dialog-frame {
  display: block;
  width: 100%;
  height: 660px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: var(--white);
}

#healthmate-live .healthmate-live-caption {
  width: min(430px, 100%);
  margin: 0;
  color: var(--muted);
  font-size: .875rem;
  line-height: 1.75;
  text-align: center;
  overflow-wrap: anywhere;
}

#healthmate-live .healthmate-live-caption p {
  margin: 0;
  line-height: inherit;
}

#healthmate-live .healthmate-live-caption a {
  margin-top: 8px;
  color: var(--blue);
  white-space: normal;
}

#healthmate-miniprogram.healthmate-dialog {
  width: min(800px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  max-height: calc(100dvh - 24px);
  margin: auto;
  padding: 0;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--white);
  color: var(--ink);
  box-shadow: var(--shadow-lg);
}

#healthmate-miniprogram .preview-heading {
  gap: 16px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--line);
  background: var(--white);
  min-width: 0;
}

#healthmate-miniprogram .preview-heading h2 {
  min-width: 0;
  font-size: 1.0625rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

#healthmate-miniprogram .preview-close {
  flex-shrink: 0;
}

#healthmate-miniprogram .healthmate-dialog-content {
  display: grid;
  grid-template-columns: minmax(0, 390px) minmax(0, 1fr);
  align-items: center;
  gap: 28px;
  padding: 24px;
  min-width: 0;
}

#healthmate-miniprogram #healthmate-dialog-frame {
  height: min(660px, calc(100dvh - 180px));
  min-height: 420px;
}

#healthmate-miniprogram .healthmate-scan {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  min-width: 0;
  overflow-wrap: anywhere;
}

#healthmate-miniprogram .healthmate-scan h3 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 500;
  line-height: 1.5;
}

#healthmate-miniprogram .healthmate-scan img {
  position: static;
  width: min(184px, 100%);
  height: auto;
  max-width: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: var(--white);
  object-fit: contain;
}

#healthmate-miniprogram .healthmate-scan p {
  margin: 0;
  color: var(--muted);
  font-size: .875rem;
  line-height: 1.75;
}

#healthmate-miniprogram .healthmate-scan a {
  max-width: 100%;
  color: var(--blue);
  line-height: 1.55;
  white-space: normal;
  overflow-wrap: anywhere;
}

@media (max-width: 680px) {
  #healthmate-live-frame {
    height: min(660px, 75dvh);
    min-height: 520px;
  }

  #healthmate-miniprogram.healthmate-dialog {
    width: calc(100vw - 20px);
    max-width: calc(100vw - 20px);
    border-radius: 14px;
  }

  #healthmate-miniprogram .preview-heading {
    padding: 14px 16px;
  }

  #healthmate-miniprogram .healthmate-dialog-content {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
    padding: 18px 16px;
  }

  #healthmate-miniprogram #healthmate-dialog-frame {
    height: min(660px, 75dvh);
    min-height: 520px;
  }

  #healthmate-miniprogram .healthmate-scan {
    align-items: center;
    gap: 10px;
    text-align: center;
  }

  #healthmate-miniprogram .healthmate-scan img,
  #healthmate-miniprogram .healthmate-scan-desktop {
    display: none !important;
  }
}
