/* The hologram material demo: the stage beside its knobs.
 *
 * The stage is a .mviz card (microns-cards.css), the knobs are a panel on
 * the library's tokens. Class names carry a holo prefix that nothing else in
 * the set uses (checked: holo3d, holoknobs, holoknob, holoswatches), because
 * two components sharing a base class break both the day one page loads both.
 */
.holo3d {
  display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 18px;
  align-items: start;
}
@media (max-width: 760px) { .holo3d { grid-template-columns: 1fr; } }
.holo3d .mviz { margin: 0; }
.holo3d .mviz-stage {
  aspect-ratio: 4 / 3;
  background: radial-gradient(120% 90% at 50% 45%, rgba(10,22,44,.85), rgba(4,7,14,.95) 70%);
}
/* the card's own scanline scrim is exactly what this shader is not */
.holo3d .mviz-stage::after { display: none; }

.holoknobs {
  background: rgb(var(--holo-panel, 15 18 24) / .7);
  border: 1px solid rgb(var(--holo-glow, 74 150 224) / .28);
  border-radius: 4px; padding: 14px 14px 10px; margin: 0;
}
.holoknobs h3 {
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: rgb(var(--holo-line, 196 228 255) / .8); margin: 0 0 10px; font-weight: 600;
}
/* the slider groups: the first open, the rest folded */
.hologroup { border-top: 1px solid rgb(var(--holo-glow, 74 150 224) / .18); padding: 6px 0 4px; }
.hologroup summary {
  cursor: pointer; list-style: none; font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: rgb(var(--holo-line, 196 228 255) / .75); padding: 4px 0 8px; user-select: none;
}
.hologroup summary::-webkit-details-marker { display: none; }
.hologroup summary::before { content: "+"; display: inline-block; width: 14px; color: rgb(var(--holo-cyan, 126 224 255)); }
.hologroup[open] summary::before { content: "\2212"; }
.hologroup summary:hover, .hologroup summary:focus-visible { color: rgb(var(--holo-ink, 239 244 251)); outline: none; }
.holoknob {
  display: grid; grid-template-columns: 1fr auto; gap: 0 8px; margin: 0 0 8px;
  font-size: 12.5px; line-height: 1.5;
}
.holoknob span { color: rgb(var(--holo-dim, 154 162 177)); }
.holoknob output { font-variant-numeric: tabular-nums; color: rgb(var(--holo-line, 196 228 255)); }
.holoknob input[type=range] {
  grid-column: 1 / -1; width: 100%; margin: 2px 0 0;
  accent-color: rgb(var(--holo-cyan, 126 224 255));
}
.holoswatches { display: flex; gap: 6px; margin: 4px 0 12px; flex-wrap: wrap; }
.holoswatches label { position: relative; width: 26px; height: 26px; border-radius: 50%; cursor: pointer; }
.holoswatches input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.holoswatches i {
  position: absolute; inset: 0; border-radius: 50%; background: var(--c);
  box-shadow: 0 0 0 1px rgb(0 0 0 / .6) inset, 0 0 10px -2px var(--c);
  transition: transform .15s;
}
.holoswatches input.holopick {
  position: static; opacity: 1; width: 26px; height: 26px; border-radius: 50%; padding: 0;
  border: 1px solid rgb(var(--holo-glow, 74 150 224) / .5); background: none; cursor: pointer;
}
.holoswatches input.holopick::-webkit-color-swatch-wrapper { padding: 2px; }
.holoswatches input.holopick::-webkit-color-swatch { border: 0; border-radius: 50%; }
.holotools .holoswatches input.holopick { width: 20px; height: 20px; }
.holoswatches input:checked + i {
  transform: scale(1.12);
  outline: 2px solid rgb(var(--holo-line, 196 228 255)); outline-offset: 2px;
}
.holoswatches input:focus-visible + i {
  outline: 2px solid rgb(var(--holo-warm, 232 169 58)); outline-offset: 2px;
}
/* the era: three buttons in a row, the pressed one lit */
.holoeras { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 0 0 12px; }
.holoeras button {
  font: inherit; font-size: 12.5px; letter-spacing: .06em; font-variant-numeric: tabular-nums;
  color: rgb(var(--holo-dim, 154 162 177)); background: rgb(var(--holo-panel, 15 18 24));
  border: 1px solid rgb(var(--holo-glow, 74 150 224) / .3); border-radius: 3px;
  padding: 6px 0; cursor: pointer;
}
.holoeras button[aria-pressed="true"] {
  color: rgb(var(--holo-ink, 239 244 251));
  border-color: rgb(var(--holo-cyan, 126 224 255) / .9);
  box-shadow: 0 0 12px -4px rgb(var(--holo-cyan, 126 224 255)), inset 0 0 0 1px rgb(var(--holo-cyan, 126 224 255) / .25);
}
.holoeras button:hover, .holoeras button:focus-visible { border-color: rgb(var(--holo-line, 196 228 255)); outline: none; }

/* the styles: a wrapping row of small pills */
.holostyles { display: flex; flex-wrap: wrap; gap: 5px; margin: 0 0 12px; }
.holostyles button {
  font: inherit; font-size: 11.5px; letter-spacing: .04em;
  color: rgb(var(--holo-dim, 154 162 177)); background: rgb(var(--holo-panel, 15 18 24));
  border: 1px solid rgb(var(--holo-glow, 74 150 224) / .3); border-radius: 999px;
  padding: 3px 9px; cursor: pointer;
}
.holostyles button[aria-pressed="true"] {
  color: #1a1204; background: rgb(var(--holo-warm, 232 169 58));
  border-color: rgb(var(--holo-warm, 232 169 58));
  box-shadow: 0 0 12px -3px rgb(var(--holo-warm, 232 169 58));
}
.holostyles button:hover, .holostyles button:focus-visible { border-color: rgb(var(--holo-line, 196 228 255)); outline: none; }
.holodyn {
  width: 100%; font: inherit; font-size: 12.5px; letter-spacing: .06em; cursor: pointer;
  color: rgb(var(--holo-dim, 154 162 177)); background: rgb(var(--holo-panel, 15 18 24));
  border: 1px solid rgb(var(--holo-glow, 74 150 224) / .3); border-radius: 3px; padding: 6px 0; margin: 0 0 8px;
}
.holodyn[aria-pressed="true"] {
  color: #1a1204; background: rgb(var(--holo-warm, 232 169 58)); border-color: rgb(var(--holo-warm, 232 169 58));
  box-shadow: 0 0 14px -3px rgb(var(--holo-warm, 232 169 58));
}
.holodyn:hover, .holodyn:focus-visible { border-color: rgb(var(--holo-line, 196 228 255)); outline: none; }
.holoweather { font-size: 12px; color: rgb(var(--holo-dim, 154 162 177)); margin: 0 0 12px; line-height: 1.5; }
.holoweather select { margin: 6px 0 4px; }
.holoweather output { display: block; font-variant-numeric: tabular-nums; color: rgb(var(--holo-line, 196 228 255)); }
/* the wide layout: a tool row over the stage on the left, the knobs in a
   scrolling column on the right, the whole thing sized to the window */
.holo3d-wide {
  grid-template-columns: minmax(0, 1fr) 270px; grid-template-rows: auto minmax(0, 1fr);
  grid-template-areas: "tools knobs" "stage knobs"; height: calc(100vh - 92px); min-height: 420px;
}
@media (max-width: 760px) {
  .holo3d-wide { grid-template-columns: 1fr; grid-template-rows: auto auto auto; grid-template-areas: "tools" "stage" "knobs"; height: auto; }
  /* a phone: the grid has no height to hand down, so the stage takes one
     of its own, most of the screen, never wider than it is tall */
  .holo3d-wide .mviz { height: auto; }
  .holo3d-wide .mviz-stage { flex: none; height: min(68vh, 100vw); }
  .holo3d-wide .holoknobs { max-height: none; overflow: visible; }
  .holo3d .mviz > .mviz-eyebrow { font-size: 9px; letter-spacing: .12em; }
  .holotools { gap: 6px 10px; }
  .holotools select { max-width: 60vw; }
}
.holo3d-wide .holotools { grid-area: tools; }
/* stretch, not start: the card must fill its row or the stage has no height */
.holo3d-wide { align-items: stretch; }
.holo3d-wide .mviz { grid-area: stage; display: flex; flex-direction: column; min-height: 0; height: 100%; box-sizing: border-box; }
.holo3d-wide .mviz-stage { aspect-ratio: auto; flex: 1 1 auto; min-height: 0; }
.holo3d-wide .holoknobs { grid-area: knobs; overflow-y: auto; max-height: 100%; }
/* the knob column scrolls, so its scrollbar is part of the panel: thin, the
   panel's own hairline colour, no white track. color-scheme dark keeps the
   native controls (the select, the picker) dark too. */
.holoknobs { color-scheme: dark; scrollbar-width: thin; scrollbar-color: rgb(var(--holo-glow, 74 150 224) / .45) transparent; }
.holoknobs::-webkit-scrollbar { width: 8px; }
.holoknobs::-webkit-scrollbar-track { background: transparent; }
.holoknobs::-webkit-scrollbar-thumb { background: rgb(var(--holo-glow, 74 150 224) / .45); border-radius: 4px; border: 2px solid transparent; background-clip: padding-box; }
.holoknobs::-webkit-scrollbar-thumb:hover { background-color: rgb(var(--holo-line, 196 228 255) / .7); }
.holotools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 0 0 4px; }
.holotools .holostyles, .holotools .holoeras, .holotools .holoswatches { margin: 0; }
.holotools .holoeras { display: flex; gap: 4px; }
.holotools .holoeras button { padding: 3px 9px; font-size: 11.5px; }
.holotools .holoswatches label { width: 20px; height: 20px; }
.holotools [data-share] { margin-left: auto; }
.holotools select {
  font: inherit; font-size: 12px; color: rgb(var(--holo-ink, 239 244 251));
  background: rgb(var(--holo-panel, 15 18 24)); border: 1px solid rgb(var(--holo-glow, 74 150 224) / .4);
  border-radius: 3px; padding: 4px 6px;
}
.holofs {
  font: inherit; font-size: 11.5px; letter-spacing: .06em; cursor: pointer;
  color: rgb(var(--holo-line, 196 228 255)); background: rgb(var(--holo-panel, 15 18 24));
  border: 1px solid rgb(var(--holo-glow, 74 150 224) / .4); border-radius: 3px; padding: 4px 10px;
}
.holofs:hover, .holofs:focus-visible { border-color: rgb(var(--holo-line, 196 228 255)); outline: none; }
.holofs[aria-pressed="true"] { border-color: rgb(var(--holo-warm, 232 169 58)); color: rgb(var(--holo-warm, 232 169 58)); }
/* the stage fullscreen: the card fills the screen and its chrome goes */
.mviz:fullscreen { background: #07080B; padding: 0; border: 0; display: flex; flex-direction: column; }
.mviz:fullscreen .mviz-stage { flex: 1 1 auto; height: 100%; aspect-ratio: auto; border: 0; border-radius: 0; }
.mviz:fullscreen .mviz-eyebrow, .mviz:fullscreen .mviz-facts, .mviz:fullscreen > b.k { display: none; }
/* render mode: the stage alone, edge to edge */
body.holoshot { padding: 0 !important; margin: 0; overflow: hidden; }
body.holoshot .wrap { max-width: none; padding: 0; }
body.holoshot .wrap > :not(.holo3d), body.holoshot .holoknobs, body.holoshot .mviz-eyebrow,
body.holoshot .mviz-facts, body.holoshot .mviz > b.k, body.holoshot .holotools { display: none !important; }
body.holoshot .holo3d-wide { height: 100vh; }
body.holoshot .holo3d { display: block; }
body.holoshot .mviz { border: 0; padding: 0; background: none; }
body.holoshot .mviz-stage { aspect-ratio: auto; height: 100vh; border: 0; border-radius: 0; background: #07080B; }

.holoknobs select, .holoknobs [data-reset], .holoknobs [data-send] {
  width: 100%; font: inherit; font-size: 12.5px; color: rgb(var(--holo-ink, 239 244 251));
  background: rgb(var(--holo-panel, 15 18 24));
  border: 1px solid rgb(var(--holo-glow, 74 150 224) / .4);
  border-radius: 3px; padding: 6px 8px; margin: 0 0 10px; cursor: pointer;
}
.holoknobs button:hover, .holoknobs button:focus-visible,
.holoknobs select:focus-visible { border-color: rgb(var(--holo-line, 196 228 255)); outline: none; }
@media (prefers-reduced-motion: reduce) { .holoswatches i { transition: none; } }

/* the send button: the same control as reset, lit, because it is the way out */
.holoknobs [data-send] {
  margin-top: 8px; color: rgb(var(--holo-ink, 239 244 251));
  border-color: rgb(var(--holo-glow, 74 150 224) / .6); background: rgb(var(--holo-glow, 74 150 224) / .12);
}
