/* The website's design previews (views/preview/): what the three share - the product hexagons, the 3D view loaded on
   request, the brand. Each design's own look is in preview-a.css, preview-b.css, preview-c.css. */

.pv {
  background-image: none;
}

/* the brand: the v14 mark and the word */
.pv-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.01em;
}
.pv-brand img {
  width: 40px;
  height: auto;
}
.pv-brand:hover {
  color: var(--text);
}

/* a product's small hexagon in its colour (the app's rail colours) */
.pv-hex {
  --h: var(--c-pcb-hex);
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 26px;
  flex: none;
  color: #fff;
}
.pv-hex > svg:first-child {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  fill: var(--h);
}
.pv-hex > svg + svg {
  position: relative;
  width: 14px;
  height: 14px;
  fill: none;
  stroke: #ffffff;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.pv-hex > img {
  position: relative;
  width: 18px;
  height: auto;
}
.pv-hex-cad {
  --h: var(--c-cad-hex);
}
.pv-hex-firmware {
  --h: var(--c-fw-hex);
}
.pv-hex-sim {
  --h: var(--c-sim-hex);
}
.pv-hex-faezor {
  --h: var(--bg-1);
}
.pv-hex-faezor > svg:first-child {
  stroke: color-mix(in srgb, #6f95dc 60%, var(--line-2));
  stroke-width: 4;
}

/* the board and its case in 3D, loaded on request (static/js/preview.js) */
.turn {
  margin: 0;
  position: relative;
}
.turn-stage {
  position: relative;
}
.turn-stage > img {
  width: 100%;
  height: auto;
  transition: opacity 0.4s ease;
}
.turn-3d {
  position: absolute;
  inset: 0;
}
.turn-3d canvas {
  width: 100% !important;
  height: 100% !important;
  touch-action: none;
  cursor: grab;
}
.turn.is-3d .turn-stage > img {
  opacity: 0;
}
.turn-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-top: 12px;
}
.turn-controls {
  display: flex;
  gap: 8px;
}
.turn-controls[hidden] {
  display: none;
}
.turn-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: var(--bg-1);
  color: var(--text);
  font: 600 14px/1 var(--sans);
  cursor: pointer;
}
.turn-btn svg {
  width: 18px;
  height: 18px;
}
.turn-btn small {
  font-weight: 450;
  color: var(--text-2);
}
.turn-btn:hover {
  border-color: var(--text-2);
}
.turn-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.turn-btn:disabled {
  opacity: 0.6;
  cursor: progress;
}
.turn-btn[hidden] {
  display: none;
}
.turn-status {
  margin: 0;
  font-size: 13.5px;
  color: var(--text-2);
}

.pv-icon-btn {
  padding: 8px !important;
}
.pv-icon-btn svg {
  width: 18px;
  height: 18px;
}
@media (max-width: 640px) {
  .pv-hide-sm {
    display: none !important;
  }
}

/* the honeycomb's links (views/preview/shared.ts honeycomb): the chapter in view (preview A) */
.hc-link.is-current .hc-fill {
  stroke: var(--text);
  stroke-width: 4.5;
}

@media (prefers-reduced-motion: reduce) {
  .turn-stage > img {
    transition: none;
  }
}

/* the public pages' documents (markdown): long addresses wrap, code blocks and tables scroll inside */
.pv-sub article code {
  overflow-wrap: anywhere;
}
.pv-sub article pre {
  max-width: 100%;
  overflow-x: auto;
}
.pv-sub article pre code {
  overflow-wrap: normal;
}
.pv-sub article table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
}
