/* FGD Live Mockups — editor. Sits inside the normal FGD page (site header and footer, style.css):
   black and white, square, uppercase labels. Uses the site's --fg / --bg, so dark mode works too. */
main.lv { padding-bottom: 0; }  /* the editor ends at the line, no site gap under it */
.lv { --stage: #ededeb; display: flex; flex-direction: column; height: calc(100vh - var(--hh, 60px)); height: calc(100dvh - var(--hh, 60px)); min-height: 520px; font-size: 14px; line-height: 1.3; }
html[data-theme="dark"] .lv { --stage: #1b1b1b; }
.lv + .site-footer { margin-top: 0; }

.lv-top { flex: none; display: flex; align-items: center; gap: 20px; height: 52px; padding: 0 20rem; border-bottom: 1px solid var(--fg); }
.lv-title { font-size: 12px; font-weight: 400; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.lv-actions { display: flex; gap: 8px; margin-left: auto; }
/* export buttons say what you get; paid ones carry their price */
.lv-buy { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 6px 14px 6px; text-align: left; }
.lv-buy b { font-weight: 400; display: flex; align-items: center; }
.lv-buy small { font-size: 10px; letter-spacing: .03em; text-transform: none; opacity: .7; }
.lv-pro { font-style: normal; font-size: 9px; line-height: 1; letter-spacing: .08em; text-transform: uppercase; padding: 2px 4px 1px; margin-left: 7px; border: 1px solid currentColor; }
/* product rail: square thumbnails with a label; scrolls when the list grows */
.lv-rail { flex: none; width: 104px; border-right: 1px solid var(--fg); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; display: flex; flex-direction: column; }
.lv-rail::-webkit-scrollbar { display: none; }
/* edge-to-edge images, a dark line between them; the current product at full strength */
.lv-rail button { display: block; flex: none; padding: 0; border-bottom: 1px solid var(--fg); opacity: .5; transition: opacity .2s; }
.lv-rail button:hover, .lv-rail button[aria-pressed="true"] { opacity: 1; }
.lv-rail img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; background: var(--stage); }
.lv-btn { border: 1px solid var(--fg); padding: 7px 16px 6px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; transition: background-color .2s, color .2s; }
.lv-btn:hover, .lv-btn.solid { background: var(--fg); color: var(--bg); }
.lv-btn.solid:hover { background: var(--bg); color: var(--fg); }
.lv-btn.wide { display: block; width: 100%; }

.lv-main { flex: 1 1 0; min-height: 0; display: flex; }
.lv-stage { flex: 1 1 0; min-width: 0; position: relative; background: var(--stage); display: flex; align-items: center; justify-content: center; padding: 0; }
.lv-shot { position: relative; line-height: 0; background: #ddd; }
.lv-shot canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; }
.lv-shot canvas:active { cursor: grabbing; }
.lv-drop { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; background: rgba(0,0,0,.72); color: #fff; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; line-height: 1.3; pointer-events: none; }
.lv-stage.over .lv-drop { display: flex; }
.lv-refine { position: absolute; left: 0; bottom: 0; height: 2px; width: 0; background: #fff; mix-blend-mode: difference; pointer-events: none; transition: opacity .5s; }
.lv-refine.done { opacity: 0; }
.lv-status { position: absolute; left: 12px; bottom: 12px; margin: 0; padding: 6px 10px 5px; background: var(--bg); color: var(--fg); font-size: 11px; line-height: 1.2; letter-spacing: .08em; text-transform: uppercase; pointer-events: none; }
.lv-status[hidden] { display: none; }
/* how to move the view */
.lv-help { position: absolute; top: 12px; left: 12px; display: flex; flex-wrap: wrap; max-width: calc(100% - 24px); padding: 1px 0 0 1px; line-height: 1.2; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; pointer-events: none; opacity: 0; transition: opacity .3s; }
.lv-help span { padding: 6px 9px 5px; background: var(--bg); color: var(--fg); white-space: nowrap; border: 1px solid var(--fg); margin: -1px 0 0 -1px; }  /* each tag has its own border: a wrapped row leaves no dark band */
.lv-help b { font-weight: 400; opacity: .55; margin-right: 5px; }
.lv-help.intro, .lv-shot:hover .lv-help { opacity: 1; }
.lv-shot.busy .lv-help { opacity: 0; }
/* focus point marker */
.lv-focus { position: absolute; width: 44px; height: 44px; margin: -22px 0 0 -22px; border: 1px solid #fff; border-radius: 50%; mix-blend-mode: difference; pointer-events: none; opacity: 0; }
.lv-focus.on { animation: lv-focus 1.2s ease-out; }
@keyframes lv-focus { 0% { opacity: 1; transform: scale(1.6); } 30% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1); } }

.lv-panel { flex: none; width: 320px; border-left: 1px solid var(--fg); overflow-y: auto; overscroll-behavior: contain; }
/* sections fold away: a header with a plus / minus, the controls underneath */
.lv-sec { border-bottom: 1px solid var(--fg); }
.lv-sec:last-child { border-bottom: 0; }
.lv-sec h2 { font-size: 11px; font-weight: 400; margin: 0; }
.lv-sec-h { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 15px 20px 14px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; text-align: left; }
.lv-sec-h span { opacity: .55; transition: opacity .2s; }
.lv-sec-h:hover span, .lv-sec[data-open] .lv-sec-h span { opacity: 1; }
.lv-sec-h i { position: relative; flex: none; width: 9px; height: 9px; }
.lv-sec-h i::before, .lv-sec-h i::after { content: ""; position: absolute; background: var(--fg); }
.lv-sec-h i::before { left: 0; right: 0; top: 4px; height: 1px; }
.lv-sec-h i::after { top: 0; bottom: 0; left: 4px; width: 1px; }
.lv-sec[data-open] .lv-sec-h i::after { display: none; }
.lv-sec-b { display: none; padding: 2px 20px 20px; }
.lv-sec[data-open] .lv-sec-b { display: block; }
/* picture tiles (scenes) */
/* scene tiles: images only, edge to edge across the panel, dark lines between them; the current one at full strength */
.lv-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0 -20px 16px; border-top: 1px solid var(--fg); border-bottom: 1px solid var(--fg); }
.lv-tiles:last-child { margin-bottom: 0; }
.lv-tiles button { display: block; min-width: 0; padding: 0; background: var(--stage); border-right: 1px solid var(--fg); border-bottom: 1px solid var(--fg); }
.lv-tiles button:nth-child(3n) { border-right: 0; }
.lv-tiles img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; opacity: .5; transition: opacity .2s; }
.lv-tiles button:hover img, .lv-tiles button[aria-pressed="true"] img { opacity: 1; }
/* upload target: shows what is on the product now */
.lv-up { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px; margin-bottom: 12px; border: 1px dashed var(--fg); text-align: left; transition: background-color .2s, color .2s; }
.lv-up:hover { background: var(--fg); color: var(--bg); }
.lv-up canvas { flex: none; width: 56px; height: 56px; background: var(--stage); }
.lv-up b { display: block; font-weight: 400; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 3px; }
.lv-up small { display: block; font-size: 12px; line-height: 1.35; opacity: .6; }
.lv-up small.lv-fit { opacity: 1; margin-top: 4px; font-variant-numeric: tabular-nums; }  /* the size an upload fits best */
.lv-row { display: grid; grid-template-columns: 84px 1fr 44px; align-items: center; gap: 10px; min-height: 28px; font-size: 13px; }
.lv-row output { text-align: right; font-size: 12px; font-variant-numeric: tabular-nums; opacity: .6; }
.lv-group { margin-bottom: 10px; }
.lv-group:last-child { margin-bottom: 0; }
.lv-group > span { display: block; font-size: 13px; margin-bottom: 6px; }
.lv-tiles + .lv-group, .lv-chips + .lv-row, .lv-group + .lv-row { margin-top: 12px; }
.lv-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.lv-chips button { border: 1px solid var(--fg); padding: 5px 10px 4px; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.lv-chips button[aria-pressed="true"] { background: var(--fg); color: var(--bg); }
.lv-swatches { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.lv-swatches button, .lv-swatches label { width: 24px; height: 24px; border: 1px solid var(--fg); position: relative; overflow: hidden; }
.lv-swatches button[aria-pressed="true"] { outline: 2px solid var(--fg); outline-offset: 2px; }
.lv-swatches label { display: block; cursor: pointer; background: conic-gradient(#e44, #ee4, #4c4, #4cc, #44e, #c4c, #e44); }
.lv-swatches input[type="color"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.lv-btns { display: flex; gap: 8px; margin-top: 12px; }
.lv-btns .lv-btn { flex: 1; padding-left: 8px; padding-right: 8px; }
.lv-sec-b > .lv-btn.wide { margin-top: 10px; }
.lv-note { font-size: 12px; opacity: .6; margin: 10px 0; line-height: 1.4; }

.lv input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 20px; background: none; cursor: pointer; }
.lv input[type="range"]::-webkit-slider-runnable-track { height: 1px; background: var(--fg); }
.lv input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; margin-top: -6px; background: var(--fg); border-radius: 0; }
.lv input[type="range"]::-moz-range-track { height: 1px; background: var(--fg); }
.lv input[type="range"]::-moz-range-thumb { width: 12px; height: 12px; background: var(--fg); border: 0; border-radius: 0; }
.lv button:focus-visible, .lv input:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }

.lv-export { position: fixed; inset: 0; z-index: 500; display: flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--bg) 88%, transparent); color: var(--fg); }
.lv-export[hidden] { display: none; }
.lv-export > div { width: 260px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.lv-bar { height: 1px; background: color-mix(in srgb, var(--fg) 25%, transparent); margin-top: 12px; }
.lv-bar i { display: block; height: 3px; margin-top: -1px; width: 0; background: var(--fg); }

/* light map */
.lv-lmap { margin: 0 0 14px; }
.lv-lmap canvas { display: block; width: 100%; aspect-ratio: 1; border: 1px solid var(--fg); cursor: grab; touch-action: none; }
.lv-lmap canvas:active { cursor: grabbing; }
.lv-lmap-bar { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.lv-lm-btn { border: 1px solid var(--fg); padding: 4px 10px 3px; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.lv-lm-btn:hover { background: var(--fg); color: var(--bg); }
.lv-lm-set { flex: 1 0 100%; margin-top: 6px; }
.lv-lm-set input[type="color"] { width: 32px; height: 22px; padding: 0; border: 1px solid var(--fg); background: none; }

/* checkout window */
.lv-sheet.lv-co { max-width: 460px; }
.lv-co-img { display: block; width: 100%; height: auto; max-height: 38vh; object-fit: contain; background: var(--stage); border: 1px solid var(--fg); margin-bottom: 14px; }
.lv-co-spec { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 0 0 16px; padding-bottom: 12px; border-bottom: 1px solid var(--fg); font-size: 13px; }
.lv-co-spec b { font-weight: 400; font-size: 26px; }
.lv-co-pp { min-height: 44px; }
.lv-co-ok { font-size: 16px; margin: 0 0 12px; }
.lv-co-msg:empty { display: none; }
.lv-sheet .lv-note a { color: inherit; text-decoration: underline; }
.lv-modal { position: fixed; inset: 0; z-index: 600; display: flex; align-items: center; justify-content: center; padding: 20px; background: color-mix(in srgb, var(--bg) 72%, transparent); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.lv-modal[hidden] { display: none; }
.lv-sheet { position: relative; width: 100%; max-width: 420px; max-height: 100%; overflow-y: auto; padding: 28px; background: var(--bg); color: var(--fg); border: 1px solid var(--fg); font-size: 14px; line-height: 1.35; }
.lv-kicker { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; opacity: .55; }
.lv-sheet h2 { font-size: 24px; font-weight: 400; line-height: 1.15; margin: 8px 0 18px; }
.lv-sheet ul { list-style: none; margin: 0 0 18px; padding: 0; border-top: 1px solid var(--fg); }
.lv-sheet li { padding: 9px 0 8px; border-bottom: 1px solid var(--fg); font-size: 13px; }
.lv-close { position: absolute; top: 16px; right: 18px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.lv-close:hover { text-decoration: underline; }


/* phones: products and export under the header, the scene, then the controls */
@media (max-width: 860px) {
  .lv { display: block; height: auto; min-height: 0; }
  .lv-top { flex-wrap: wrap; height: auto; padding: 12px 20rem; gap: 10px; }
  .lv-title { margin-right: auto; }
  .lv-rail { width: auto; flex-direction: row; border-right: 0; border-bottom: 1px solid var(--fg); overflow-x: auto; overflow-y: hidden; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
  .lv-rail button { flex: 0 0 84px; border-bottom: 0; border-right: 1px solid var(--fg); scroll-snap-align: start; }
  .lv-main { display: block; }
  .lv-stage { flex: none; height: 56vh; padding: 0; }  /* layout() sets the exact picture height */
  .lv-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; margin-left: 0; }
  .lv-buy { padding: 6px 8px; white-space: normal; } .lv-buy small { font-size: 9px; line-height: 1.3; }
  .lv-panel { width: auto; border-left: 0; border-top: 1px solid var(--fg); overflow: visible; }
  .lv-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-left: -20rem; margin-right: -20rem; }
  .lv-tiles button:nth-child(3n) { border-right: 1px solid var(--fg); } .lv-tiles button:nth-child(4n) { border-right: 0; }
  .lv-sec-h, .lv-sec-b { padding-left: 20rem; padding-right: 20rem; }
  /* the scene picker comes first, right under the picture */
  .lv-panel { display: flex; flex-direction: column; }
  .lv-sec[data-key="scene"] { order: -1; }
  /* the small live preview shown while changing things further down */
  .lv-pip { position: fixed; top: calc(var(--hh, 65px) + 10px); right: 10px; z-index: 60; width: 54vw; height: auto; border: 1px solid var(--fg); background: var(--stage); opacity: 0; transform: translateY(-8px); pointer-events: none; transition: opacity .25s, transform .25s; }
  .lv-pip.on { opacity: 1; transform: none; }  /* never catches taps: the controls under it stay usable */
}
.lv-pip { display: none; }
@media (max-width: 860px) { .lv-pip { display: block; } }

/* about this mockup: a short description and links to the other scenes and products (also read by search engines) */
.lv-about { padding: 20px 24px 24px; border-top: 1px solid var(--fg); font-size: 13px; line-height: 1.6; }  /* a line under the editor, the text close below it */
.lv-about > * { max-width: 760px; }
.lv-about p { margin: 0 0 12px; }
.lv-about h2 { font-size: 13px; font-weight: 500; margin: 18px 0 4px; }
.lv-about-links { margin: 0 0 6px; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; }
.lv-about-links a { color: inherit; }
@media (max-width: 760px) { .lv-about { padding: 16px 16px 8px; } }

/* zoom buttons on the scene (the mouse wheel scrolls the page) */
.lv-zoom { position: absolute; right: 12px; bottom: 12px; display: flex; flex-direction: column; z-index: 2; }
.lv-zoom button { touch-action: none; user-select: none; -webkit-user-select: none; width: 36px; height: 36px; padding: 0; border: 1px solid var(--fg); background: var(--bg); color: var(--fg); font: inherit; font-size: 18px; line-height: 1; cursor: pointer; }
.lv-zoom button + button { border-top: 0; }
.lv-zoom button:hover { background: var(--fg); color: var(--bg); }
.lv-shot.busy .lv-zoom { opacity: 1; }

/* export buttons: a download arrow, and on desktop they sit in the configurator's column (same width, same inner edge) */
.lv-dl { flex: none; width: 13px; height: 13px; margin-right: 7px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: square; }
.lv-btn .lv-dl { vertical-align: -2px; }
@media (min-width: 861px) {
  .lv-top { padding-right: 0; }
  .lv-actions { flex: none; align-self: stretch; align-items: center; gap: 6px; width: 320px; padding: 0 20px; border-left: 1px solid var(--fg); }
  .lv-actions .lv-buy { flex: 1 1 0; min-width: 0; padding-left: 8px; padding-right: 6px; }
  .lv-actions .lv-buy small { white-space: nowrap; letter-spacing: 0; }
}

/* the view gizmo (bottom left; written as .lv-shot canvas.lv-gizmo to win over the scene canvas rule): world axes as the camera sees them; drag it to orbit */
.lv-shot canvas.lv-gizmo { position: absolute; display: block; left: 10px; bottom: 10px; width: 72px; height: 72px; z-index: 2; border-radius: 50%; color: var(--fg); background: color-mix(in srgb, var(--bg) 55%, transparent); border: 1px solid color-mix(in srgb, var(--fg) 35%, transparent); touch-action: none; cursor: grab; }
@media (max-width: 860px) { .lv-shot canvas.lv-gizmo { width: 64px; height: 64px; left: 8px; bottom: 8px; } }
.lv-shot canvas.lv-gizmo.on { cursor: grabbing; background: color-mix(in srgb, var(--bg) 80%, transparent); }
