/* Rolling buffer test: layout of its controls (the look comes from glass-controls.css and test-ui.css).
   Under the picture: scene menu, direction, speed presets, Settings, pause, fullscreen.
   Settings (exact speed, shape, size, rotation, colours) open in a popover, a bottom sheet on phones,
   and sit open above the capsule in fullscreen. */
.rbb [data-k="dir"] svg { fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.rbb-scene { padding-left: 10px; }
.rbb-scene-name { min-width: 6.6em; text-align: left; }
.rbb-presets > button { min-width: 46px; padding: 0 9px; }

/* the readout's warning when the browser runs below 50 Hz */
.rbb-warn { display: block; margin-top: 4px; color: #ff9f0a; }
.rbb-warn[hidden] { display: none; }
.tst-fs .rbb-out:has(.rbb-warn:not([hidden])) { max-width: min(560px, calc(100% - 48px)); border-radius: 14px; }

/* muted: a control the scene doesn't use, or a direction it doesn't allow (three speeds: sideways or up-down only) */
.rbb-sec { transition: opacity .2s; }
.rbb-sec.rbb-off { opacity: .35; }
.rbb button:disabled, .rbb input:disabled { cursor: default; }
.rbb-sec:not(.rbb-off) .gl-seg > button:disabled { opacity: .35; }
.rbb .rbb-off .gl-seg > button:disabled { opacity: 1; }

/* Settings */
.rbb-set { position: absolute; right: 14px; bottom: calc(100% + 12px); width: 430px; padding: 16px 16px 14px;
  display: flex; flex-direction: row; flex-wrap: wrap; align-items: flex-start; gap: 16px 22px; }
.rbb-set .rbb-sec { display: flex; flex-direction: column; gap: 9px; min-width: 0; }
.rbb-sec-spd, .rbb-sec-rot, .rbb-sec-hp { flex: 1 1 100%; }
.rbb-hpnote { font-size: 12px; color: #8e8e93; }
.rbb-sec-size { flex: 1 1 150px; }
.rbb-rng { display: flex; align-items: center; gap: 12px; }
.rbb-rng .gl-range { flex: 1; }
.rbb-rng b { min-width: 74px; text-align: right; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rbb-rng b small { font-size: 11px; font-weight: 500; color: #8e8e93; }
.rbb-sec-size .rbb-rng b { min-width: 36px; }
.rbb-sec-rot:not(.rbb-off):has(.rbb-rot[aria-pressed=false]) :is(input, b) { opacity: .4; }
.rbb .gl-dots { padding-left: 4px; }

/* fullscreen: Settings open above the capsule, all in one glass panel */
.tst-fs .rbb-setbtn, .tst-fs .rbb-setbtn + .gl-sep { display: none; }
.tst-fs .rbb-set[hidden], .tst-fs .rbb-set { display: flex; position: static; width: auto; max-width: min(1100px, 100%); max-height: calc(100vh - 140px); overflow: auto;
  align-items: flex-end; border-radius: 22px; background: rgba(28,28,32,.84); animation: none; }
.tst-fs .rbb-sec-spd, .tst-fs .rbb-sec-rot, .tst-fs .rbb-sec-hp { flex: 1 1 210px; }
.tst-fs .rbb-rng b { min-width: 60px; }
.tst-fs .rbb-sec-size { flex: 1 1 140px; }

@media (max-width: 600px) {
  .rbb .tst-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 4px; }
  .rbb-g1 { display: contents; }
  .rbb-scenewrap { grid-column: 1; grid-row: 1; justify-self: start; }
  .rbb .tst-end { grid-column: 2; grid-row: 1; }
  .rbb-sec-dir { grid-column: 1 / -1; grid-row: 2; }
  .rbb-spd { grid-column: 1 / -1; grid-row: 3; }
  .rbb-setlbl { display: none; }
  .rbb-setbtn { width: 36px; padding: 0; justify-content: center; }
  .rbb-scene-name { min-width: 0; }
  .rbb-presets > button { min-width: 0; }
  /* sheets: settings in one column, the scene list full width */
  .rbb-set.gl-sheet { flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 16px; }
  .rbb-set .rbb-sec { flex: none; }
  .rbb-scenes.gl-sheet > button { padding: 12px; font-size: 15px; }
  .tst-fs.rbb .tst-bar { display: flex; }
  .tst-fs .rbb-set[hidden] { display: none !important; }
  .tst-fs .rbb-setbtn, .tst-fs .rbb-setbtn + .gl-sep { display: inline-flex; }
}
@media (prefers-reduced-motion: reduce) { .rbb-sec { transition: none; } }
@media (prefers-reduced-transparency: reduce) { .tst-fs .rbb-set { background: #1c1c20; } }
.rbb-set .gl-seg, .rbb-set .gl-dots { align-self: flex-start; }

/* a first-visit pointer at the scene menu: the same soft blue as the lumens hint in the throw calculator, three breaths */
@keyframes rbb-hint { 0%, 100% { box-shadow: 0 0 0 0 rgba(10,132,255,0); } 50% { box-shadow: 0 0 0 2px rgba(10,132,255,.9), 0 0 14px 2px rgba(10,132,255,.45); } }
.rbb-scene.rbb-hint { animation: rbb-hint 2s ease-in-out infinite; }

/* a note right under the tool: the speed advice, in the accent blue */
.rbb-note { margin: 14px 0 0; padding: 12px 16px; border-radius: 12px; background: rgba(0,122,255,.1); color: var(--accent); font-size: 15px; line-height: 1.5; font-weight: 500; }
