/* "Try it on your home" page. Uses Everstone's colour variables, font and buttons from site.css. */


/* The tool */
.viz { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 32px clamp(24px, 4vw, 48px); align-items: start; }
.viz-main { display: grid; gap: 14px; min-width: 0; }
@media (min-width: 921px) { .viz-main { position: sticky; top: calc(var(--header) + 24px); } }   /* the picture stays in view while the controls scroll */
.viz-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.viz-bar label.btn { cursor: pointer; }
.viz-bar:focus-within label.btn { outline: 3px solid var(--lamp); outline-offset: 3px; }
.viz-stage { display: flex; align-items: center; justify-content: center; min-height: 220px; overflow: hidden; border-radius: 18px; background: var(--navy); }
.viz-frame { position: relative; flex: none; line-height: 0; }
.viz-frame canvas { display: block; width: 100%; height: 100%; }
#viz-overlay { position: absolute; inset: 0; touch-action: none; cursor: crosshair; }
#viz-overlay { opacity: 0; transition: opacity 0.6s ease; }                    /* guide dots fade away when not in use */
#viz-overlay.is-guiding { opacity: 1; transition-duration: 0.15s; }
.viz-hint { min-height: 3.2em; color: var(--slate); }
.choice { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 600; font-size: 0.95rem; cursor: pointer; }
.choice input { width: 18px; height: 18px; margin: 0; accent-color: var(--navy); }

.viz-panel { display: grid; gap: 24px; padding: clamp(22px, 3vw, 32px); border-radius: 20px; background: var(--frost); }
.viz-panel h2 { font-size: 0.95rem; font-stretch: 100%; font-weight: 700; letter-spacing: 0; line-height: 1.4; }
.viz-group { display: grid; gap: 10px; }
.viz-group > label { font-weight: 700; font-size: 0.95rem; }
.swatch-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.swatch-btn, .mode-btn {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 0 16px;
  border: 1.5px solid #c5cbda; border-radius: 999px;
  background: var(--white); color: var(--ink);
  font-size: 0.96rem; font-weight: 600; cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s, color 0.15s; -webkit-tap-highlight-color: transparent;
}
.swatch-btn:hover, .mode-btn:hover { border-color: var(--navy); }
.swatch-btn[aria-pressed="true"], .mode-btn[aria-pressed="true"] { border-color: var(--navy); background: var(--navy); color: var(--white); }
.swatch-btn i { display: inline-flex; }
.swatch-btn i b { width: 13px; height: 13px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(5, 15, 41, 0.35); }
.swatch-btn i b + b { margin-left: -4px; }
#viz-colour { width: 48px; height: 44px; padding: 2px; border: 1.5px solid #c5cbda; border-radius: 8px; background: var(--white); cursor: pointer; }
.viz-panel input[type="range"] { width: 100%; min-height: 32px; margin: 0; accent-color: var(--navy); }
.range-ends { display: flex; justify-content: space-between; font-size: 0.88rem; color: var(--slate); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.viz-note { font-size: 0.93rem; color: var(--slate); }

/* "For a good result" tips use the site's numbered steps, three across */
.steps--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }

@media (max-width: 920px) {
  .viz { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1020px) {
  .steps--three { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Compact layout for phones ---------- */
.viz-short { display: none; }
@media (max-width: 640px) {
  .viz-long { display: none; }
  .viz-short { display: inline; }
  #visualizer { padding-top: 20px; padding-bottom: 28px; }
  .viz { gap: 16px; }
  .viz-main { gap: 10px; }
  .viz-bar { flex-wrap: nowrap; gap: 8px; }
  .viz-bar .btn { flex: 1 1 0; min-width: 0; min-height: 42px; padding: 0 10px; font-size: 0.92rem; }
  .viz-stage { margin-inline: calc(-1 * var(--gutter)); border-radius: 0; min-height: 180px; }
  .viz-hint { min-height: 0; font-size: 0.88rem; line-height: 1.45; }
  .viz-panel { gap: 14px; padding: 16px; border-radius: 16px; }
  .viz-panel h2, .viz-group > label { font-size: 0.85rem; }
  .viz-group { gap: 6px; }
  .swatch-row { flex-wrap: nowrap; overflow-x: auto; gap: 6px; margin-inline: -16px; padding: 2px 16px 4px; scrollbar-width: none; }
  .swatch-row::-webkit-scrollbar { display: none; }
  .swatch-btn, .mode-btn { flex: none; min-height: 38px; padding: 0 12px; font-size: 0.88rem; gap: 6px; }
  .swatch-btn i b { width: 11px; height: 11px; }
  #viz-colour { flex: none; width: 40px; height: 38px; }
  .viz-panel input[type="range"] { min-height: 26px; }
  .range-ends { display: none; }
  .btn-row { flex-wrap: nowrap; gap: 8px; }
  .btn-row .btn { flex: 1 1 0; min-width: 0; min-height: 44px; padding: 0 10px; font-size: 0.92rem; }
  .viz-note { font-size: 0.82rem; line-height: 1.45; }
  /* the tips below the tool stay on the full page, but not in the pop-up */
  .is-embed #visualizer + .band { display: none; }
}
