/* Preserve the applications' geometry. Only callback needs a host surface. */
.service-popup-host {display:contents}
#service-dialog #service-body {width:100%;height:100%;margin:0;padding:0;border:0;border-radius:inherit;background:transparent;overflow:hidden}
#service-dialog .service-original {display:block;width:100%;height:100%;min-height:0;max-height:none;margin:0;padding:0;border:0;border-radius:inherit;background:transparent;color-scheme:normal}

/* Callback focus surface from udh-callback.uniteddatahub.dev/embed.js.
   Its child document is intentionally transparent and needs this surface. */
.service-popup-host>#service-dialog[data-service-mode="callback"] {
  --callback-padding:clamp(16px,4vw,48px);
  --callback-padding-top:var(--callback-padding);
  box-sizing:border-box;margin:auto;padding:var(--callback-padding);
  padding-top:var(--callback-padding-top);
  border:1px solid #d9e1e5;border-radius:20px;
  background:Canvas;color:CanvasText;
  width:min(720px,calc(100vw - 24px));max-width:720px;
  height:auto;max-height:calc(100dvh - 24px);overflow:hidden;
  box-shadow:none;outline:0;
}
#service-dialog[data-service-mode="callback"] #service-body {
  height:max(180px,calc(100dvh - 26px - var(--callback-padding-top) - var(--callback-padding)));
  border-radius:0;
}
/* The terminal's original focus host uses a 16px desktop inset and 24px curve. */
.service-popup-host>#service-dialog[data-service-mode="terminal"] {
  width:calc(100vw - 32px);max-width:none;height:calc(100dvh - 32px);
  max-height:none;border-radius:24px;
}
/* The iframe's own cutouts must show the page backdrop, never a second plate.
   This also overrides the opaque background in the vendor focus stylesheet. */
.service-popup-host>#service-dialog:not([data-service-mode="callback"]) {
  background:transparent;border:0;box-shadow:none;outline:0;
}
#service-dialog .service-dismiss {position:absolute;z-index:2;right:8px;top:8px;width:44px;height:44px;display:grid;place-items:center;padding:0;border:1px solid #d5ded6;border-radius:50%;background:#fbfcf8;color:#193f36;cursor:pointer;box-shadow:0 2px 12px #102a281a}
#service-dialog .service-dismiss:focus-visible {outline:3px solid #88a166;outline-offset:3px}
#service-dialog .service-dismiss .icon {width:22px;height:22px}
@media(max-width:700px) {
  .service-popup-host>#service-dialog[data-service-mode="terminal"] {width:100%;height:100dvh;border:0;border-radius:0}
  .service-popup-host>#service-dialog[data-service-mode="callback"] {--callback-padding-top:64px}
}
