/* Keep the detailed legacy material as a non-JavaScript fallback. */
.service-product-journey-enhanced .service-product-journey-page .section-intro,
.service-product-journey-enhanced .service-product-journey-page .architecture-section,
.service-product-journey-enhanced .service-product-journey-page .system-paths,
.service-product-journey-enhanced .service-product-journey-page .automation-principles-section,
.service-product-journey-enhanced .service-product-journey-page .scenario-section,
.service-product-journey-enhanced .service-product-journey-page .planning-section,
.service-product-journey-enhanced .service-product-journey-page .faq-section {
  display: none;
}

/* Keep every portrait and landscape product fully visible in the enlarged viewer. */
.service-product-journey .av-story-image-button img,
.av-product-dialog.service-product-dialog .av-product-dialog-media img {
  display: block;
  object-position: center;
}

.av-product-dialog.service-product-dialog {
  width: min(94vw, 1180px);
  height: auto;
  max-height: calc(100dvh - 2rem);
  overflow: auto;
}

.av-product-dialog.service-product-dialog .av-product-dialog-inner {
  height: auto;
  min-height: 0;
  grid-template-columns: minmax(0, .95fr) minmax(24rem, 1.05fr);
  align-items: stretch;
}

.av-product-dialog.service-product-dialog .av-product-dialog-media {
  min-width: 0;
  min-height: clamp(22rem, 45dvh, 29rem);
  padding: clamp(1.25rem, 3vw, 2.5rem);
  overflow: visible;
  overscroll-behavior: contain;
}

.av-product-dialog.service-product-dialog .av-product-dialog-media img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: min(25rem, calc(100dvh - 7rem));
  object-fit: contain;
  transform: none !important;
}

/* Keep longer product notes reachable without moving the full-size image. */
.av-product-dialog.service-product-dialog .av-product-dialog-copy {
  min-width: 0;
  min-height: 0;
  align-content: start;
  padding: clamp(1.5rem, 2.8vw, 2.35rem);
  overflow-y: visible;
  overscroll-behavior: contain;
  scrollbar-color: var(--gold) transparent;
  scrollbar-width: thin;
}

.av-product-dialog.service-product-dialog .av-product-dialog-copy h2 {
  font-size: clamp(1.75rem, 2.4vw, 2.5rem);
  line-height: 1.06;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

.av-product-dialog.service-product-dialog .av-product-dialog-description {
  margin: 1rem 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.av-product-dialog.service-product-dialog .av-product-dialog-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .9rem 1.2rem;
  margin: 1.35rem 0 0;
}

.av-product-dialog.service-product-dialog .av-product-dialog-details > div {
  border-top: 1px solid var(--line);
  padding-top: .7rem;
}

.av-product-dialog.service-product-dialog .av-product-dialog-details dt {
  color: var(--gold);
  font: 800 .61rem/1.35 var(--font-sans);
  letter-spacing: .1em;
  text-transform: uppercase;
}

.av-product-dialog.service-product-dialog .av-product-dialog-details dd {
  margin: .28rem 0 0;
  color: var(--text);
  font-size: .88rem;
  line-height: 1.48;
  overflow-wrap: anywhere;
}

.av-product-dialog.service-product-dialog .av-product-dialog-note {
  margin: 1.2rem 0 0;
  border-top: 1px solid var(--line);
  padding-top: .9rem;
  color: var(--muted);
  font-size: .88rem;
  line-height: 1.55;
}

.av-product-dialog.service-product-dialog .av-product-dialog-note strong {
  color: var(--text);
}

@media (max-width: 900px) {
  .av-product-dialog.service-product-dialog {
    width: calc(100vw - 1rem);
    height: auto;
    max-height: calc(100dvh - 1rem);
    overflow: auto;
  }

  .av-product-dialog.service-product-dialog .av-product-dialog-inner {
    height: auto;
    min-height: 0;
    grid-template-columns: 1fr;
  }

  .av-product-dialog.service-product-dialog .av-product-dialog-media {
    min-height: min(50dvh, 30rem);
    padding: clamp(1rem, 5vw, 2rem);
  }

  .av-product-dialog.service-product-dialog .av-product-dialog-media img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: min(48dvh, 30rem);
  }

  .av-product-dialog.service-product-dialog .av-product-dialog-copy {
    overflow: visible;
  }

  .av-product-dialog.service-product-dialog .av-product-dialog-details {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .av-product-dialog.service-product-dialog .av-product-dialog-media {
    min-height: 0;
    padding: 1.25rem;
  }

  .av-product-dialog.service-product-dialog .av-product-dialog-media img {
    max-height: min(52dvh, 30rem);
  }
}
