/* Unit selection is presentation only; the supplied settings artwork stays intact. */
.space-container > #ak-mode { margin-top: 4px; margin-bottom: 0; }
html[data-display-units-ready="1"] #edge-wrap .edge-mm-group { display: grid !important; }
html[data-display-units-ready="1"] #edge-wrap .edge-ftin-group { display: none !important; }
#units-row.units-picker {
  display: block;
  flex: 0 0 auto;
  margin: 0;
  padding: 0;
  border: 0;
}

.units-picker__trigger {
  display: flex;
  align-items: center;
  gap: 5px;
  width: 100%;
  min-height: 24px;
  padding: 0 2px;
  border: 0;
  border-radius: var(--ak-radius-pill);
  background: transparent;
  color: #111;
  font: 500 10px/1.2 var(--font-family, sans-serif);
  cursor: pointer;
  text-align: left;
  transition: background-color 120ms ease;
}

@media (hover: hover) {
  .units-picker__trigger:hover { background: rgba(42, 198, 193, .18); }
}
.units-picker__trigger:focus-visible {
  background: rgba(42, 198, 193, .18);
  outline: 2px solid #2ac6c1;
  outline-offset: 2px;
}
.units-picker__current { margin-left: auto; white-space: nowrap; }
.units-picker__current-label { margin-right: 5px; color: #c4c4c4; font-weight: 400; }
.units-picker__settings-icon {
  display: block;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
}
#mobile-outputs-panel-body .space-container.in-mobile-outputs-panel #units-row.units-picker {
  min-height: 24px !important;
  padding: 0 !important;
}

.units-picker__panel {
  position: fixed;
  inset: auto;
  box-sizing: border-box;
  margin: 0;
  padding: 0 4px;
  width: 300px;
  max-width: calc(100vw - 16px);
  height: 50px;
  overflow: visible;
  border: 0.5px solid #c1c1c1;
  border-radius: 15px;
  color: #fff;
  background: #1e1e1e;
  box-shadow: 0 5px 22px rgba(0, 0, 0, .36);
  font: 500 10px/1.2 var(--font-family, sans-serif);
  z-index: 3000;
}
.units-picker__panel[hidden] { display: none !important; }
.units-picker__panel::backdrop { background: transparent; }
.units-picker__content { display: flex; align-items: center; gap: 0; height: 100%; }
.units-picker__system-hit { display: grid; place-items: center; width: 24px; height: 44px; flex: 0 0 24px; }
.units-picker__panel .switch.units-picker__vertical {
  --switch-width: 24px;
  --switch-height: 14px;
  width: var(--switch-height);
  height: var(--switch-width, 34px);
  flex: none;
  min-width: 0;
  min-height: 0;
  background: #707070;
}
.units-picker__panel .switch.units-picker__vertical .switch-thumb {
  transform: translateY(calc(var(--switch-width, 34px) - var(--switch-height, 20px)));
}
.units-picker__panel .switch.units-picker__vertical[aria-pressed="true"] .switch-thumb {
  transform: translateY(0);
}
.units-picker__panel .switch:focus-visible { outline: 2px solid #2ac6c1; outline-offset: 4px; }
.units-picker__vertical::after { content: ''; position: absolute; inset: -10px -6px; }
.units-picker__formats { display: flex; align-items: center; width: 100%; min-width: 0; gap: 4px; }
.units-picker__formats[hidden] { display: none; }
.units-picker__choice {
  appearance: none;
  position: relative;
  flex: 1;
  min-width: 0;
  min-height: 32px;
  padding: 6px 0;
  border: 0;
  border-radius: var(--ak-radius-pill);
  background: transparent;
  color: #888;
  font: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 120ms ease, color 120ms ease;
}
@media (hover: hover) {
  .units-picker__choice:not([aria-disabled="true"]):hover {
    color: #fff;
    background: rgba(42, 198, 193, .18);
  }
}
.units-picker__choice[aria-pressed="true"] { color: #fff; }
.units-picker__choice[aria-pressed="true"]::after {
  content: '';
  position: absolute;
  bottom: 8px;
  left: 50%;
  width: min(38px, calc(100% - 12px));
  height: 1px;
  background: #2fe5df;
  transform: translateX(-50%);
}
.units-picker__choice[aria-disabled="true"] { color: #666; cursor: not-allowed; }
.units-picker__choice:focus-visible { outline: 1px solid #2ac6c1; outline-offset: -1px; border-radius: 4px; }
.units-picker__ruler {
  position: absolute;
  top: 0;
  left: 23px;
  height: 100%;
  aspect-ratio: 313.05 / 256;
  background: url("/_releases/client-growth-d5c7a593433e69d3/icons/unitsmetric.svg") center / contain no-repeat;
  pointer-events: none;
}
.units-picker__ruler--imperial {
  display: none;
  background-image: url("/_releases/client-growth-d5c7a593433e69d3/icons/unitsimperial.svg");
}
.units-picker__panel[data-system="imperial"] .units-picker__ruler--imperial { display: block; }
.units-picker__panel[data-system="imperial"] .units-picker__ruler--metric { display: none; }
.units-picker__number-format { display: flex; align-items: center; gap: 8px; margin: 0 10px 0 6px; }
.units-picker__number-labels { display: flex; flex-direction: column; gap: 6px; min-width: 52px; font-size: 8px; }
.units-picker__number-labels span:last-child { color: #666; }
.units-picker__number-format .switch { cursor: pointer; }
.units-picker__panel[data-number-format="decimal"] .units-picker__number-labels span:first-child { color: #666; }
.units-picker__panel[data-number-format="decimal"] .units-picker__number-labels span:last-child { color: #fff; }
.units-picker__hint {
  display: none;
  position: absolute;
  top: calc(100% + 5px);
  right: 6px;
  left: 6px;
  padding: 8px;
  border-radius: 8px;
  color: #fff;
  background: #1e1e1e;
  font-size: 11px;
  text-align: center;
}
.units-picker__panel[data-unavailable="1"] .units-picker__hint,
.units-picker__panel:has([aria-disabled="true"]:focus-visible) .units-picker__hint { display: block; }
@media (prefers-reduced-motion: reduce) {
  .units-picker__trigger, .units-picker__choice, .units-picker__panel .switch-thumb { transition: none; }
}

/* Leave the Summary heading clear while the format panel is open. */
.space-container #units-row.units-picker:has(> #units-picker-trigger[aria-expanded="true"]) {
  margin-bottom: 12px !important;
}

/* The unit row and export action already have the container's shared gap. */
.space-container > .project-middle > .output-area-panel:first-child { margin-top: 0; }
.space-container > .project-middle > .output-area-panel:last-child { margin-bottom: 0; }

#mobile-outputs-panel-body .space-container.in-mobile-outputs-panel > .project-middle {
  padding-bottom: 0 !important;
}
/* The scroll shadow is a flex item, so its overlap also absorbs the row gap. */
#mobile-outputs-panel-body .space-container > .project-middle[data-bottom-shadow]::after {
  bottom: 0;
  margin-top: calc(-60px - var(--s10-p-));
}
