/* Frontend + builder preview styles. Selectors are kept at one class so Design-tab rules from Divi (which are scoped to the module) win. */
.yadim {
  position: relative;
  width: 100%;
  height: var(--mg-height, 860px);
  aspect-ratio: var(--mg-ratio, auto); /* a height given as a share of the width */
  overflow: hidden;
  border-radius: inherit; /* corners given to the module (Design tab) round the scene too */
  background: var(--mg-bg, #1d2b4c);
  user-select: none;
  -webkit-user-select: none;
}

@media (max-width: 980px) {
  .yadim { height: var(--mg-height-t, var(--mg-height, 860px)); aspect-ratio: var(--mg-ratio-t, var(--mg-ratio, auto)); }
}
@media (max-width: 767px) {
  .yadim { height: var(--mg-height-m, 420px); aspect-ratio: var(--mg-ratio-m, auto); }
}

/* The 3D Viewer has no size or background of its own: it fills the module (Design → Sizing) and shows the module's background */
.yadim.mg-product { height: 100%; min-height: var(--mg-min-h, 0); background: transparent; border-radius: inherit; }
@media (max-width: 767px) { .yadim.mg-product { height: 100%; } }

/* Accessible text version of the locations (the canvas is aria-hidden) */
.mg-list {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  list-style: none;
}

.mg-stage { position: absolute; inset: 0; }

.mg-gl {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none; /* drags and hovers go to the marker canvas on top */
}

.mg-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
  /* needed so vertical drags rotate the globe instead of scrolling the page.
     Side effect: on touch devices the page won't scroll while a finger is on the globe.
     Change to "pan-y" to restore vertical scrolling (left/right drag only). */
  touch-action: none;
}

.mg-canvas:active { cursor: grabbing; }

.mg-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(245, 245, 245, .55);
  font: 13px/1.4 Arial, sans-serif;
  pointer-events: none;
  transition: opacity .4s ease;
}

/* ---------- Location label ---------- */

.mg-label {
  position: absolute;
  left: 0;
  top: 0;
  display: none;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: transparent;
  border: 1px solid rgba(245, 245, 245, 0);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0);
  color: #f5f5f5;
  font: 12px/1 Arial, sans-serif;
  white-space: nowrap;
  pointer-events: none;
  will-change: transform;
  transition: background .25s ease, border-color .25s ease, box-shadow .25s ease;
}

.mg-label.is-hover {
  z-index: 2; /* the hovered pop-up sits above the other labels */
  background: var(--mg-label-bg, rgba(29, 43, 76, .85));
  border-color: rgba(245, 245, 245, .15);
  box-shadow: 0 4px 16px rgba(0, 0, 0, .25);
}

.mg-label > strong { font-weight: 500; }

/* ---------- Popup bubble ---------- */

.mg-popup {
  position: absolute;
  left: 0;
  top: 100%;
  padding-top: 8px; /* invisible bridge so the mouse can reach the card */
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
}

.mg-label.is-hover .mg-popup {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

/* placement flips, set by the script if the popup would run off the globe area */
.mg-popup.is-above { top: auto; bottom: 100%; padding-top: 0; padding-bottom: 8px; }
.mg-popup.is-right { left: auto; right: 0; }

.mg-card {
  width: var(--mg-popup-w, 230px);
  box-sizing: border-box;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--mg-popup-bg, rgba(29, 43, 76, .95));
  border: 1px solid rgba(245, 245, 245, .15);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, .35);
  color: #f5f5f5;
  font: 12px/1.5 Arial, sans-serif;
  white-space: normal;
  text-align: left;
  user-select: text;
  -webkit-user-select: text;
  cursor: default;
}

.mg-type {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(245, 245, 245, .65);
}

.mg-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  box-shadow: 0 0 0 1.5px rgba(245, 245, 245, .35);
}

.mg-title { margin-bottom: 8px; font-size: 13px; font-weight: 700; color: #f5f5f5; }
.mg-line { margin-top: 6px; color: rgba(245, 245, 245, .85); }

.mg-card a {
  color: #f5f5f5;
  text-decoration: none;
  border-bottom: 1px solid rgba(250, 185, 10, .6);
}

.mg-card a:hover { color: #fab90a; }
.mg-card .mg-img { display: block; width: calc(100% + 32px); max-width: none; height: 110px; margin: -14px -16px 12px; object-fit: cover; border-radius: 14px 14px 0 0; }
.mg-desc { margin-bottom: 8px; color: rgba(245, 245, 245, .9); }
.mg-card .mg-actions { margin-top: 12px; }
.mg-card a.mg-btn { display: inline-block; padding: 6px 14px; border: 0; border-radius: 99px; background: #fab90a; color: #14213d; font-weight: 700; }
.mg-card a.mg-btn:hover { background: #ffd24a; color: #14213d; }

/* "Show axes, bounding box & part names" (3D Viewer) */
.mg-parts {
  position: absolute;
  left: 8px;
  top: 8px;
  max-width: 45%;
  padding: 6px 8px;
  border-radius: 6px;
  background: rgba(0, 0, 0, .55);
  color: #fff;
  font: 11px/1.4 monospace;
  white-space: pre-wrap;
  pointer-events: none;
}

/* Click to place (Visual Builder) */
.mg-hint {
  position: absolute;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  max-width: 90%;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(20, 24, 40, .85);
  color: #fff;
  font: 12px/1.3 Arial, sans-serif;
  pointer-events: none;
  text-align: center;
}

/* Zoom: the "scroll with Ctrl" hint and the on-screen buttons (3D Viewer) */
.mg-zoomhint {
  position: absolute;
  left: 50%;
  top: 12px;
  transform: translateX(-50%);
  max-width: 90%;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(20, 24, 40, .85);
  color: #fff;
  font: 12px/1.3 Arial, sans-serif;
  pointer-events: none;
  text-align: center;
}

.mg-zoombar {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mg-zoombtn {
  width: 36px;
  height: 36px;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(245, 245, 245, .25);
  border-radius: 50%;
  background: rgba(20, 24, 40, .8);
  color: #fff;
  font: 18px/1 Arial, sans-serif;
  cursor: pointer;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.mg-zoombtn:hover:not(:disabled) { background: rgba(20, 24, 40, .95); }
.mg-zoombtn:focus-visible { outline: 2px solid #fab90a; outline-offset: 2px; }
.mg-zoombtn:disabled { opacity: .35; cursor: default; }

/* Interactive parts (3D Viewer): hover label, keyboard buttons, reset view */
.mg-tip {
  position: absolute;
  left: 0;
  top: 0;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(20, 24, 40, .88);
  color: #fff;
  font: 12px/1.3 Arial, sans-serif;
  white-space: nowrap;
  pointer-events: none;
  z-index: 2;
}

/* visually hidden, but reachable with the keyboard and by screen readers (focusing one glows its part) */
.mg-a11y-btn {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  border: 0;
  white-space: nowrap;
}

.mg-resetview {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  margin: 0;
  padding: 6px 12px;
  border: 1px solid rgba(245, 245, 245, .25);
  border-radius: 999px;
  background: rgba(20, 24, 40, .8);
  color: #fff;
  font: 12px/1.2 Arial, sans-serif;
  cursor: pointer;
}

.mg-resetview:hover { background: rgba(20, 24, 40, .95); }
.mg-resetview:focus-visible { outline: 2px solid #fab90a; outline-offset: 2px; }

/* Legend (Globe): the location types with counts; each is a toggle */
.mg-attrib { position: absolute; right: 8px; bottom: 6px; z-index: 3; padding: 1px 6px; border-radius: 4px; font-size: 10px; line-height: 1.5; color: rgba(255, 255, 255, .85); background: rgba(0, 0, 0, .45); pointer-events: none; }
.mg-legend {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 3;
  max-width: 55%;
  max-height: calc(100% - 24px);
  overflow-y: auto;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(20, 24, 40, .82);
  border: 1px solid rgba(245, 245, 245, .14);
  color: #f5f5f5;
  font: 12px/1.4 Arial, sans-serif;
}
.mg-legend__title { margin-bottom: 4px; font-weight: 700; }
.mg-legend__item {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 2px 2px;
  color: inherit;
  font: inherit;
}
.mg-legend__item .mg-dot { flex: none; }
.mg-legend__eye, .mg-legend__name {
  padding: 2px;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.mg-legend__eye { flex: none; display: inline-flex; align-items: center; opacity: .9; }
.mg-legend__eye .mg-eye-off { display: none; }
.mg-legend__eye[aria-pressed="false"] { opacity: .55; }
.mg-legend__eye[aria-pressed="false"] .mg-eye-off { display: inline; }
.mg-legend__name { flex: 1; text-align: left; }
.mg-legend__name:hover { text-decoration: underline; }
.mg-legend__item[aria-pressed="false"] .mg-legend__name { opacity: .5; }
.mg-legend__item--nested { padding-left: 18px; }
.mg-legend__item--loc .mg-legend__name { font-size: 11.5px; }
.mg-legend__eye:focus-visible, .mg-legend__name:focus-visible { outline: 2px solid #fab90a; outline-offset: 2px; }

/* 3D Viewer extras: camera views, colour variants, toolbar, hint, poster */
.mg-views {
  position: absolute;
  left: 50%;
  bottom: 12px;
  z-index: 3;
  transform: translateX(-50%);
  max-width: calc(100% - 24px);
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}
.mg-view-btn {
  min-width: 36px;
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 99px;
  background: rgba(20, 24, 40, .78);
  color: #fff;
  font: 600 12px/1.2 Arial, sans-serif;
  cursor: pointer;
}
.mg-view-btn:hover { background: rgba(20, 24, 40, .95); }
.mg-view-btn[aria-pressed="true"] { background: #fab90a; border-color: #fab90a; color: #14213d; }
.mg-view-btn img { display: block; width: 44px; height: 32px; object-fit: cover; border-radius: 6px; }
.mg-view-btn:has(img) { padding: 4px; border-radius: 10px; }
.mg-view-btn:focus-visible, .mg-swatch:focus-visible, .mg-tool:focus-visible, .mg-loadbtn:focus-visible { outline: 2px solid #fab90a; outline-offset: 2px; }

.mg-swatches {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 3;
  flex-direction: column;
  gap: 8px;
  max-width: 60%;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(20, 24, 40, .72);
  color: #fff;
  font: 12px/1.3 Arial, sans-serif;
}
.mg-swatchgroup { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.mg-swatchlabel { margin-right: 4px; opacity: .8; }
.mg-swatch {
  width: 24px;
  height: 24px;
  padding: 0;
  border: 2px solid rgba(255, 255, 255, .55);
  border-radius: 50%;
  cursor: pointer;
}
.mg-swatch[aria-pressed="true"] { border-color: #fff; box-shadow: 0 0 0 2px #fab90a; }

/* the configurator list: a row per group (swatch, group, chosen name) that opens its choices */
.mg-swatches.is-list { left: auto; right: 12px; top: 12px; bottom: auto; display: block; width: 260px; max-width: calc(100% - 24px); max-height: calc(100% - 24px); overflow: auto; padding: 8px 12px; background: rgba(255, 255, 255, .96); color: #1d2433; box-shadow: 0 4px 18px rgba(0, 0, 0, .18); }
.mg-cfgtitle { margin: 2px 0 6px; font-size: 15px; font-weight: 700; }
.mg-cfgrow { border-top: 1px solid rgba(29, 36, 51, .12); }
.mg-cfghead, .mg-cfgopt { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.mg-cfgsw { flex: none; width: 34px; height: 34px; border-radius: 4px; border: 1px solid rgba(29, 36, 51, .2); }
.mg-cfgsw--small { width: 22px; height: 22px; }
.mg-cfgtext { display: flex; flex: 1; flex-direction: column; min-width: 0; line-height: 1.3; }
.mg-cfgtext em { font-size: 11px; opacity: .65; }
.mg-cfgtext span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.mg-cfgplus { flex: none; width: 20px; text-align: center; font-size: 18px; }
.mg-cfgopts { display: flex; flex-direction: column; padding: 0 0 6px 8px; }
.mg-cfgopt { padding: 5px 4px; border-radius: 4px; font-size: 13px; }
.mg-cfgopt:hover { background: rgba(29, 36, 51, .06); }
.mg-cfgopt[aria-pressed="true"] { background: rgba(250, 185, 10, .22); font-weight: 600; }
.mg-cfghead:focus-visible, .mg-cfgopt:focus-visible { outline: 2px solid #fab90a; outline-offset: 2px; }
@media (max-width: 600px) { .mg-swatches.is-list { top: auto; bottom: 10px; right: 10px; left: 10px; width: auto; max-height: 55%; } }

/* the controls guide: a card for each way to move the product */
.mg-controls { position: absolute; z-index: 3; flex-direction: column; gap: 8px; width: 210px; max-width: calc(100% - 24px); pointer-events: none; font: 13px/1.3 Arial, sans-serif; color: #1d2433; }
.mg-controls--top-left { left: 12px; top: 12px; }
.mg-controls--top-right { right: 12px; top: 12px; }
.mg-controls--bottom-left { left: 12px; bottom: 12px; }
.mg-controls--bottom-right { right: 12px; bottom: 12px; }
.mg-ctl { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; background: rgba(255, 255, 255, .92); border: 1px solid rgba(29, 36, 51, .18); }
.mg-ctl__label { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; }
.mg-ctl__icon { display: inline-flex; }
.mg-ctl__pics { display: inline-flex; align-items: center; gap: 4px; }
@media (max-width: 480px) { .mg-controls { width: 150px; } .mg-ctl__pics { display: none; } }

/* phones: the colour swatches move to the top left so they never sit on the camera view buttons */
@media (max-width: 600px) {
  .mg-swatches { top: 10px; bottom: auto; left: 10px; max-width: calc(100% - 150px); }
}

.mg-toolbar {
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: 3;
  gap: 6px;
}
.mg-tool {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: rgba(20, 24, 40, .78);
  color: #fff;
  font-size: 15px;
  cursor: pointer;
}
.mg-tool:hover { background: rgba(20, 24, 40, .95); }
.mg-tool[aria-pressed="true"] { background: #fab90a; color: #14213d; }

.mg-instr {
  position: absolute;
  left: 50%;
  top: 14px;
  z-index: 3;
  transform: translateX(-50%);
  padding: 8px 14px;
  border-radius: 10px;
  background: rgba(20, 24, 40, .82);
  color: #fff;
  font: 12px/1.5 Arial, sans-serif;
  text-align: center;
  pointer-events: none;
  transition: opacity .35s;
}

.mg-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity .4s;
}
.mg-loadbtn {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 4;
  transform: translate(-50%, -50%);
  padding: 10px 22px;
  border: 0;
  border-radius: 99px;
  background: #fab90a;
  color: #14213d;
  font: 700 14px/1 Arial, sans-serif;
  cursor: pointer;
}
.yadim.is-fullscreen { height: 100vh !important; width: 100vw !important; }

/* ---------------- Globe: failsafe picture, legend sidebar ---------------- */
.mg-failsafe { position: absolute; inset: 0; z-index: 2; display: block; width: 100%; height: 100%; object-fit: cover; }
.mg-ready .mg-failsafe { display: none; }
.mg-failed .mg-stage, .mg-use-fallback .mg-stage { visibility: hidden; }
.mg-failed .mg-failsafe, .mg-use-fallback .mg-failsafe { display: block; }
.mg-use-fallback .mg-legend { display: none; }

.mg-legend { background: var(--mg-legend-bg, rgba(20, 24, 40, .82)); color: var(--mg-legend-text, #f5f5f5); }
.yadim { --mg-h: var(--mg-height, 860px); --mg-r: var(--mg-ratio, auto); }
@media (max-width: 980px) { .yadim { --mg-h: var(--mg-height-t, var(--mg-height, 860px)); --mg-r: var(--mg-ratio-t, var(--mg-ratio, auto)); } }
@media (max-width: 767px) { .yadim { --mg-h: var(--mg-height-m, 420px); --mg-r: var(--mg-ratio-m, auto); } }

/* Optional module width and globe alignment ("Width & Alignment"). Phone falls back to tablet, tablet to desktop, as the other responsive settings do. */
.yadim.mg-custom {
  --mg-w: var(--mg-lay-w, 100%); --mg-ml: var(--mg-lay-ml, auto); --mg-mr: var(--mg-lay-mr, auto);
  --mg-kx: var(--mg-lay-kx, .5); --mg-ky: var(--mg-lay-ky, .5); --mg-ox: var(--mg-lay-ox, 0px); --mg-oy: var(--mg-lay-oy, 0px);
  width: var(--mg-w); max-width: 100%; margin-left: var(--mg-ml); margin-right: var(--mg-mr); /* never wider than the column, so a fixed width shrinks on a phone */
}
@media (max-width: 980px) {
  .yadim.mg-custom {
    --mg-w: var(--mg-lay-w-t, var(--mg-lay-w, 100%)); --mg-ml: var(--mg-lay-ml-t, var(--mg-lay-ml, auto)); --mg-mr: var(--mg-lay-mr-t, var(--mg-lay-mr, auto));
    --mg-kx: var(--mg-lay-kx-t, var(--mg-lay-kx, .5)); --mg-ky: var(--mg-lay-ky-t, var(--mg-lay-ky, .5));
    --mg-ox: var(--mg-lay-ox-t, var(--mg-lay-ox, 0px)); --mg-oy: var(--mg-lay-oy-t, var(--mg-lay-oy, 0px));
  }
}
@media (max-width: 767px) {
  .yadim.mg-custom {
    --mg-w: var(--mg-lay-w-m, var(--mg-lay-w-t, var(--mg-lay-w, 100%))); --mg-ml: var(--mg-lay-ml-m, var(--mg-lay-ml-t, var(--mg-lay-ml, auto))); --mg-mr: var(--mg-lay-mr-m, var(--mg-lay-mr-t, var(--mg-lay-mr, auto)));
    --mg-kx: var(--mg-lay-kx-m, var(--mg-lay-kx-t, var(--mg-lay-kx, .5))); --mg-ky: var(--mg-lay-ky-m, var(--mg-lay-ky-t, var(--mg-lay-ky, .5)));
    --mg-ox: var(--mg-lay-ox-m, var(--mg-lay-ox-t, var(--mg-lay-ox, 0px))); --mg-oy: var(--mg-lay-oy-m, var(--mg-lay-oy-t, var(--mg-lay-oy, 0px)));
  }
}
/* the script sizes the stage to a square (--mg-box) and these put the globe's circle (--mg-d wide) where the alignment says, kept inside the module */
.yadim.mg-boxed .mg-stage {
  inset: auto; width: var(--mg-box); height: var(--mg-box);
  left: clamp(calc(var(--mg-rx) - var(--mg-gap)), calc(var(--mg-rx) + (var(--mg-rw) - var(--mg-d)) * var(--mg-kx) + var(--mg-ox) - var(--mg-gap)), calc(var(--mg-rx) + var(--mg-rw) - var(--mg-d) - var(--mg-gap)));
  top: clamp(calc(0px - var(--mg-gap)), calc((var(--mg-rh) - var(--mg-d)) * var(--mg-ky) + var(--mg-oy) - var(--mg-gap)), calc(var(--mg-rh) - var(--mg-d) - var(--mg-gap)));
}

/* a sidebar beside the globe: the legend gets a column of its own and the globe the rest */
.mg-side .mg-legend { z-index: 3; top: 0; bottom: 0; width: var(--mg-side-w, 280px); max-width: none; max-height: none; padding: 14px 16px; border: 0; border-radius: 0; box-sizing: border-box; font-size: 13px; }
.mg-side-left .mg-legend { left: 0; right: auto; }
.mg-side-right .mg-legend { right: 0; left: auto; }
.mg-side-left .mg-stage { left: var(--mg-side-w, 280px); }
.mg-side-right .mg-stage { right: var(--mg-side-w, 280px); }
.mg-side-right .mg-attrib { right: calc(var(--mg-side-w, 280px) + 8px); }
.mg-side-left .mg-legend { border-right: 1px solid rgba(245, 245, 245, .14); }
.mg-side-right .mg-legend { border-left: 1px solid rgba(245, 245, 245, .14); }
.mg-side .mg-legend__title { margin-bottom: 8px; font-size: 15px; }
.mg-side .mg-legend__item { padding: 6px 0; }

/* narrow: the sidebar goes under the globe (a phone, or a module in a narrow column) */
.yadim.mg-side.mg-narrow { height: auto; aspect-ratio: auto; }
.mg-narrow .mg-stage { position: relative; inset: auto; height: var(--mg-h); aspect-ratio: var(--mg-r, auto); }
.mg-narrow .mg-legend { position: relative; top: auto; bottom: auto; left: auto; right: auto; width: auto; max-height: 300px; border: 0; border-top: 1px solid rgba(245, 245, 245, .14); }
.mg-narrow .mg-attrib { right: 8px; bottom: auto; top: calc(var(--mg-h) - 24px); }
@media (max-width: 767px) {
  .yadim.mg-side { height: auto; aspect-ratio: auto; }
  .mg-side .mg-stage { position: relative; inset: auto; height: var(--mg-h); aspect-ratio: var(--mg-r, auto); }
  .mg-side .mg-legend { position: relative; top: auto; bottom: auto; left: auto; right: auto; width: auto; max-height: 300px; border: 0; border-top: 1px solid rgba(245, 245, 245, .14); }
  .mg-side .mg-attrib { right: 8px; bottom: auto; top: calc(var(--mg-h) - 24px); }
}
.mg-side-left .mg-hint, .mg-side-left .mg-zoomhint { left: calc(50% + var(--mg-side-w, 280px) / 2); }
.mg-side-right .mg-hint, .mg-side-right .mg-zoomhint { left: calc(50% - var(--mg-side-w, 280px) / 2); }
.mg-side-right .mg-zoombar { right: calc(var(--mg-side-w, 280px) + 12px); }
.mg-side-right .mg-resetview { right: calc(var(--mg-side-w, 280px) + 12px); }
@media (max-width: 767px) {
  .mg-side .mg-zoombar { right: 12px; bottom: auto; top: calc(var(--mg-h) - 124px); }
  .mg-side .mg-resetview { right: 12px; }
  .mg-side .mg-hint, .mg-side .mg-zoomhint { left: 50%; }
}
.mg-narrow .mg-zoombar { right: 12px; bottom: auto; top: calc(var(--mg-h) - 124px); }
.mg-narrow .mg-resetview { right: 12px; }
.mg-narrow .mg-hint, .mg-narrow .mg-zoomhint { left: 50%; }

/* the starfield: one canvas behind the whole module, so a see-through legend shows the stars too */
.mg-sky { position: absolute; inset: 0; z-index: 0; display: block; width: 100%; height: 100%; pointer-events: none; }

/* label and popup shape (Label and popup shape), and the label background that is always there (Always show the label background) */
.mg-shape-rectangle .mg-label { border-radius: 3px; }
.mg-shape-rectangle .mg-card { border-radius: 3px; }
.mg-shape-rounded .mg-label { border-radius: 10px; }
.mg-shape-oval .mg-label { border-radius: 999px; }
.mg-shape-oval .mg-card { padding: 24px 34px; border-radius: 50% / 46%; }
.mg-label-bg-always .mg-label { background: var(--mg-label-bg, rgba(29, 43, 76, .85)); border-color: rgba(245, 245, 245, .15); box-shadow: 0 4px 16px rgba(0, 0, 0, .25); }
