/* Embedded 3D design pages. Kept small: readers load this instead of style.css.
   Colours and the toolbar mirror style.css (:root and .zoom-controls). */
:root {
  color-scheme: light;
  --ink: #17221d;
  --muted: #647069;
  --paper: #f8f7f1;
  --line: #d9ddd6;
  --green: #1d5c43;
  --green-dark: #13412f;
  --mint: #dcecdf;
  --selected: #315f9e;
  --selected-hover: #284f85;
  --selected-ink: #ffffff;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { color: var(--ink); background: #eef0eb; overflow: hidden; }
.embed-background-dark { color: #f1f4f0; background: #1f2622; }
.embed-background-transparent { background: transparent; }

.embed { position: relative; width: 100%; height: 100%; }
.embed-start {
  position: absolute; inset: 0; display: grid; place-items: center; width: 100%; padding: 0; border: 0;
  color: inherit; background: transparent; cursor: pointer; font: inherit;
}
.embed-start:disabled { cursor: progress; }
.embed-start:focus-visible { outline: 3px solid var(--green); outline-offset: -3px; }
.embed-still { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.embed-start-label {
  position: relative; padding: .6rem 1.1rem; border-radius: 999px; color: #fff; background: var(--green);
  box-shadow: 0 6px 18px rgb(23 34 29 / 25%); font-size: .95rem; font-weight: 800;
}
.embed-start:hover:not(:disabled) .embed-start-label { background: var(--green-dark); }
.embed-viewer { position: absolute; inset: 0; }
.embed-viewer canvas { display: block; width: 100%; height: 100%; outline: none; }
.embed-viewer .preview-3d-message, .embed-viewer .preview-3d-hint { display: none; }

.zoom-controls {
  position: absolute; z-index: 4; top: .6rem; right: .6rem; display: flex; overflow: hidden;
  border: 1px solid #cad1ca; border-radius: .5rem; background: rgb(255 255 255 / 94%);
  box-shadow: 0 4px 14px rgb(23 34 29 / 12%); backdrop-filter: blur(8px);
}
.zoom-controls[hidden] { display: none; }
.zoom-controls button {
  min-width: 2.2rem; height: 2.1rem; padding: 0 .55rem; border: 0; border-right: 1px solid #dce0db;
  color: var(--ink); background: transparent; cursor: pointer; font: inherit; font-size: .68rem; font-weight: 800;
}
.zoom-controls button[hidden] { display: none; }
.zoom-controls button:last-child { border-right: 0; }
.zoom-controls button:hover:not(:disabled) { color: var(--green); background: var(--mint); }
.zoom-controls button[aria-pressed="true"]:not(:disabled) {
  color: var(--selected-ink); border-color: var(--selected); background: var(--selected);
}
.zoom-controls button[aria-pressed="true"]:not(:disabled):hover { border-color: var(--selected-hover); background: var(--selected-hover); }
.zoom-controls button:focus-visible { outline: 2px solid var(--selected); outline-offset: -3px; }
.zoom-controls button[aria-pressed="true"]:focus-visible:not(:disabled) { outline-color: var(--selected-ink); }

.embed-message {
  position: absolute; z-index: 5; left: 50%; bottom: 2.6rem; max-width: calc(100% - 2rem); margin: 0;
  padding: .45rem .8rem; border-radius: .5rem; transform: translateX(-50%);
  color: var(--ink); background: rgb(255 255 255 / 94%); box-shadow: 0 4px 14px rgb(23 34 29 / 12%);
  font-size: .8rem; text-align: center;
}
.embed-message[hidden] { display: none; }
.embed-credit {
  position: absolute; z-index: 4; left: .6rem; bottom: .5rem; display: flex; gap: .4rem; align-items: center;
  max-width: calc(100% - 1.2rem); padding: .25rem .55rem; border-radius: .4rem;
  background: rgb(255 255 255 / 86%); font-size: .72rem; white-space: nowrap; overflow: hidden;
}
.embed-credit a { overflow: hidden; color: var(--green); font-weight: 700; text-decoration: none; text-overflow: ellipsis; }
.embed-credit a:hover { color: var(--green-dark); text-decoration: underline; }
.embed-credit a:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.embed-background-dark .embed-credit, .embed-background-dark .embed-message { background: rgb(23 30 26 / 86%); color: #f1f4f0; }
.embed-background-dark .embed-credit a { color: #9fd4b6; }

.embed-unavailable { display: grid; place-content: center; gap: .6rem; padding: 1rem; text-align: center; }
.embed-unavailable p { margin: 0; font-weight: 700; }
.embed-unavailable a { color: var(--green); font-size: .8rem; font-weight: 700; }
