.toggle-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;

  .toggle-switch {
    position: relative;
    -webkit-appearance: none;
    appearance: none;
    width: 44px;
    height: 24px;
    background-color: var(--color-bg-quaternary);
    border-radius: 12px;
    cursor: pointer;
    transition: background-color 0.2s ease;

    &::before {
      content: "";
      position: absolute;
      top: 2px;
      left: 2px;
      width: 20px;
      height: 20px;
      background-color: var(--color-base-white);
      border-radius: 50%;
      transition: transform 0.2s ease;
      box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    }

    &:checked {
      background-color: var(--color-bg-brand-solid);
    }

    &:checked::before {
      transform: translateX(20px);
    }

    &:focus-visible {
      outline: 2px solid var(--color-border-selected-secondary);
      outline-offset: 2px;
    }

    &.compact {
      width: 30px;
      height: 18px;
      border-radius: 9px;

      &::before {
        width: 14px;
        height: 14px;
      }

      &:checked::before {
        transform: translateX(12px);
      }
    }
  }

  .toggle-label {
    font-size: var(--font-size-sm);
    color: var(--color-text-primary);
    cursor: pointer;
    user-select: none;
  }
}
