/* =========================================================================
   control.css — sterowanie w sidebarze: slider, segmented tabs, tile-chooser.
   ========================================================================= */

.control {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-card);
  padding: 14px 16px;
}
.control__label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-tight);
  margin-bottom: 10px;
}
.control__label .name {
  font-size: var(--eyebrow-fs);
  letter-spacing: var(--eyebrow-ls);
  text-transform: uppercase;
  color: var(--text-tertiary);
  font-weight: 600;
}
.control__label .value {
  font-size: var(--fs-base);
  font-weight: 700;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}
.control__hint {
  font-size: var(--fs-xs);
  color: var(--text-tertiary);
  margin-top: 6px;
}

/* Slider stylizowany (bazowy range input) */
.control input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  border-radius: var(--radius-pill);
  background: rgba(255,255,255,0.08);
  border: 0;
  outline: none;
  padding: 0;
}
.control input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--accent-primary);
  border: 3px solid var(--text-primary);
  box-shadow: 0 0 8px rgba(168,85,247,0.4);
  cursor: pointer;
}
.control input[type="range"]::-moz-range-thumb {
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--accent-primary);
  border: 3px solid var(--text-primary);
  cursor: pointer;
}

/* Segmented tabs (np. AI / mining split wizualnie).
   Full-width grid — same-size buttons, nowrap labels, skaluje się do szerokości sidebara. */
.segmented {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  width: 100%;
  padding: 3px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-inner);
  gap: 2px;
}
.segmented button {
  padding: 6px 4px;
  border-radius: calc(var(--radius-inner) - 3px);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-tertiary);
  white-space: nowrap;
  text-align: center;
  line-height: 1.2;
  transition: all 0.15s;
}
.segmented button:hover {
  color: var(--text-secondary);
  background: rgba(255,255,255,0.04);
}
.segmented button.is-active {
  background: rgba(168,85,247,0.2);
  color: var(--text-primary);
  font-weight: 600;
  box-shadow: 0 0 0 1px rgba(168,85,247,0.4);
}

/* Number stepper — input liczbowy z buttonami ± po bokach (w kolorach brandu).
   Ukrywa native spinner (chrome/firefox), dostepny przez klawiature. */
.num-stepper {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid rgba(168,85,247,0.35);
  border-radius: var(--radius-inner);
  overflow: hidden;
  background: rgba(168,85,247,0.06);
}
.num-stepper__btn {
  width: 32px;
  border: 0;
  background: rgba(168,85,247,0.14);
  color: var(--accent-primary);
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease;
  padding: 0;
  display: grid;
  place-items: center;
}
.num-stepper__btn:hover {
  background: rgba(168,85,247,0.28);
  color: var(--text-primary);
}
.num-stepper__btn:active {
  background: rgba(168,85,247,0.42);
}
.num-stepper__btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.num-stepper__input {
  width: 72px;
  border: 0;
  background: transparent;
  color: var(--text-primary);
  font-size: var(--fs-base);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: center;
  padding: 6px 4px;
  outline: none;
}
/* Hide native spinners (chromium / safari / firefox) */
.num-stepper__input::-webkit-outer-spin-button,
.num-stepper__input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.num-stepper__input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

/* Summary (sidebar) — duze wynik + opis */
.summary {
  padding: var(--space-inner);
  border: 1px solid rgba(168,85,247,0.24);
  background: linear-gradient(160deg, rgba(168,85,247,0.06), rgba(56,189,248,0.04));
  border-radius: var(--radius-card);
}
.summary .label {
  font-size: var(--eyebrow-fs);
  letter-spacing: var(--eyebrow-ls);
  text-transform: uppercase;
  color: var(--text-tertiary);
  font-weight: 600;
  margin-bottom: 6px;
}
.summary .big {
  font-size: var(--fs-3xl);
  font-weight: 800;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.summary .hint {
  font-size: var(--fs-xs);
  color: var(--text-tertiary);
  margin-top: 6px;
}
