.switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-block: var(--space-2);
  border-block-end: 1px solid var(--color-border-light);
}

.switch:last-child {
  border-block-end: none;
}

.switch--inline {
  justify-content: flex-start;
  gap: var(--space-2);
  padding-block: 0;
  border-block-end: none;
}

.switch--indent {
  padding-inline-start: var(--space-5);
}

.switch--master .switch__label {
  font-weight: var(--weight-semibold);
}

.switch__label {
  font-size: var(--text-sm);
  color: var(--color-text);
}

.switch__control {
  position: relative;
  flex: 0 0 auto;
  inline-size: 36px;
  block-size: 20px;
  padding: 0;
  border: none;
  border-radius: var(--radius-pill);
  background: var(--color-border-strong);
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out);
}

.switch__control[aria-checked="true"] {
  background: var(--color-success);
}

.switch__control:disabled {
  opacity: 0.5;
  cursor: default;
}

.switch__thumb {
  position: absolute;
  inset-block-start: var(--space-hair);
  inset-inline-start: var(--space-hair);
  inline-size: 16px;
  block-size: 16px;
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
  transition: translate var(--dur-fast) var(--ease-out);
}

.switch__control[aria-checked="true"] .switch__thumb {
  translate: 16px 0;
}
