:root {
  /* Main Colors */
  --primary-tr-blue: hsl(var(--color-primary));
  --primary-tr-grey: #C4C4C4;
  --secondary-tr-blue: hsl(var(--color-secondary));
  --secondary-tr-grey: #9BA0AA;
  --highlight: #2b2c2e;
  --tooltip: #878785;
  --info: #2A7230;
  --danger: #a3161669;
  --tooltip-bg-col: hsl(var(--color-primary));
  /* --icon-btn-hover-bg-col: hsl(var(--color-primary));
  --text-btn-hover-bg-col: hsl(var(--color-primary)); */
  /* --text-btn-bg-col: black; */
  --text-btn-text-col: white;
  --text-btn-font-size: 0.7rem;
  --text-btn-width: 10rem;
  --numbox-border-radius: 1px;
  --numbox-label-font-size: 0.8rem;
  --numbox-text-color: #666;
  /* Measurements */
  --textxs: 0.6rem;
  --textsm: 0.8rem;
  --textmd: 1rem;
  --textlg: 1.5rem;
  --m-xs: 0.2rem;
  --m-ss: 0.5rem;
  --m-sm: 1rem;
  --m-md: 1.5rem;
  --m-lg: 2rem;
  --m-xl: 2.5rem;
  --head-foot: 3rem;
  --dynamic-p: 0.25rem;
}

* {
  margin: 0;
  box-sizing: border-box;
}

html {
  font-size: var(--textmd);
}

body {
  margin: 0;
  /* background-color: rgba(255, 255, 255, 0.2); */
  font-family: 'Museo Sans', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
}

/* Inputs */
.input-group-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.scale-factor-row {
  display: flex;
  align-items: center;
  width: 100%;
}

.scale-factor-row as-numbox {
  flex: 1;
}

.scale-current-display {
  font-size: var(--textxs);
  color: var(--secondary-tr-grey);
  white-space: nowrap;
  padding-left: var(--m-xs);
  min-width: 3rem;
}

.hidden-elem {
  display: none !important;
}

.active-elem {
  display: flex !important;
}

/* The main content cell is a grid; the viewport fills it and the overlays
   (footer, ruler, gizmo info) anchor to it. */
#as-main-content {
  position: relative;
}

.viewport-wrapper {
  /* position: absolute;
  width: 100vw;
  height: 100vh;
  left: 0;
  top: 0; */
  grid-area: 1 / 1;
  position: relative;
  width: 100%;
  height: 100%;
}

.viewport-wrapper #viewPort {
  width: 100%;
  height: 100%;
}

.viewport-wrapper as-axis-display {
  pointer-events: none;
  bottom: 2.5rem;
  width: 100px;
  height: 100px;
}

.footer-wrapper {
  position: absolute;
  bottom: 2rem;
  right: 0;
  width: 100%;
  z-index: 10;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-end;
  font-size: 16px;
}

/* .footer {
  position: absolute;
  bottom: 1rem;
  right: 0;
  width: 100%;
  z-index: 10;
  font-size: var(--textsm);
  pointer-events: none;
  color: var(--secondary-tr-grey);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-end;
  padding-bottom: calc(30px + 2em);
  padding-right: var(--head-foot);
} */

.gizmo-info-wrapper {
  position: absolute;
  bottom: 3rem;
  left: 3rem;
  height: 6rem;
  z-index: 10;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  pointer-events: none;
  color: black;
  border-radius: 10px;
  border: 0.03125rem solid lightgray;
  background: rgba(255, 255, 255, 0.66);
  filter: drop-shadow(0px 0px 5px rgba(0, 0, 0, .25));
}

.gizmo-info-text {
  padding: 1rem;
  font-size: var(--textsm);
}

/* Step Selector */
as-step-selector {
  /* as-components.css sets z-index: 0 which lets the absolute viewport render on top */
  z-index: 10;
  margin-left: var(--m-md);
  /* margin-top: auto;
  margin-bottom: auto; */
  /* The footer and the ruler overlay the bottom of the cell: the footer strip
     sits 2rem up and is about 2rem tall. Keep the panel clear of them. */
  --step-panel-gap-bottom: 5rem;
}

/* Shadow DOM CSS in as-step-selector can't style slotted light-DOM elements,
   so we provide the floating-panel position rules here */
/* as-step-selector>as-step-panel {
  top: 0;
  left: 100%;
} */

.card-content-wrapper {
  padding: 1rem;
}

.card-content {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.card-content-separator {
  border-top: 0.03125rem dashed grey;
  padding: 0.5rem 0;
}

.card-btn-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding-top: 0.7rem;
}

.x-axis {
  color: red;
  font-weight: bold;
  margin-right: 1rem;
}

.y-axis {
  color: green;
  font-weight: bold;
  margin-right: 1rem;
}

.z-axis {
  color: blue;
  font-weight: bold;
  margin-right: 1rem;
}

#importGroup-sample-button {
  display: none;
}

/* Dirty styling of the as-header component */
#header {
  /* as-components.css sets z-index: 0 which lets the absolute viewport render on top */
  z-index: 10;
  --col-button-hover-bg: var(--primary-tr-blue);
  --col-tooltip-bg: rgb(244, 243, 243);
  --col-tooltip-text: rgb(0, 0, 0);
}

.header-set {
  display: flex;
  gap: var(--button-padding-x, 1rem);
  align-items: center;
  padding: var(--button-padding-y, 0.375rem);
  border-radius: var(--default-radius, 0.5rem);
}

.hover-card-img {
  width: 35rem;
  height: auto;
}

as-numbox.x-axis {
  --label-color: red;
  /* .x-axis/.y-axis/.z-axis set margin-right for elements sitting beside
     something (e.g. in .scale-factor-row); a standalone numbox centered in
     .input-group-col has nothing to its right, so that margin just throws
     off the centering. */
  margin-right: 0;
}

as-numbox.y-axis {
  --label-color: green;
  margin-right: 0;
}

as-numbox.z-axis {
  --label-color: blue;
  margin-right: 0;
}

/* -------------------
   FONT-SIZE QUERIES
   ------------------- */
@media (max-width: 3840px) {
  html {
    font-size: 150%;
  }
}

@media (max-width: 2560px) {
  html {
    font-size: 100%;
  }
}

@media (max-width: 1050px) {
  html {
    font-size: 60%;
  }
}

@media (max-width: 800px) {
  html {
    font-size: 50%;
  }
}

@media (max-width: 720px) {
  html {
    font-size: 40%;
  }
}

/* -------------------
   LAYOUT BREAKPOINTS
   ------------------- */

/* -------- Mobile (< 600px) -------- */
@media (max-width: 37.5rem) {
  .viewport-wrapper as-axis-display {
    padding: var(--m-sm);
  }
}


/* -------- Tablet (600px – 1024px) -------- */
@media (min-width: 37.5rem) and (max-width: 64rem) {
  .viewport-wrapper as-axis-display {
    padding: var(--m-sm);
  }
}


/* -------- HD Landscape (e.g. 1280x720) -------- */
@media (max-height: 45rem) and (min-width: 60rem) {
  .viewport-wrapper as-axis-display {
    padding: var(--m-sm);
  }
}

/* Overrides as-components' `.as-defaults as-hovercard-wrapper { align-self: flex-end; }`
   (js/ext/as-components-v0.17.19.css) — same selector specificity, wins on load order
   since this stylesheet loads after the library's. */
.as-defaults as-hovercard-wrapper {
  align-self: stretch;
}

/* Same rule also sets `.as-defaults as-param-group as-numbox, as-numbox { align-self:
   flex-end; }` — reset to auto (the initial value) so a numbox in a centered flex
   container (e.g. .input-group-col) is centered by the parent's align-items instead
   of pinned to the cross-axis end. Matching both of the library's selectors keeps
   the specificity tied (and this stylesheet loads later, so it wins). */
.as-defaults as-param-group as-numbox,
as-numbox {
  align-self: auto;
}