/* jellyqda landing page :: install.css -- the install guide per operating
   system (section #install). Uses the colour tokens of style.css.
   Behaviour: install.js.
   Layout: a row of system tabs (Linux, macOS, Windows, FreeBSD); Linux has a
   second row for the distribution. Below: numbered steps 1-2 (system
   specific) and 3-4 (the same everywhere: install jellyqda, start the app).
   Without JavaScript (no .js class) every system is shown, one below the
   other, each with its name as a heading (.nojs-title). */

.installer .sechead { margin-bottom: 26px; }

/* system tabs: segmented control */
.ostabs, .distrotabs { display: flex; flex-wrap: wrap; gap: 6px; }
.ostabs { padding: 5px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); width: fit-content; max-width: 100%; }
.ostabs button, .distrotabs button { border: 1px solid transparent; background: none; color: var(--ink-2); cursor: pointer; font: 650 .92rem var(--font); border-radius: 8px; padding: 7px 16px; }
.ostabs button:hover, .distrotabs button:hover { color: var(--ink); }
.ostabs button[aria-selected="true"] { background: var(--surface); color: var(--ink); border-color: var(--line); box-shadow: 0 4px 14px -10px rgba(0,0,0,.45); }
.distrotabs { margin: 16px 0 4px; }
.distrotabs button { border-color: var(--line); background: var(--surface); border-radius: 999px; padding: 4px 13px; font-size: .86rem; }
.distrotabs button[aria-selected="true"] { background: var(--blue); border-color: var(--blue); color: var(--blue-ink); }

/* without JS: no tabs, every system with a heading */
.installer:not(.js) .ostabs, .installer:not(.js) .distrotabs { display: none; }
.installer.js .nojs-title { display: none; }
.nojs-title { margin: 28px 0 0; font-size: 1.05rem; }

/* numbered steps; the common steps continue the numbering at 3 */
.osteps { list-style: none; margin: 22px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; counter-reset: st; }
.osteps.common { counter-reset: st 2; margin-top: 20px; }
.osteps > li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px 22px; min-width: 0; counter-increment: st; }
.osteps h4 { margin: 0 0 8px; font-size: 1rem; display: flex; align-items: center; gap: 10px; }
.osteps h4::before { content: counter(st); flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--blue); color: var(--blue-ink); font-size: .8rem; }
.osteps p { margin: 0 0 10px; font-size: .9rem; color: var(--ink-2); }
.osteps p:last-child { margin-bottom: 0; }
.osteps kbd { font: 600 .8em var(--mono); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 0 4px; background: var(--surface-2); }

/* command blocks with a copy button (added by install.js) */
.cmdbox { position: relative; margin: 0 0 10px; }
.cmdbox:last-child { margin-bottom: 0; }
.osteps pre.cmd { margin: 0; background: var(--surface-2); border-radius: 8px; padding: 10px 12px; overflow-x: auto; font-size: .8rem; line-height: 1.55; }
/* long commands wrap instead of running under the copy button; copying
   still takes the text exactly as written (line breaks only where "\" is) */
.cmdbox pre.cmd { padding-right: 46px; white-space: pre-wrap; overflow-wrap: anywhere; }
.cmdcopy { position: absolute; top: 6px; right: 6px; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 7px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); cursor: pointer; }
.cmdcopy:hover { color: var(--ink); border-color: var(--blue); }
.cmdcopy svg { width: 15px; height: 15px; }
.cmdcopy.ok { color: var(--c3); border-color: var(--c3); }

@media (max-width: 900px) {
  .osteps { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .ostabs { width: 100%; }
  .ostabs button { flex: 1 1 auto; padding: 7px 10px; }
}
