/* sunshine-360 — this demo in the Veydr Labs look. See kit.css for the shared --vl-* variables.
   Linked after the demo's own <style>, so a rule here with the same selector wins.
   The colours the viewer draws itself (floor rings, their name tags, the VR pointer) are swapped in
   tools/demo-brand/sunshine-360.json. Nothing here changes what the tour does or says. */

:root {
  /* The demo's own variables, pointed at the site's palette. */
  --ink: var(--vl-white);
  --dim: var(--vl-muted);
  --panel: var(--vl-panel);
  --line: var(--vl-line);
  --accent: var(--vl-accent);

  --s3-rim: rgba(244, 243, 239, 0.34);                        /* edge of a button that is off */
  --s3-quiet: rgba(244, 243, 239, 0.12);                      /* fill of a button that cannot be used */
  --s3-tool: 38px;                                            /* height of a top-right button */
  --s3-gap: 8px;
  --s3-room: 72px;                                            /* room for the room-name panel (two lines) */
  --s3-bottom: max(16px, env(safe-area-inset-bottom, 0px));
  --s3-clear: calc(var(--vl-below) + var(--s3-room));         /* where the top-left stack ends */
}
@media (pointer: coarse) { :root { --s3-tool: 40px; } }

html, body {
  background: var(--vl-black); color: var(--vl-white);
  font-family: var(--vl-font); font-size: 15px; line-height: 1.5; font-stretch: 100%;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
::selection { background: var(--vl-accent); color: var(--vl-on-accent); }

/* ---- Buttons: pills. Off = dark with an off-white edge; on, and anything that starts something, = Vermilion. */
button {
  font-family: var(--vl-font); font-size: 13px; font-weight: 600; font-stretch: 100%; letter-spacing: 0.01em; line-height: 1.15;
  color: var(--vl-white); background: var(--vl-panel); border: 1px solid var(--s3-rim); border-radius: 999px;
  -webkit-backdrop-filter: var(--vl-blur); backdrop-filter: var(--vl-blur);
  transition: color 0.4s var(--vl-ease), background-color 0.4s var(--vl-ease), border-color 0.4s var(--vl-ease), box-shadow 0.4s var(--vl-ease);
}
button:focus-visible { outline: 2px solid var(--vl-accent); outline-offset: 3px; }

/* ---- Top right: Motion look, Enter VR, Plan. Level with the bar on wide screens. */
#tools { top: calc(var(--vl-top) + (var(--vl-bar) - var(--s3-tool)) / 2); right: var(--vl-right); gap: var(--s3-gap); }
#tools button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: var(--s3-tool); padding: 0 16px; white-space: nowrap;
  background: var(--vl-panel); border-color: var(--s3-rim); color: var(--vl-white);
}
#tools button[aria-pressed='true'], #tools #vr2 { background: var(--vl-accent); border-color: var(--vl-accent); color: var(--vl-on-accent); font-weight: 650; }

/* ---- Top left, under the bar: the room you are standing in. */
#room {
  top: var(--vl-below); left: var(--vl-left); right: auto; max-width: calc(100vw - var(--vl-left) - var(--vl-right));
  padding: 13px 20px 13px 16px; background: var(--vl-panel); border: 1px solid var(--vl-line); border-radius: 0;
  -webkit-backdrop-filter: var(--vl-blur); backdrop-filter: var(--vl-blur);
}
#room b { font-size: 21px; font-weight: 700; font-stretch: var(--vl-wide); letter-spacing: -0.03em; line-height: 1; text-wrap: balance; }
#room small {
  display: flex; align-items: center; gap: 8px; margin-top: 9px;
  font-size: 10.5px; font-weight: 550; letter-spacing: 0.16em; line-height: 1.3; text-transform: uppercase; color: var(--vl-muted);
  font-variant-numeric: tabular-nums lining-nums;
}
#room small::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--vl-accent); flex: none; }
#room small:empty { display: none; }

/* ---- Bottom left: the plan. A sharp frame; the dots are the things to press. */
#mapwrap {
  left: var(--vl-left); bottom: var(--s3-bottom); padding: 5px;
  /* Never taller than the gap under the room panel (0.617 is the plan's width / height). */
  width: min(210px, 42vw, calc((100vh - var(--s3-clear) - var(--s3-bottom) - 22px) * 0.617 + 12px));
  width: min(210px, 42vw, calc((100dvh - var(--s3-clear) - var(--s3-bottom) - 22px) * 0.617 + 12px));
  background: var(--vl-panel); border: 1px solid var(--vl-line); border-radius: 0;
  -webkit-backdrop-filter: var(--vl-blur); backdrop-filter: var(--vl-blur);
}
#map { border-radius: 0; background-color: var(--vl-surface); }
#map button {
  width: 14px; height: 14px; margin: -7px 0 0 -7px; padding: 0; border-radius: 50%;
  background: var(--vl-white); border: 2px solid var(--vl-black);
  -webkit-backdrop-filter: none; backdrop-filter: none;
}
#map button.here { width: 18px; height: 18px; margin: -9px 0 0 -9px; background: var(--vl-accent); border-color: var(--vl-black); box-shadow: 0 0 0 3px rgba(242, 51, 13, 0.34); }
#map button:focus-visible { outline-offset: 2px; }

/* ---- Bottom right: how to move. */
#hint {
  right: var(--vl-right); bottom: var(--s3-bottom); max-width: none; padding: 9px 15px; white-space: nowrap;
  border: 1px solid var(--vl-line); border-radius: 999px; background: var(--vl-panel);
  -webkit-backdrop-filter: var(--vl-blur); backdrop-filter: var(--vl-blur);
  color: var(--vl-grey); font-size: 12px; font-weight: 500; letter-spacing: 0.01em; line-height: 1.25; text-align: left; text-shadow: none;
}

/* ---- "Sharpening view": quiet, no accent. */
#busy {
  bottom: var(--s3-bottom); padding: 10px 16px; border: 1px solid var(--vl-line); border-radius: 999px; background: var(--vl-panel);
  -webkit-backdrop-filter: var(--vl-blur); backdrop-filter: var(--vl-blur);
  color: var(--vl-muted); font-size: 10.5px; font-weight: 550; letter-spacing: 0.16em; line-height: 1.25; text-transform: uppercase; white-space: nowrap;
  transition: opacity 0.4s var(--vl-ease);
}

/* ---- The start card. */
#start {
  padding: calc(var(--vl-below) + 6px) max(20px, var(--vl-right)) calc(var(--vl-below) + 6px) max(20px, var(--vl-left));
  background: radial-gradient(120% 85% at 50% 0%, rgba(34, 34, 33, 0.86), rgba(11, 11, 11, 0.97) 72%);
  overflow-y: auto;
}
#card {
  position: relative; width: min(560px, 100%); margin: auto; padding: clamp(24px, 4.4vw, 40px);
  background: var(--vl-panel); border: 1px solid var(--vl-line); border-radius: 0;
  -webkit-backdrop-filter: var(--vl-blur); backdrop-filter: var(--vl-blur);
}
#card h1 {
  margin: 0 0 16px; font-size: clamp(30px, 6.4vw, 44px); font-weight: 750; font-stretch: var(--vl-wide);
  letter-spacing: -0.035em; line-height: 0.95; text-wrap: balance; font-variant-numeric: lining-nums;
}
#card p { margin: 0 0 26px; max-width: 46ch; color: var(--vl-muted); font-size: 15.5px; line-height: 1.5; text-wrap: pretty; }
#card .row { gap: 10px; }
#card button {
  flex: 1 1 auto; display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 6px 24px; font-size: 15px; font-weight: 650; text-wrap: balance;
}
/* "Look around on screen" is the main button; when a headset is there, "Enter VR" takes over and it steps back. */
#card #screenbtn, #card #vrbtn { background: var(--vl-accent); border-color: var(--vl-accent); color: var(--vl-on-accent); }
#card #vrbtn:enabled + #screenbtn { background: transparent; border-color: var(--vl-white); color: var(--vl-white); }
#card #vrbtn[disabled] { background: var(--s3-quiet); border-color: transparent; color: var(--vl-muted); font-weight: 550; cursor: not-allowed; -webkit-backdrop-filter: none; backdrop-filter: none; }
#note { margin-top: 24px; padding-top: 15px; border-top: 1px solid var(--vl-line); color: var(--vl-muted); font-size: 11.5px; line-height: 1.5; letter-spacing: 0.01em; text-wrap: pretty; }

/* ---- Hover, for devices that have one (a finger would leave it stuck on). */
button:hover { border-color: var(--s3-rim); }
@media (hover: hover) {
  #tools button[aria-pressed='false']:hover { border-color: var(--vl-accent); color: var(--vl-accent); }   /* a switch that is on stays Vermilion */
  #tools #vr2:hover, #card #screenbtn:hover, #card #vrbtn:enabled:hover, #card #vrbtn:enabled + #screenbtn:hover { background: var(--vl-white); border-color: var(--vl-white); color: var(--vl-black); }
  #map button:hover { background: var(--vl-accent); }
}

/* ---- Entrance of the start card. */
@keyframes s3-rise { from { opacity: 0; transform: translateY(20px); } }
@keyframes s3-card { from { opacity: 0; transform: translateY(26px) scale(0.985); } }
#card { animation: s3-card 1s var(--vl-ease) 0.05s both; }
#card h1, #card p, #card .row, #note { animation: s3-rise 0.9s var(--vl-ease) both; }
#card h1 { animation-delay: 0.2s; }
#card p { animation-delay: 0.28s; }
#card .row { animation-delay: 0.36s; }
#note { animation-delay: 0.44s; }

/* ---- Narrower than the bar plus three buttons: the buttons drop to the second row. */
@media (max-width: 800px) {
  #tools { top: var(--vl-below); }
  #busy { left: auto; right: var(--vl-right); transform: none; bottom: calc(var(--s3-bottom) + 44px); }
}
/* ---- Phones: bar, then the buttons, then the room panel (too narrow to share a row with three buttons). */
@media (max-width: 640px) {
  :root { --s3-clear: calc(var(--vl-below) + var(--s3-tool) + var(--s3-gap) + var(--s3-room)); }
  #room { top: calc(var(--vl-below) + var(--s3-tool) + var(--s3-gap)); padding: 11px 16px 11px 13px; }
  #room b { font-size: 19px; }
  #room small { font-size: 10px; letter-spacing: 0.14em; margin-top: 8px; }
}
@media (max-width: 560px) {
  #mapwrap {
    width: min(132px, calc((100vh - var(--s3-clear) - var(--s3-bottom) - 22px) * 0.617 + 12px));
    width: min(132px, calc((100dvh - var(--s3-clear) - var(--s3-bottom) - 22px) * 0.617 + 12px));
  }
  #busy { bottom: var(--s3-bottom); }                 /* the hint is not shown here, so its corner is free */
  #card button { padding-inline: 18px; }
}
/* ---- Short screens (a phone on its side): a tighter card that stays under the bar. */
@media (max-height: 560px) {
  #start { padding-top: calc(var(--vl-below) + 4px); padding-bottom: 12px; }
  #card { width: min(680px, 100%); padding: 22px 26px; }
  #card h1 { margin-bottom: 10px; font-size: clamp(26px, 4.2vw, 34px); }
  #card p { margin-bottom: 16px; max-width: none; font-size: 14.5px; }
  #note { margin-top: 16px; padding-top: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  #card, #card h1, #card p, #card .row, #note { animation: none; }
  button, #busy { transition: none; }
}
