/* ------------------------------------------------------------------ */
/* Route service-process dialogs                                      */
/*   Used on the OEM / ODM / private label page only. The icon on each */
/*   route card opens that route's process diagram; the diagram itself */
/*   hands over to the shared zoom layer (assets/js/mtc-zoom.js).      */
/* ------------------------------------------------------------------ */

/* The icon is wrapped so it can act as its own trigger while the rest of
   the card keeps its anchor. A block box lets the centred image keep the
   margin it already had. */
.mtc-p-sq-ic {
  display: block;
  cursor: zoom-in;
}
.mtc-p-sq-ic:focus-visible {
  outline: 2px solid #0054a5;
  outline-offset: 4px;
  border-radius: 12px;
}

.mtc-rp .modal-dialog {
  max-width: min(1120px, 94vw);
  margin: 1.4rem auto;
}
.mtc-rp .modal-content {
  border: 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(8, 20, 34, .28);
}
.mtc-rp .modal-header {
  border-bottom: 1px solid #e2ecf6;
  padding: 14px 20px;
}
.mtc-rp .modal-title {
  font-size: 1.05rem;
  font-weight: 700;
  color:var(--brand);
  line-height: 1.3;
}
.mtc-rp .modal-body {
  padding: 18px 20px 8px;
  background: #f7fbfe;
}
/* The diagram is scaled to the smaller of the dialog width and the
   viewport height, so a 2000 px wide drawing never opens cropped. */
.mtc-rp-fig {
  margin: 0;
  text-align: center;
}
.mtc-rp-fig img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(100vh - 250px);
  max-height: calc(100dvh - 250px);
  margin: 0 auto;
  background: #fff;
  border: 1px solid #e2ecf6;
  border-radius: 6px;
  cursor: zoom-in;
}
.mtc-rp-fig figcaption {
  margin-top: 10px;
  font-size: .82rem;
  color:var(--muted);
  text-align: center;
}
.mtc-rp .modal-footer {
  border-top: 1px solid #e2ecf6;
  padding: 12px 20px;
}

@media (max-width: 575.98px) {
  .mtc-rp .modal-dialog {
    max-width: calc(100vw - 20px);
    margin: 10px auto;
  }
  .mtc-rp .modal-body {
    padding: 12px 12px 4px;
  }
  .mtc-rp-fig img {
    max-height: calc(100vh - 236px);
    max-height: calc(100dvh - 236px);
  }
}
