/* Atoms — базові елементи інтерфейсу (кнопки, інпути, слайдери, світчі, бейджі) */

/* --- Buttons --- */
.a-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--surface-elevated);
  color: var(--text-primary);
  font: 500 12px/1 var(--font-sans);
  letter-spacing: 0.01em;
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
  transition: background var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out),
    color var(--dur-fast) var(--ease-out),
    transform var(--dur-fast) var(--ease-out);
}

.a-btn:hover {
  background: var(--surface-hover);
  border-color: var(--border-default);
}

.a-btn:active {
  transform: scale(0.97);
}

.a-btn--icon {
  width: 34px;
  padding: 0;
}

.a-btn--sm {
  height: 28px;
  padding: 0 9px;
  font-size: 11px;
  border-radius: var(--radius-xs);
}

.a-btn--sm.a-btn--icon {
  width: 28px;
  padding: 0;
}

.a-btn--ghost {
  background: transparent;
  border-color: transparent;
  color: var(--text-secondary);
}

.a-btn--ghost:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: transparent;
  color: var(--text-primary);
}

.a-btn--primary {
  background: var(--accent-cta-bg);
  color: var(--text-inverse);
  border-color: transparent;
  font-weight: 600;
  padding: 0 16px;
}

.a-btn--primary:hover {
  background: var(--accent-cta-hover);
  border-color: transparent;
}

.a-btn.is-active {
  background: var(--text-primary);
  color: var(--text-inverse);
  border-color: transparent;
}

.a-btn svg {
  width: 15px;
  height: 15px;
  flex: none;
}

/* --- Seed Input --- */
.a-seed-input {
  width: 108px;
  height: 34px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--surface-input);
  color: var(--text-primary);
  font: 600 12px/1 var(--font-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: border-color var(--dur-fast) var(--ease-out), background var(--dur-fast);
}

.a-seed-input:hover {
  border-color: var(--border-default);
}

.a-seed-input:focus {
  outline: none;
  border-color: var(--border-strong);
  background: #141720;
}

/* --- Range Slider --- */
.a-slider {
  --progress: 50%;
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: var(--radius-pill);
  background: linear-gradient(
    90deg,
    var(--accent-chrome) 0%,
    var(--accent-chrome) var(--progress),
    rgba(255, 255, 255, 0.12) var(--progress),
    rgba(255, 255, 255, 0.12) 100%
  );
  outline: none;
  cursor: pointer;
}

.a-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid #0e1016;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-out);
}

.a-slider::-webkit-slider-thumb:hover {
  transform: scale(1.18);
}

.a-slider::-moz-range-thumb {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid #0e1016;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
  cursor: pointer;
}

/* --- Toggle Switch --- */
.a-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  padding: 4px 0;
}

.a-switch__label {
  font-size: 12px;
  color: var(--text-primary);
}

.a-switch__input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.a-switch__track {
  position: relative;
  width: 34px;
  height: 20px;
  flex: none;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.14);
  transition: background var(--dur-fast) var(--ease-out);
}

.a-switch__track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--text-secondary);
  transition: transform var(--dur-fast) var(--ease-out), background var(--dur-fast);
}

.a-switch__input:checked + .a-switch__track {
  background: var(--text-primary);
}

.a-switch__input:checked + .a-switch__track::after {
  transform: translateX(14px);
  background: var(--text-inverse);
}

.a-switch__input:focus-visible + .a-switch__track {
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
}

/* --- Badges & Dividers --- */
.a-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 7px;
  border-radius: var(--radius-xs);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  font: 500 11px/1.3 var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.a-divider-v {
  width: 1px;
  height: 20px;
  background: var(--border-subtle);
  flex: none;
}

.a-divider-h {
  height: 1px;
  background: var(--border-subtle);
  margin: 12px 0;
}

.a-kbd {
  display: inline-flex;
  align-items: center;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  font: 500 10px/1.3 var(--font-mono);
}
